Skip to content

Commit

Permalink
fix: prevent breaking change to topper API.
Browse files Browse the repository at this point in the history
  • Loading branch information
frshwtr committed Jan 23, 2025
1 parent f2effbc commit 8e6faed
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 10 deletions.
1 change: 1 addition & 0 deletions components/o-topper/src/scss/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@

@mixin _oTopperColors($colors) {
@each $color in $colors {
$color: if($color == 'matisse', 'o3-color-palette-#{$color}-blue', 'o3-color-palette-#{$color}');
.o-topper--color-#{$color} {
@include _oTopperColor($color);
}
Expand Down
20 changes: 10 additions & 10 deletions components/o-topper/src/scss/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@ $o-topper-is-silent: true !default;
/// @prop {List} - colours available to editorial in methode for the background
/// @access private
$_o-topper-colors: (
'o3-color-palette-white',
'o3-color-palette-black',
'o3-color-palette-claret',
'o3-color-palette-oxford',
'o3-color-palette-paper',
'o3-color-palette-slate',
'o3-color-palette-wheat',
'o3-color-palette-crimson',
'o3-color-palette-sky',
'o3-color-palette-matisse-blue'
'white',
'black',
'claret',
'oxford',
'paper',
'slate',
'wheat',
'crimson',
'sky',
'matisse'
);

/// When adding a new theme update the README
Expand Down
1 change: 1 addition & 0 deletions components/o-topper/src/scss/themes/_deep-landscape.scss
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@


@each $color-name in $colors {
$color-name: if($color-name == 'matisse', 'o3-color-palette-#{$color-name}-blue', 'o3-color-palette-#{$color-name}');
&.o-topper--color-#{$color-name} {
$background: oPrivateFoundationGet($color-name);
$foreground: oPrivateColorsGetTextColor($background, $opacity: 100);
Expand Down
1 change: 1 addition & 0 deletions components/o-topper/src/scss/themes/_deep-portrait.scss
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
}

@each $color-name in $colors {
$color-name: if($color-name == 'matisse', 'o3-color-palette-#{$color-name}-blue', 'o3-color-palette-#{$color-name}');
&.o-topper--color-#{$color-name} {
.o-topper__image-caption {
$background: oPrivateFoundationGet($color-name);
Expand Down

0 comments on commit 8e6faed

Please sign in to comment.