Standardise CSS#2235
Conversation
|
📦 Docs artifacts are ready: https://github.com/elixir-lang/ex_doc/actions/runs/25584900198/artifacts/6890725761 |
|
I've realised that for the few files that are used in the EUPB styles, we should avoid/remove nesting & selectors and unnecessary use of :is(), because support for them is not good in ebook readers. code.css now takes this approach: with the exception of rules that already use :has(), that merely refine links with code in them and which can apply just to HTML, the rules now do not use & or :is(). I'm adding a comment to this effect at the top of such files. |
|
@DavidOliver gah, that's annoying, we should probably be a bit more conservative them, but for non-epub features it looks good! |
|
It is a bit 😆 At least it's only a few files. Thanks for taking a look. |
|
I think it's done. I'm going to spend some more time checking results next week. |
@josevalim, I've started with
admonition.css.Nesting consolidation, less repetition of variants' property value-setting via custom properties and in-lining of
@mediaqueries, resulting in fewer lines, a saving of 1.7kB ( 😉 ) and hopefully easier reading and editing.Are you happy for me to go ahead with the other CSS files?