Giter VIP home page Giter VIP logo

Comments (2)

adamwathan avatar adamwathan commented on June 30, 2024

Hey! This is annoying but expected — when you customize the typography plugin your customizations are just added after the CSS generated by the plugin by default unless you target a selector that the plugin has already defined, in which case the rule stays in the same place in the CSS file but gets the new value.

You can see we define the p spacing here:

https://github.com/tailwindlabs/tailwindcss-typography/blob/master/src/styles.js#L195

...and the table spacing here:

https://github.com/tailwindlabs/tailwindcss-typography/blob/master/src/styles.js#L1413-L1419

Since we target p and table separately rather than as p, table, you'll have the best results doing the same.

Sorry, this plugin sucks to customize 😕 Personally not satisfied with it at all. In the future I'm hoping to move to a setup where we literally just give you some CSS to throw into your own project, and you customize it by opening the CSS and editing it rather than trying to deal with all this fancy CSS-in-JS weird complex merging garbage.

But yeah right now the behavior you're seeing is effectively intended for the reasons I explained 👍

from tailwindcss-typography.

zipper avatar zipper commented on June 30, 2024

Ok, I guess that also explains, why it doesn't help, when I insert > :last-child into the css array at last position - since the key already exists, it is still before the new selector. Thank you for clarification 🙂

I agree with the CSS-in-JS part you write. I'm trying to change the behaviour of lg prose to modify just the margins and this and the sibling issue are a bit pitta.

from tailwindcss-typography.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.