[PP-2] Support inline and async CSS

Created on 3 July 2017, over 7 years ago
Updated 20 August 2023, over 1 year ago

Split from #2391025: Add support for inline JS/CSS with #attached β†’ don't bother reading any comments till after comment #20

Problem/Motivation

Adding inline CSS is cumbersome and isn't supported by the asset library system via #attached. In order to avoid the flash of unstyled content, it is recommended to attach all ABF (above the fold) styling as inline styling in the head tag. With our current library system this is difficult/near impossible. It is easy for a theme to add inline css into the twig templates, but a module cannot depend on the order of the css included externally. This makes for inconsistent css rule specificity.

Proposed resolution

Allow for all aggregated/cached css to be added inline in the head. This is the recommended strategy for Mobile First Development and avoiding the flash of unstyled content.

Remaining tasks

TBD

User interface changes

TBD

API changes

TBD

Data model changes

TBD

✨ Feature request
Status

Postponed: needs info

Version

11.0 πŸ”₯

Component
Asset libraryΒ  β†’

Last updated 11 minutes ago

No maintainer
Created by

πŸ‡ΊπŸ‡ΈUnited States frob US

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

  • Needs issue summary update

    Issue summaries save everyone time if they are kept up-to-date. See Update issue summary task instructions.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024