Skip to content

Refactor CSS#2235

Draft
DavidOliver wants to merge 4 commits intoelixir-lang:mainfrom
DavidOliver:css-refactor
Draft

Refactor CSS#2235
DavidOliver wants to merge 4 commits intoelixir-lang:mainfrom
DavidOliver:css-refactor

Conversation

@DavidOliver
Copy link
Copy Markdown
Contributor

@josevalim, I've started with admonition.css.

Nesting consolidation, less repetition of variants' property value-setting via custom properties and in-lining of @media queries, 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?

@DavidOliver DavidOliver requested a review from josevalim May 6, 2026 23:37
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 6, 2026

@DavidOliver
Copy link
Copy Markdown
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants