• Resolved merrya

    (@meryaguilar138)


    Hello,

    How do I disable the extraction of classes with the Tailpress plug-in?

    I noticed that once after I installed the plug-in, the margins on my pages were suddenly lost, as they went the full width of my screen.

    The plugin page says that Tailwind “extracts classes from pages and compiles them server-side into Tailwind CSS.” That would explain the Genesis classes from my theme being removed (extracted) and replaced with different classes.

    A plugin should not be removing important classes that provide theme structure.

    Please advise.

    Thanks!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Greg

    (@freshbrewedweb)

    Hi @meryaguilar138 , perhaps that’s poorly worded. When I say it extracts, I don’t mean it removes anything, it simply looks at the classes on your page and compiles the CSS with that information.

    It sounds like you may have a conflict with your Genesis theme. If they are using a class like “m-0” for example, Tailwind also includes this class which removes all margins.

    We’re currently working on a way to scope TW styles under another name which would help with these kind of issues: https://github.com/greghunt/tailpress/issues/6

    Thread Starter merrya

    (@meryaguilar138)

    Hello Greg. Thank you for your response.

    I’m not sure what you mean by m-0, but that is not a class used in my Genesis theme. The class that Tailwind removed was “content-sidebar-wrap” and it was replaced it with “#1jpewq3.” Removing content-sidebar-wrap broke the page structure.

    Am I understanding correctly in that there currently is no way to disable the plugin from removing the margins from my Genesis theme and breaking the page structure?

    Thank you.

    • This reply was modified 1 year, 8 months ago by merrya.
    Plugin Author Greg

    (@freshbrewedweb)

    That’s odd. Can you email me the website in question here: [email protected] and I’ll take a look.

    “content-sidebar-wrap” shouldn’t be effected since it’s not a Tailwind class. Classes like m-0 or mx-0 can effect the margins.

    Plugin Author Greg

    (@freshbrewedweb)

    Oh, I see what’s happening. The class content-sidebar-wrap is in fact a reserved Tailwind CSS class name in the pattern content-{value}. This is the expected behaviour in that case.

    I removed the hashing function of the classnames in 0.4.4 since it seems to be causing a lot of confusion with users. This should help in your particular case because it won’t hash the classname the first time around. Also, although TW will add a selector that matches content-sidebar-wrap, it shouldn’t have any properties so it won’t conflict with your theme’s use of it. Please try updating and letting me know if you still have this issue.

    Thread Starter merrya

    (@meryaguilar138)

    Greg,

    Thanks for digging into this a bit further.

    You have resolved my issue with the latest plugin update and now the margins are as they should be!

    Thank you so much!!! ??

    Plugin Author Greg

    (@freshbrewedweb)

    Awesome! Glad it worked out

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘How to Disable Extraction of Classes with Tailpress Plug-in’ is closed to new replies.