-
Hi there,
this is a very general question, but it has some practical implications. I try to adopt new CSS rules early, if they can’t hurt. Here are two examples:h1, h2, h3, h4, h6 { text-wrap: balance; } p, li, figcaption { text-wrap: pretty; max-width: 65ch; }
These rules will always improve, but never really hurt anything. Now, it is quite time-consuming to implement these rules individually. I could create an external stylesheet that is loaded on all customer sites, but this approach feels a bit hacky.
How do you handle this? Do you adopt rules like this early in theme updates? Or do you prefer a more conservative approach? I would prefer having this in the GP parent theme. But I do understand if you decide against it.
Thanks, Mike
-
Alvind
Hi there,
If you want to centralize your custom CSS rules, like the ones in your example and use them across multiple sites, you can utilize a child theme. Simply place all your custom CSS rules in the child theme’s
style.css
file. -
Hi Alvind,
I use child themes on all sites. But this will not do the trick. Modifications of the CSS would require time-consuming indivual updates of the stylesheets. An external stylesheet that is loaded after the child theme CSS would be a solution. However, it just doesn’t feel right to load an external file for a little bit CSS. This is the reason why I asked how early you adopt cutting edge CSS in the parent theme. I don’t talk about CSS with poor browser support that could break a site. It’s just about the nice-to-have stuff that could improve user experience without harming anything.
-
Alvind
Thank you for the insights. We’ll note this for potential improvements. 🙂
-
Thank you very much. Don’t get me wrong: This was not meant to be a criticism. I’m all for a conservative approach. There are some really useful CSS rules that don’t have great browser support. However, they are simply ignored if the browser can’t process them.
-
No worries, we completely understand. We’re open to any feedback for improvements as well.
- You must be logged in to reply to this topic.