Closed (fixed)
Project:
Critical CSS UI
Version:
1.0.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
17 Nov 2025 at 02:04 UTC
Updated:
28 Nov 2025 at 19:38 UTC
Jump to comment: Most recent
The module currently does not provide a global Critical CSS configuration to act as a fallback
when no contextual match is found. To improve the initial experience and avoid manual setup,
a default Critical CSS option managed via simple config is needed.
critical_css_ui.settings.default_critical_css key to store the global CSS fallback.default_enabled to toggle the fallback on or off.config/install.config/schema/critical_css_ui.schema.yml.node:ID → node:bundle → default.
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
diegodz commentedComment #3
diegodz commentedComment #5
sergeydruua commentedImplemented the default Critical CSS configuration logic as requested. Changes include: Updated schema and install config to support default_enabled and default_critical_css. Updated CriticalCssConfigForm to include the new fields with #states visibility. Refactored CriticalCssConfigForm to use Dependency Injection properly. Updated CriticalCssProvider::getCriticalCss() to fallback to the default configuration if no context match is found. Tested manually and verified that the fallback CSS is applied when expected.
Comment #6
diegodz commentedHi @sergeydruua,
Thank you for your contribution. I’ll review the MR as soon as I have some available time and will merge it into the 1.0.x branch.
Thanks again for your support!
Comment #7
diegodz commentedComment #9
diegodz commentedComment #11
diegodz commentedComment #13
diegodz commented