Add CSS cascade layers for Compound, shared components, and app/web styles (#33302)
* Layer Compound and shared component CSS * Layer app theme CSS * Remove !important flags from ActionBarView * Remove unnecessary !important statements from shared components * Avoid dead code errors for *.pcss just because layer is specified after @import url * Remove unnecessary !important styling * Override Banner defaults in RoomStatusBarView * Updated snaps * Updated snaps * Fix styling of media body in app/web * Fix styling for Compound anchors * Fix styling issues in app/web * More styling fixes * Fix a problem extracting css for HTMLExport * Revert changes * Fix for theme styling * Add test to improve coverage * Prettier * Fix styling issues * Add data-kind attribute to avoid global styling override * Update screenshot that now is correct * Revert data-kind attribute * Handle LinkPreview styling in .pcss * Fix flaky test: Avoid racing the lazy-loaded ManageEventIndexDialog * Take care of review comments * Updated snaps * Updated snaps again after merge * Remove !important from RoomStatusBar
This commit is contained in:
@@ -163,9 +163,10 @@ b {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
a:hover,
|
||||
a:link,
|
||||
a:visited {
|
||||
/* Keep the legacy link colour without overriding Compound anchors. */
|
||||
a:where(:not([data-kind])):hover,
|
||||
a:where(:not([data-kind])):link,
|
||||
a:where(:not([data-kind])):visited {
|
||||
color: $accent-alt;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
/* 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);
|
||||
@import url("@vector-im/compound-web/dist/style.css");
|
||||
@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);
|
||||
|
||||
@@ -11,9 +11,8 @@ Please see LICENSE files in the repository root for full details.
|
||||
|
||||
/* Container for live recording and playback controls */
|
||||
.mx_MediaBody.mx_VoiceMessagePrimaryContainer {
|
||||
/* The waveform (right) has a 1px padding on it that we want to account for, otherwise */
|
||||
/* inherit from mx_MediaBody */
|
||||
padding-right: 11px;
|
||||
/* Match mx_MediaBody spacing, offsetting the waveform's 1px internal right padding. */
|
||||
padding: 6px 11px 6px 12px;
|
||||
|
||||
/* Cheat at alignment a bit */
|
||||
display: flex;
|
||||
|
||||
@@ -10,7 +10,7 @@ Please see LICENSE files in the repository root for full details.
|
||||
.mx_CompleteSecurityBody {
|
||||
color: $authpage-primary-color;
|
||||
background-color: $background;
|
||||
border-radius: 4px;
|
||||
border-radius: 24px;
|
||||
padding: 20px 20px 60px 20px;
|
||||
box-sizing: border-box;
|
||||
|
||||
|
||||
@@ -7,7 +7,6 @@ Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
.mx_MFileBody [data-type="download"] {
|
||||
color: $accent;
|
||||
height: var(--cpd-space-9x);
|
||||
|
||||
& object {
|
||||
|
||||
@@ -17,6 +17,8 @@ Please see LICENSE files in the repository root for full details.
|
||||
color: $secondary-content;
|
||||
font: var(--cpd-font-body-md-regular);
|
||||
line-height: $font-24px;
|
||||
}
|
||||
|
||||
padding: 6px 12px;
|
||||
.mx_MAudioBody > .mx_MediaBody {
|
||||
border-radius: var(--MBody-border-radius);
|
||||
}
|
||||
|
||||
@@ -19,3 +19,12 @@ Please see LICENSE files in the repository root for full details.
|
||||
opacity: unset; /* Unset the opacity value specified above on the search results panel */
|
||||
}
|
||||
}
|
||||
|
||||
.mx_TextualBody_urlPreviews {
|
||||
/* Let shared-components own preview link colours instead of the app-wide anchor colour. */
|
||||
a:where(:not([data-kind])):hover,
|
||||
a:where(:not([data-kind])):link,
|
||||
a:where(:not([data-kind])):visited {
|
||||
color: revert-layer;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,12 +26,22 @@ Please see LICENSE files in the repository root for full details.
|
||||
|
||||
&.mx_ThemeChoicePanel_themeSelector_disabled {
|
||||
border-color: var(--cpd-color-border-disabled);
|
||||
|
||||
.mx_ThemeChoicePanel_themeSelector_Label {
|
||||
color: var(--cpd-color-text-disabled);
|
||||
cursor: not-allowed;
|
||||
}
|
||||
}
|
||||
|
||||
.mx_ThemeChoicePanel_themeSelector_Label {
|
||||
color: var(--cpd-color-text-primary);
|
||||
font: var(--cpd-font-body-md-semibold);
|
||||
}
|
||||
|
||||
&:not(.mx_ThemeChoicePanel_themeSelector_disabled) {
|
||||
.mx_ThemeChoicePanel_themeSelector_Label {
|
||||
color: var(--cpd-color-text-primary);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,8 @@ Please see LICENSE files in the repository root for full details.
|
||||
|
||||
color: $primary-content;
|
||||
|
||||
a {
|
||||
/* Compound links carry data-kind and provide their own colour. */
|
||||
a:not([data-kind]) {
|
||||
color: $links;
|
||||
}
|
||||
|
||||
|
||||
@@ -10,7 +10,8 @@ Please see LICENSE files in the repository root for full details.
|
||||
|
||||
color: $primary-content;
|
||||
|
||||
a {
|
||||
/* Compound links carry data-kind and provide their own colour. */
|
||||
a:not([data-kind]) {
|
||||
color: $links;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
@import "../../../../res/css/_font-sizes.pcss";
|
||||
@import "../../legacy-light/css/_fonts.pcss";
|
||||
@import "../../legacy-light/css/_legacy-light.pcss";
|
||||
@import "../../legacy-dark/css/_legacy-dark.pcss";
|
||||
@import "../../light-custom/css/_custom.pcss";
|
||||
@import "../../../../res/css/_components.pcss";
|
||||
@layer compound-tokens, compound-web, shared-components, app-web;
|
||||
|
||||
@import "../../../../res/css/_font-sizes.pcss" layer(app-web);
|
||||
@import "../../legacy-light/css/_fonts.pcss" layer(app-web);
|
||||
@import "../../legacy-light/css/_legacy-light.pcss" layer(app-web);
|
||||
@import "../../legacy-dark/css/_legacy-dark.pcss" layer(app-web);
|
||||
@import "../../light-custom/css/_custom.pcss" layer(app-web);
|
||||
@import "../../../../res/css/_components.pcss" layer(app-web);
|
||||
@import "../../../../res/css/_compound.pcss";
|
||||
@import url("highlight.js/styles/atom-one-light.min.css");
|
||||
@import url("github-markdown-css/github-markdown-dark.css");
|
||||
@import url("highlight.js/styles/atom-one-light.min.css") layer(app-web);
|
||||
@import url("github-markdown-css/github-markdown-dark.css") layer(app-web);
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
@import "../../../../res/css/_font-sizes.pcss";
|
||||
@import "../../light/css/_fonts.pcss";
|
||||
@import "../../light/css/_light.pcss";
|
||||
@import "_dark.pcss";
|
||||
@import "../../light/css/_mods.pcss";
|
||||
@import "../../../../res/css/_components.pcss";
|
||||
@layer compound-tokens, compound-web, shared-components, app-web;
|
||||
|
||||
@import "../../../../res/css/_font-sizes.pcss" layer(app-web);
|
||||
@import "../../light/css/_fonts.pcss" layer(app-web);
|
||||
@import "../../light/css/_light.pcss" layer(app-web);
|
||||
@import "_dark.pcss" layer(app-web);
|
||||
@import "../../light/css/_mods.pcss" layer(app-web);
|
||||
@import "../../../../res/css/_components.pcss" layer(app-web);
|
||||
@import "../../../../res/css/_compound.pcss";
|
||||
@import url("highlight.js/styles/atom-one-dark.min.css");
|
||||
@import url("github-markdown-css/github-markdown-dark.css");
|
||||
@import url("highlight.js/styles/atom-one-dark.min.css") layer(app-web);
|
||||
@import url("github-markdown-css/github-markdown-dark.css") layer(app-web);
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
@import "../../../../res/css/_font-sizes.pcss";
|
||||
@import "../../legacy-light/css/_fonts.pcss";
|
||||
@import "../../legacy-light/css/_legacy-light.pcss";
|
||||
@import "_legacy-dark.pcss";
|
||||
@import "../../../../res/css/_components.pcss";
|
||||
@layer compound-tokens, compound-web, shared-components, app-web;
|
||||
|
||||
@import "../../../../res/css/_font-sizes.pcss" layer(app-web);
|
||||
@import "../../legacy-light/css/_fonts.pcss" layer(app-web);
|
||||
@import "../../legacy-light/css/_legacy-light.pcss" layer(app-web);
|
||||
@import "_legacy-dark.pcss" layer(app-web);
|
||||
@import "../../../../res/css/_components.pcss" layer(app-web);
|
||||
@import "../../../../res/css/_compound.pcss";
|
||||
@import url("highlight.js/styles/atom-one-dark.min.css");
|
||||
@import url("github-markdown-css/github-markdown-dark.css");
|
||||
@import url("highlight.js/styles/atom-one-dark.min.css") layer(app-web);
|
||||
@import url("github-markdown-css/github-markdown-dark.css") layer(app-web);
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
@import "../../../../res/css/_font-sizes.pcss";
|
||||
@import "_fonts.pcss";
|
||||
@import "_legacy-light.pcss";
|
||||
@import "../../../../res/css/_components.pcss";
|
||||
@layer compound-tokens, compound-web, shared-components, app-web;
|
||||
|
||||
@import "../../../../res/css/_font-sizes.pcss" layer(app-web);
|
||||
@import "_fonts.pcss" layer(app-web);
|
||||
@import "_legacy-light.pcss" layer(app-web);
|
||||
@import "../../../../res/css/_components.pcss" layer(app-web);
|
||||
@import "../../../../res/css/_compound.pcss";
|
||||
@import url("highlight.js/styles/atom-one-light.min.css");
|
||||
@import url("github-markdown-css/github-markdown-light.css");
|
||||
@import url("highlight.js/styles/atom-one-light.min.css") layer(app-web);
|
||||
@import url("github-markdown-css/github-markdown-light.css") layer(app-web);
|
||||
|
||||
@@ -25,16 +25,17 @@ $panels: var(--panels, var(--cpd-color-gray-600));
|
||||
$panel-actions: var(--panels-actions, var(--cpd-color-gray-300));
|
||||
|
||||
/* --timeline-background-color */
|
||||
$button-secondary-bg-color: var(--timeline-background-color);
|
||||
$lightbox-border-color: var(--timeline-background-color);
|
||||
$menu-bg-color: var(--timeline-background-color);
|
||||
$message-action-bar-bg-color: var(--timeline-background-color);
|
||||
$background: var(--timeline-background-color);
|
||||
$custom-theme-background: var(--timeline-background-color, var(--cpd-color-bg-canvas-default));
|
||||
$button-secondary-bg-color: $custom-theme-background;
|
||||
$lightbox-border-color: $custom-theme-background;
|
||||
$menu-bg-color: $custom-theme-background;
|
||||
$message-action-bar-bg-color: $custom-theme-background;
|
||||
$background: $custom-theme-background;
|
||||
$togglesw-ball-color: var(--cpd-color-bg-action-primary-rest);
|
||||
$togglesw-off-color: var(--togglesw-off-color);
|
||||
$droptarget-bg-color: var(--timeline-background-color-50pct); /* still needs alpha at .5 */
|
||||
$authpage-modal-bg-color: var(--timeline-background-color-50pct); /* still needs alpha at .59 */
|
||||
$roomheader-bg-color: var(--timeline-background-color);
|
||||
$roomheader-bg-color: $custom-theme-background;
|
||||
|
||||
/* --roomlist-highlights-color */
|
||||
$panel-actions: var(--roomlist-highlights-color);
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
@import "../../../../res/css/_font-sizes.pcss";
|
||||
@import "../../legacy-light/css/_fonts.pcss";
|
||||
@import "../../legacy-light/css/_legacy-light.pcss";
|
||||
@import "_custom.pcss";
|
||||
@import "../../../../res/css/_components.pcss";
|
||||
@layer compound-tokens, compound-web, shared-components, app-web;
|
||||
|
||||
@import "../../../../res/css/_font-sizes.pcss" layer(app-web);
|
||||
@import "../../legacy-light/css/_fonts.pcss" layer(app-web);
|
||||
@import "../../legacy-light/css/_legacy-light.pcss" layer(app-web);
|
||||
@import "_custom.pcss" layer(app-web);
|
||||
@import "../../../../res/css/_components.pcss" layer(app-web);
|
||||
@import "../../../../res/css/_compound.pcss";
|
||||
@import url("highlight.js/styles/atom-one-light.min.css");
|
||||
@import url("github-markdown-css/github-markdown-light.css");
|
||||
@import url("highlight.js/styles/atom-one-light.min.css") layer(app-web);
|
||||
@import url("github-markdown-css/github-markdown-light.css") layer(app-web);
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
@import "../../../../res/css/_font-sizes.pcss";
|
||||
@import "../../light/css/_fonts.pcss";
|
||||
@import "../../light/css/_light.pcss";
|
||||
@import "_light-high-contrast.pcss";
|
||||
@import "../../light/css/_mods.pcss";
|
||||
@import "../../../../res/css/_components.pcss";
|
||||
@layer compound-tokens, compound-web, shared-components, app-web;
|
||||
|
||||
@import "../../../../res/css/_font-sizes.pcss" layer(app-web);
|
||||
@import "../../light/css/_fonts.pcss" layer(app-web);
|
||||
@import "../../light/css/_light.pcss" layer(app-web);
|
||||
@import "_light-high-contrast.pcss" layer(app-web);
|
||||
@import "../../light/css/_mods.pcss" layer(app-web);
|
||||
@import "../../../../res/css/_components.pcss" layer(app-web);
|
||||
@import "../../../../res/css/_compound.pcss";
|
||||
@import url("highlight.js/styles/atom-one-light.min.css");
|
||||
@import url("github-markdown-css/github-markdown-light.css");
|
||||
@import url("highlight.js/styles/atom-one-light.min.css") layer(app-web);
|
||||
@import url("github-markdown-css/github-markdown-light.css") layer(app-web);
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
@import "../../../../res/css/_font-sizes.pcss";
|
||||
@import "_fonts.pcss";
|
||||
@import "_light.pcss";
|
||||
@import "_mods.pcss";
|
||||
@import "../../../../res/css/_components.pcss";
|
||||
@layer compound-tokens, compound-web, shared-components, app-web;
|
||||
|
||||
@import "../../../../res/css/_font-sizes.pcss" layer(app-web);
|
||||
@import "_fonts.pcss" layer(app-web);
|
||||
@import "_light.pcss" layer(app-web);
|
||||
@import "_mods.pcss" layer(app-web);
|
||||
@import "../../../../res/css/_components.pcss" layer(app-web);
|
||||
@import "../../../../res/css/_compound.pcss";
|
||||
@import url("highlight.js/styles/atom-one-light.min.css");
|
||||
@import url("github-markdown-css/github-markdown-light.css");
|
||||
@import url("highlight.js/styles/atom-one-light.min.css") layer(app-web);
|
||||
@import url("github-markdown-css/github-markdown-light.css") layer(app-web);
|
||||
|
||||
Reference in New Issue
Block a user