• Resolved niznet

    (@niznet)


    After checking my network dev tools, I noticed that there are two CSS enqueued globally,

    wp-content/plugins/mega-forms/assets/frontend/css/styles.min.css?ver=1.2.9
    wp-content/plugins/mega-forms/assets/pro/frontend/css/styles.min.css?ver=1.2.9

    It’s breaking some of my own styles due to it has more specificity than mine.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Ali Khallad

    (@alikhallad)

    Hello,
    Initially we have created two version of Mega Forms, the normal one and the pro one, later we merged them together and the second stylesheet is for the pro version, it doesn’t have any duplicate items/code or anything.

    The pro version is also there to show developers how to extend the plugin, it’s build seperately with new features and added under /pro folder.

    Now regarding your problem, could you specify what is broken exactly and how can we replicate? this way we might be able to provide better support.

    Thread Starter niznet

    (@niznet)

    Sorry for the unclear explanation. The plugin should enqueue its assets only when we call the shortcode. In the picture, these two styles are always enqueued on any page: imgur

    Here’s another example, that mycred table breaks due to mega-forms assets having .right property, which sets the float to right while mycred only puts the name without any style applied.

    Plugin Author Ali Khallad

    (@alikhallad)

    Hello, I’ve made some changes in the current version to change the “.right” and “.left” properties. To use the changes you’ll need to update the plugin manually by deleting it and re-installing it.

    Regarding loading assets only when the shortcode is available, this is not possible because when you call assets conditionally to the shortcode they get loaded in the footer. This causes the forms to look broken until the page is fully loaded, so it’s important to load the CSS in the header. However, we do this with JavaScript since it’s not required upfront and we can wait for it until the page is loaded.

    Please test and let me know if you’re still having issues.

    Thanks,
    Ali

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Some CSS Styles is enqueued globally’ is closed to new replies.