Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SHS-5673: add color variables to wysiwyg css #1566

Merged
merged 1 commit into from
Jun 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// the dependencies and the files we need. See _main.scss and
// _base.scss for reference.
@charset 'UTF-8';
@use "sass:map";

// Here we add the path to Font Awesome. This is copied from _main.scss
// and necessary for icons in CKEditor styles.
Expand Down Expand Up @@ -30,7 +31,7 @@ $px-only: true;
"../tools/mixins.buttons", "../tools/mixins.menu-icons",
"../tools/mixins.icons", "../tools/mixins.lists", "../tools/mixins.tables",
"../tools/mixins.heros", "../tools/mixins.slick", "../tools/keyframes.text",
"../utilities/color-pairings", "../utilities/fonts", "../utilities/font-awesome", "../utilities/general",
"../utilities/color-pairings", "../utilities/fonts", "../utilities/font-awesome", "../utilities/general",
"../utilities/lists", "../utilities/raised-cards",
"../utilities/tables", "../utilities/display-more-link-text",
"../utilities/dark-pattern", "../utilities/caption-credit", "../utilities/media-embeds",
Expand All @@ -40,6 +41,26 @@ $px-only: true;

// See _base.scss in basic theme. We only need the below for CKEditor.
// Otherwise styles affect the entire admin UI.
:root {
@include hb-themes(("colorful", "airy")) {
@each $color, $value in map.get($hc-colorful-pairings, $hb-colorful-default) {
--palette--#{$color}: #{$value};
}
@each $color, $value in $hc-colorful-globals {
--palette--#{$color}: #{$value};
}
}

@include hb-traditional {
@each $color, $value in map.get($ht-traditional-pairings, $hb-traditional-default) {
--palette--#{$color}: #{$value};
}
@each $color, $value in $ht-traditional-globals {
--palette--#{$color}: #{$value};
}
}
}

.ck-editor__main {
@include font-smoothing;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// COLORFUL

$hb-colorful-default: 'cardinal';

// Each color pairing has a palette of color swatches
$hc-colorful-pairings: (
'ocean': (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// TRADITIONAL

$hb-traditional-default: 'cardinal';

// Each color pairing has a palette of color swatches
$ht-traditional-pairings: (
'cardinal': (
Expand Down