--- title: AssetSizeCSS description: Checks a theme's CSS bundle size. source_url: html: >- https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/asset-size-css md: >- https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/asset-size-css.md --- ExpandOn this page * [Example](https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/asset-size-css.md#example) * [Options](https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/asset-size-css.md#options) * [Disabling this check](https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/asset-size-css.md#disabling-this-check) # AssetSizeCSS Prevents themes and theme app extensions from using CSS files larger than the configured [`threshold_in_bytes`](#options). Limiting the size of CSS files helps to improve the [performance](https://shopify.dev/docs/storefronts/themes/best-practices/performance) of your theme. *** ## Example In the following example, the size of `section-rich-text.css` is checked to make sure that it doesn't exceed the specified `threshold_in_bytes`: ```html ``` *** ## Options The following example contains the default configuration for this check: For themes: ```yaml AssetSizeCSS: enabled: false threshold_in_bytes: 100_000 ``` For theme app extensions: ```yaml AssetSizeCSS: enabled: false severity: suggestion threshold_in_bytes: 100_000 ``` | Parameter | Description | | - | - | | `enabled` | Whether this check is enabled. | | `severity` | The [severity](https://shopify.dev/docs/storefronts/themes/tools/theme-check/configuration#check-severity) of the check. | | `threshold_in_bytes` | 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 enabled by default when you run the Shopify CLI 3.x [`build`](https://shopify.dev/docs/api/shopify-cli/app/app-build) command on a theme app extension. This limit is not yet enforced, but disabling this check isn't recommended for theme app extensions. This check is disabled by default when you run the Shopify CLI 2.x [`shopify theme check`](https://shopify.dev/docs/storefronts/themes/tools/theme-check/commands) command. *** * [Example](https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/asset-size-css.md#example) * [Options](https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/asset-size-css.md#options) * [Disabling this check](https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/asset-size-css.md#disabling-this-check)