This rule exists to prevent large CSS bundles from being included via Theme App Extensions (for speed).
This rule disallows the use of too much CSS in themes, as configured by threshold_in_bytes
.
👎 Examples of incorrect code for this check:
<!-- Here, assets/app.css is **greater** than `threshold_in_bytes` compressed. -->
{% schema %}
{
...
"stylesheet": "app.css"
}
{% endschema %}
The default configuration is the following:
AssetSizeAppBlockCSS:
enabled: true
threshold_in_bytes: 100_000
The threshold_in_bytes
option (default: 100_000
) determines the maximum allowed compressed size in bytes that a single CSS file can take.
This includes theme and remote stylesheets.
This rule should not be disabled locally since the check will be enforced when promoting new versions of the extension.
This check has been introduced in 1.1.0