Tweak CSS bundling to dedupe more styles (#34371)
* Tweak CSS bundling to dedupe more styles Previously all of compound-web & compound-design-tokens were duplicated amongst all the themes rather than just being in `bundle.css`. * Fix highlight.js & github-markdown-css dark/light * Fix highlight.js & github-markdown-css dark/light * Iterate
This commit is contained in:
@@ -12,7 +12,6 @@ Please see LICENSE files in the repository root for full details.
|
||||
@import "./_font-sizes.pcss";
|
||||
@import "./_animations.pcss";
|
||||
@import "./_spacing.pcss";
|
||||
@import url("maplibre-gl/dist/maplibre-gl.css");
|
||||
|
||||
:root {
|
||||
--container-border-width: 8px;
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
/* Shared cascade order: Compound tokens, Compound Web, shared components, then app overrides. */
|
||||
@layer compound-tokens, compound-web, shared-components, app-web;
|
||||
|
||||
/* Modules bundled with compound apply compound lastly. In order to catch issue due to css class ordering, we put compound at the end */
|
||||
@import url("@vector-im/compound-design-tokens/assets/web/css/compound-design-tokens.css") layer(compound-tokens);
|
||||
@import url("@vector-im/compound-web/dist/style.css") layer(compound-web);
|
||||
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
Copyright 2026 Element Creations Ltd.
|
||||
|
||||
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
|
||||
Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
@layer compound-tokens, compound-web, shared-components, app-web;
|
||||
|
||||
@import url("maplibre-gl/dist/maplibre-gl.css") layer(app-web);
|
||||
@import url("@vector-im/compound-design-tokens/assets/web/css/compound-design-tokens.css") layer(compound-tokens);
|
||||
@import url("@vector-im/compound-web/dist/style.css") layer(compound-web);
|
||||
@import url("@element-hq/web-shared-components/dist/element-web-shared-components.css") layer(shared-components);
|
||||
@@ -8,7 +8,7 @@ cd `dirname $0`
|
||||
# we used to have exclude /themes from the find at this point.
|
||||
# as themes are no longer a spurious subdirectory of css/, we don't
|
||||
# need it any more.
|
||||
find . -iname _\*.pcss | fgrep -v _components.pcss | fgrep -v _compound.pcss | LC_ALL=C sort |
|
||||
find . -iname _\*.pcss | fgrep -v _components.pcss | fgrep -v _index.pcss | LC_ALL=C sort |
|
||||
while read i; do
|
||||
echo "@import \"$i\";"
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user