nuxt-themes / typography

Beautifully customizable Prose components for Nuxt Content.
https://typography.nuxt.space
MIT License
163 stars 7 forks source link

Global styles for combining parts #36

Closed Atinux closed 1 year ago

Atinux commented 1 year ago

We sometimes need to create logic between specific combination:

p + ul {
  margin-top: 0;
}

This is currently not possible right now because all Prose elements are scoped, this will have to be defined globally.

See example of tailwindcss typography: https://github.com/tailwindlabs/tailwindcss-typography/blob/4c3b76ccc8120f307514d5721598763fd09761c0/src/styles.js#L143-L151

bdrtsky commented 1 year ago

Could this be an improvement for Typography if placed into ProseP etc?

Atinux commented 1 year ago

I think we may need a prose class somehow to have those global styles, wdyt?

bdrtsky commented 1 year ago

Which selectors needed exactly @Atinux ? The one from tailwind example? We can have it without global styles, like

'p + &': {
      background: 'red'
},
Tahul commented 1 year ago

Hey, this had no activity for a while, I guess @bdrtsky answered that question?

Closing, but feel free to re-open! :)