Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Discontinue excluding excessive CSS by default on Native mode sites #2326
Currently when there is too much CSS, the first stylesheet that exceeds the 50KB limit is excluded from being included on the page. This leads to pages that appear broken. While prioritizing the stylesheets to concatenate will help a lot (#2322), we should also consider whether we should exclude stylesheets by default. This is particularly important when activating AMP on a theme that has more than 50KB of CSS even without the admin bar, or when a certain combination of blocks causes more than 50KB of CSS to be added to the page after tree shaking.
We currently have this toggle to automatically-accept validation errors, which results in excessive CSS being excluded:
What if an
Should this auto-reject for
If we do this, it will be important to show a notice that too much CSS is on the page: #1801.
referenced this issue
May 15, 2019
I'm not sure on this. I think #2322 should definitely have more priority and be implemented (and even released) first so that we can get some real-world usage on whether it's sufficient for most cases or not.
The issue here would help mitigate an initial "everything is broken" reaction, but prioritization may already cover that sufficiently. Given the lack of consistency of treating
This is important for any case where there is an excessive CSS validation error in Native mode. In Transitional, the site has the fall back of redirection to canonical in the presence of errors. In Native, with the assumption of auto sanitization by default, the only option in such cases is a broken site. If such case ever happens, however unlikely, this approach would provide a much better experience.