Cleanup CSS files in migrate/css by moving them over to css, either adding missing pieces to existing files or by adding entire new files.

Note this will be a blocker for many issues, including most accessibility issues.

  1. #3582826: Untangle gin.css
  2. #3583057: Convert the compiled CSS in default_admin's components, layout, and theme to modern PostCSS
  3. #3582833: Consolidate, refactor, remove and untangle Claro's CSS from Default Admin theme
  4. Consolidate, merge, and refactor Gin's CSS variable's into Claro's original variables.
  5. Remove any gin namespacing from CSS classes and variables, including CSS selectors used in PHP and template files.
  6. implement box-sizing: border-box on :root element
  7. Attempt to simplify selectors where we can, and remove !important declarations where possible
  8. Change focus outlines to use outline property instead of box-shadow
  9. Remove CSS files that extend contrib modules. Open issues in the respective modules to move CSS there
  10. Why is default admin theme changing Navigation toolbar styles? Should it be? If so, move those styles to Navigation module
  11. Remove gin from various namespaces in CSS and JS
  12. Default Admin & Navigation both load the Inter font. This needs to be consolidated.
  13. Update CSS to use modern CSS (indentation, logical properties, et al)
  14. For sticky tables, Gin completely duplicates the table header element, and then stickies it. This is the old way. Claro at one point moved to just using position: sticky. We should do that

Comments

jurgenhaas created an issue. See original summary.

jurgenhaas’s picture

cilefen’s picture

Title: Cleanup CSS » Clean up CSS
mherchel’s picture

default_admin's CSS is a huge mess. IMO this should have been completed before it was merged into core. There will need to be many, many core commits (which introduce many delays).

  • Gin has 41 Sass partials in Gin's styles/base directory that get compiled into one file. This one file was committed to default_admin. It's > 5660 lines of CSS that needs to be untangled.
  • There's tons of shims for contrib modules (e.g. dropzone, coffee, layout paragraphs). How do we handle these?
  • There's a number of Sass functions, mixins, and variables that need to be extracted in Gin's styles/helpers/
  • The CSS in general is very old. Lots of comments regarding Drupal 9 and 10.
  • It appears that the entirety of Claro's CSS was copied over. This is because Gin used Claro as a base theme.
  • All in all, there's somewhere around 2-3 CSS files/partials per component. We need to figure this out.
mherchel’s picture

On the good news front, I created https://github.com/mherchel/ddev-drupal-admin-vrt, which is a DDEV add-on that sets up a visual-regression system, so we can easily test for regressions.

rkoller’s picture

i just found this issue. looking at the issue summary and mikes comment, would it be preferable to wait with opening more issues until this issue is in? and that most of those bugs are potentially obsolete after cleanup? found #3576874: Toggle switches are visually broken within dialog modals a few weeks ago but also have a hand full of bugs in ios that would need issues as well.

catch’s picture

There's tons of shims for contrib modules (e.g. dropzone, coffee, layout paragraphs). How do we handle these?

These should all be removed. We already removed support for forum, book etc. #3581831: Remove support for Book and Forum Module.

mherchel’s picture

would it be preferable to wait with opening more issues until this issue is in?

I say yeah. Even if the issues persist (which they may), they'll be blocked until we can get the CSS in a maintainable state.

mherchel’s picture

Title: Clean up CSS » [Meta] Clean up CSS
Issue summary: View changes
mherchel’s picture

Issue summary: View changes
mherchel’s picture

Issue summary: View changes
kentr’s picture

I'll postpone CSS-related accessibility issues based on this so that would-be contributors don't waste time on them.

kentr’s picture

Regarding

5. Why is default admin theme changing Navigation toolbar styles? Should it be? If so, move those styles to Navigation module

Gonna be a similar issue with contextual_links.css, I think.

AFAICT, both of them currently affect dark mode by way of custom properties defined in variables.css.

kentr’s picture

Disregard previous comment about contextual_links.css. I conflated problems.

mherchel’s picture

Issue summary: View changes
mherchel’s picture

Issue summary: View changes
mherchel’s picture

Issue summary: View changes
mherchel’s picture

Issue summary: View changes
mherchel’s picture

Issue summary: View changes
quietone’s picture

Another issue completed.

mherchel’s picture

Issue summary: View changes
mherchel’s picture

Issue summary: View changes
mherchel’s picture

Issue summary: View changes
kentr’s picture

Issue summary: View changes

Tweaked "5. Remove any gin namespacing from CSS classes and variables" in the IS to include CSS selectors in PHP and template files.