AssetSizeCSS

Version 0.6.0+

Prevents themes from using CSS files larger than the configured threshold_in_bytes. Limiting the size of CSS files helps to improve the performance of your theme.

Examples

Below are examples of code that fails and passes this check.

✗ Fail

In this example, assets/theme.css is greater than threshold_in_bytes.

✓ Pass

In this example, assets/theme.css is less than threshold_in_bytes:

Options

The following example contains the default configuration for this check.

Parameter Description
enabled Whether this check is enabled.
threshold_in_bytes Determines the maximum allowed compressed size, in bytes, for a single CSS file. This includes the theme and remote stylesheets.

Disabling this check

This check is safe to disable.