diff --git a/themes/10up-theme/assets/css/frontend/global/index.css b/themes/10up-theme/assets/css/frontend/global/index.css index 08e37b3..334b498 100755 --- a/themes/10up-theme/assets/css/frontend/global/index.css +++ b/themes/10up-theme/assets/css/frontend/global/index.css @@ -1,3 +1,2 @@ @import url("reset.css"); @import url("colors.css"); -@import url("media-queries.css"); diff --git a/themes/10up-theme/assets/css/globals/.gitkeep b/themes/10up-theme/assets/css/globals/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/themes/10up-theme/assets/css/frontend/global/media-queries.css b/themes/10up-theme/assets/css/globals/media-queries.css similarity index 100% rename from themes/10up-theme/assets/css/frontend/global/media-queries.css rename to themes/10up-theme/assets/css/globals/media-queries.css diff --git a/themes/10up-theme/assets/css/globals/readme.md b/themes/10up-theme/assets/css/globals/readme.md new file mode 100644 index 0000000..9e13089 --- /dev/null +++ b/themes/10up-theme/assets/css/globals/readme.md @@ -0,0 +1,11 @@ +# PostCSS Globals + +Any individual `.css` files placed in this folder or any nested folder will automatically get loaded by the [@csstools/postcss-global-data](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-global-data) plugin. + +This ensures that the definitions defined in these files become available to all CSS entrypoints. So individual block styles, the main stylesheet, etc. all have access to these definitions. + +> [!WARNING] +> These CSS files should not produce any output. They are only meant to define global postcss features to become available to all entrypoints +> Also the loading order of these files should not matter at all. They get auto included via a glob expression. + +Mixins also get their special treatment. They have a special [`mixins`](../mixins/) folder located next to this `globals` folder diff --git a/themes/10up-theme/assets/css/mixins/.gitkeep b/themes/10up-theme/assets/css/mixins/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/themes/10up-theme/assets/css/mixins/readme.md b/themes/10up-theme/assets/css/mixins/readme.md new file mode 100644 index 0000000..0c3a007 --- /dev/null +++ b/themes/10up-theme/assets/css/mixins/readme.md @@ -0,0 +1,11 @@ +# PostCSS Global Mixins + +Any individual `.css` files placed in this folder or any nested folder will automatically get loaded by the [postcss-mixins](https://github.com/postcss/postcss-mixins) plugin. + +This ensures that the mixins defined in these files become available to all CSS entrypoints. So individual block styles, the main stylesheet, etc. all have access to these mixins. + +> [!WARNING] +> These CSS files should not produce any output. They are only meant to define global postcss features to become available to all entrypoints +> Also the loading order of these files should not matter at all. They get auto included via a glob expression. + +Other global definitions such as `@custom-media`, `@custom-selector`, etc. also get their special treatment. They have a special [`globals`](../globals/) folder located next to this `mixins` folder