Skip to content

Use semantic theme color variables, including global primary/secondary colors #19467

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

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 @@ -9,9 +9,9 @@

@braintree-input-border__color: @color-gray76;

@braintree-error__color: @color-red10;
@braintree-focus__color: @color-blue2;
@braintree-success__color: @color-dark-green1;
@braintree-error__color: @message-error__color;
@braintree-focus__color: @theme__color__primary-alt;
@braintree-success__color: @message-success__color;

@braintree-paypal-icon__height: 16px;
@braintree-paypal-icon__width: 16px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
@checkout-progress-bar-item__color: @primary__color;
@checkout-progress-bar-item__margin: @indent__s;
@checkout-progress-bar-item__width: 185px;
@checkout-progress-bar-item__active__background-color: @color-orange-red1;
@checkout-progress-bar-item__active__background-color: @active__color;
@checkout-progress-bar-item__complete__color: @link__color;

@checkout-progress-bar-item-element__height: @checkout-progress-bar-item-element__width;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
@checkout-shipping-item__width: 100%/3;
@checkout-shipping-item-tablet__width: 100%/2;
@checkout-shipping-item-mobile__width: 100%;
@checkout-shipping-item__active__border-color: @color-orange-red1;
@checkout-shipping-item__active__border-color: @active__color;

@checkout-shipping-item-icon__selected__height: 27px;
@checkout-shipping-item-icon__selected__width: 29px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
@account-nav-color: false;

@account-nav-current-border: 3px solid transparent;
@account-nav-current-border-color: @color-orange-red1;
@account-nav-current-border-color: @active__color;
@account-nav-current-color: false;
@account-nav-current-font-weight: @font-weight__semibold;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
}

.error-block {
color: @color-red10;
color: @error__color;

.error-label {
font-weight: @font-weight__bold;
Expand Down Expand Up @@ -222,7 +222,7 @@
}

.error-description {
color: @color-red10;
color: @error__color;
font-weight: @font-weight__regular;
margin-bottom: @indent__s;
margin-top: -@indent__s;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

@swatch-option__selected__border: @swatch-option__hover__border;
@swatch-option__selected__color: @swatch-option__hover__color;
@swatch-option__selected__outline: 2px solid @color-orange-red1;
@swatch-option__selected__outline: 2px solid @active__color;

@swatch-option__disabled__background: @color-red10;

Expand All @@ -38,7 +38,7 @@

// Image and Color swatch
@img-color-swatch-option__hover__border: @swatch-option__hover__border;
@img-color-swatch-option__hover__outline: 2px solid #e00;
@img-color-swatch-option__hover__outline: 2px solid darken(@active__color, 12%);

// Tooltip
@swatch-option-tooltip__background: @color-white;
Expand All @@ -54,7 +54,7 @@
@swatch-option-tooltip-layered-title__color: @swatch-option-tooltip-title__color;

// Layered Features
@swatch-option-link-layered__focus__box-shadow: 0 0 3px 1px @color-sky-blue1;
@swatch-option-link-layered__focus__box-shadow: 0 0 3px 1px @focus__color;

//
// Common
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,12 +145,6 @@
}

&:extend(.abs-adjustment-incl-excl-tax all);

.action {
&.multicheckout {
color: @color-blue2;
}
}
}

// Totals block
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
@checkout-progress-bar-item__transition: background .3s;
@checkout-progress-bar-item__width: 185px;

@checkout-progress-bar-item__active__background-color: @color-orange-red1;
@checkout-progress-bar-item__active__background-color: @active__color;
@checkout-progress-bar-item__active__color: @primary__color;
@checkout-progress-bar-item__active__font-weight: @font-weight__semibold;
@checkout-progress-bar-item__complete__color: @link__color;
Expand All @@ -32,7 +32,7 @@
@checkout-progress-bar-item-element-inner__color: @primary__color;
@checkout-progress-bar-item-element-inner__height: @checkout-progress-bar-item-element-inner__width;
@checkout-progress-bar-item-element-inner__width: @checkout-progress-bar-item-element__width - ( @checkout-progress-bar-item-element-outer-radius__width*2 );
@checkout-progress-bar-item-element-inner__active__border-color: @color-orange-red1;
@checkout-progress-bar-item-element-inner__active__border-color: @active__color;
@checkout-progress-bar-item-element-inner__active__content: @icon-checkmark;

@checkout-progress-bar-item-element-outer-radius__width: 6px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
@checkout-shipping-item__width: 100%/3;
@checkout-shipping-item-tablet__width: 100%/2;
@checkout-shipping-item-mobile__width: 100%;
@checkout-shipping-item__active__border-color: @color-orange-red1;
@checkout-shipping-item__active__border-color: @active__color;

@checkout-shipping-item-icon__selected__height: 27px;
@checkout-shipping-item-icon__selected__width: 29px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
@gift-item-block__border-color: @color-gray-light5;
@gift-item-block__border-width: @border-width__base;

@gift-item-block-title__color: @color-blue1;
@gift-item-block-title__color: @link__color;
@gift-item-block-title-icon__content: @icon-down;
@gift-item-block-title-icon__active__content: @icon-up;
@gift-item-block-title-icon__color: @color-gray52;
Expand Down Expand Up @@ -60,8 +60,8 @@
}

.gift-summary {
position: relative;
margin-top: @indent__s;
position: relative;

.actions-toolbar {
> .secondary {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

&[data-count]:after {
.lib-css(color, @color-white);
background: @color-orange-red1;
background: @theme__color__secondary;
border-radius: 2px;
content: attr(data-count);
display: inline-block;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
}

.error-block {
color: @color-red10;
color: @error__color;

.error-label {
font-weight: @font-weight__bold;
Expand Down Expand Up @@ -230,7 +230,7 @@
}

.error-description {
color: @color-red10;
color: @error__color;
font-weight: @font-weight__regular;
margin-bottom: @indent__s;
margin-top: -@indent__s;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1859,7 +1859,7 @@

> .title {
strong {
color: @color-blue1;
color: @link__color;
font-weight: @font-weight__regular;
}
}
Expand Down
10 changes: 2 additions & 8 deletions app/design/frontend/Magento/luma/web/css/source/_theme.less
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
@h3__margin-top: @indent__base;

// Links
@link__color: @color-blue2;
@link__color: @theme__color__primary-alt;

// Focus
@focus__color: @color-blue3;
Expand Down Expand Up @@ -60,14 +60,9 @@

@navigation__background: @color-gray94;
@navigation-level0-item__active__color: @primary__color;
@navigation-level0-item__active__border-color: @active__color;
@navigation-desktop-level0-item__active__border-color: @active__color;

@submenu-desktop-item__active__border-color: @active__color;
@submenu-item__active__border-color: @active__color;
@submenu-item__active__color: @navigation-level0-item__active__color;


// Desktop navigation
@navigation-desktop-level0-item__line-height: 47px;
@submenu-desktop__font-weight: @font-weight__regular;
Expand Down Expand Up @@ -225,7 +220,6 @@

@rating-icon__font-size: 16px;
@rating-icon__letter-spacing: 2px;
@rating-icon__active__color: @active__color;

//
// Dropdowns
Expand All @@ -252,7 +246,7 @@
@breadcrumbs-icon__font-margin: 0 @indent__s;

@breadcrumbs-current__color: @color-gray-middle5;
@breadcrumbs-link__color: @color-blue2;
@breadcrumbs-link__color: @link__color;
@breadcrumbs-link__visited__color: @breadcrumbs-link__color;
@breadcrumbs-link__hover__color: @breadcrumbs-link__color;
@breadcrumbs-link__active__color: @breadcrumbs-link__color;
Expand Down
8 changes: 4 additions & 4 deletions lib/web/css/source/lib/variables/_buttons.less
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,14 @@
@button-primary__gradient: false;
@button-primary__gradient-direction: false;

@button-primary__background: @color-blue1;
@button-primary__border: 1px solid @color-blue1;
@button-primary__background: @theme__color__primary;
@button-primary__border: 1px solid @theme__color__primary;
@button-primary__color: @color-white;
@button-primary__gradient-color-start: false;
@button-primary__gradient-color-end: false;

@button-primary__hover__background: @color-blue2;
@button-primary__hover__border: 1px solid @color-blue2;
@button-primary__hover__background: @theme__color__primary-alt;
@button-primary__hover__border: 1px solid @theme__color__primary-alt;
@button-primary__hover__color: @button-primary__color;
@button-primary__hover__gradient-color-start: false;
@button-primary__hover__gradient-color-end: false;
Expand Down
8 changes: 6 additions & 2 deletions lib/web/css/source/lib/variables/_colors.less
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
@color-sky-blue1: #68a8e0;

@color-pink1: #fae5e5;
@color-dark-pink1: #800080;
@color-dark-pink1: #800080; // Legacy pink

@color-brownie1: #6f4400;
@color-brownie-light1: #c07600;
Expand All @@ -92,6 +92,10 @@
// Color nesting
// ---------------------------------------------

@theme__color__primary: @color-blue1;
@theme__color__primary-alt: @color-blue2;
@theme__color__secondary: @color-orange-red1;

@primary__color: @color-gray20;
@primary__color__dark: darken(@primary__color, 35%); // #000
@primary__color__darker: darken(@primary__color, 13.5%); // #111
Expand All @@ -104,5 +108,5 @@
@page__background-color: @color-white;
@panel__background-color: darken(@page__background-color, 6%);

@active__color: @color-orange-red1;
@active__color: @theme__color__secondary;
@error__color: @color-red10;
8 changes: 4 additions & 4 deletions lib/web/css/source/lib/variables/_navigation.less
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
@navigation-level0-item__text-decoration: none;

@navigation-level0-item__active__background: '';
@navigation-level0-item__active__border-color: @color-orange-red1;
@navigation-level0-item__active__border-color: @active__color;
@navigation-level0-item__active__border-style: solid;
@navigation-level0-item__active__border-width: 0 0 0 8px;
@navigation-level0-item__active__color: '';
Expand All @@ -47,7 +47,7 @@

@submenu-item__active__background: '';
@submenu-item__active__border: 8px;
@submenu-item__active__border-color: @color-orange-red1;
@submenu-item__active__border-color: @active__color;
@submenu-item__active__border-style: solid;
@submenu-item__active__border-width: 0 0 0 @submenu-item__active__border;
@submenu-item__active__color: '';
Expand Down Expand Up @@ -77,7 +77,7 @@
@navigation-desktop-level0-item__hover__text-decoration: @navigation-desktop-level0-item__text-decoration;

@navigation-desktop-level0-item__active__background: '';
@navigation-desktop-level0-item__active__border-color: @color-orange-red1;
@navigation-desktop-level0-item__active__border-color: @active__color;
@navigation-desktop-level0-item__active__border-style: solid;
@navigation-desktop-level0-item__active__border-width: 0 0 3px;
@navigation-desktop-level0-item__active__color: @navigation-desktop-level0-item__hover__color;
Expand Down Expand Up @@ -109,7 +109,7 @@
@submenu-desktop-item__hover__text-decoration: @navigation-desktop-level0-item__text-decoration;

@submenu-desktop-item__active__background: '';
@submenu-desktop-item__active__border-color: @color-orange-red1;
@submenu-desktop-item__active__border-color: @active__color;
@submenu-desktop-item__active__border-style: solid;
@submenu-desktop-item__active__border-width: 0 0 0 3px;
@submenu-desktop-item__active__color: '';
Expand Down
2 changes: 1 addition & 1 deletion lib/web/css/source/lib/variables/_rating.less
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
@rating-icon__letter-spacing: -10px;
@rating-icon__color: @color-gray78;

@rating-icon__active__color: @color-orange-red1;
@rating-icon__active__color: @active__color;

@rating-label__hide: false;
4 changes: 2 additions & 2 deletions lib/web/css/source/lib/variables/_typography.less
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,13 @@
// Links
// ---------------------------------------------

@link__color: @color-blue1;
@link__color: @theme__color__primary;
@link__text-decoration: none;

@link__visited__color: @link__color;
@link__visited__text-decoration: none;

@link__hover__color: @color-blue2;
@link__hover__color: @theme__color__primary-alt;
@link__hover__text-decoration: underline;

@link__active__color: @active__color;
Expand Down
6 changes: 3 additions & 3 deletions lib/web/mage/gallery/gallery.less
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,8 @@

.fotorama__active {
.fotorama__dot {
background-color: @color-orange-red1;
border-color: @color-orange-red1;
background-color: @active__color;
border-color: @active__color;
}
}

Expand Down Expand Up @@ -237,7 +237,7 @@
&:extend(.fotorama-print-background);
backface-visibility: hidden;
background-image: linear-gradient(to bottom right, rgba(255, 255, 255, 0.25), rgba(64, 64, 64, 0.1));
border: 1px solid @color-orange-red1;
border: 1px solid @active__color;
left: 0;
position: absolute;
top: 0;
Expand Down
2 changes: 1 addition & 1 deletion lib/web/mage/gallery/module/_extends.less
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
.fotorama-focus-overlay {
&:after {
&:extend(.fotorama-stretch);
background-color: @color-blue2;
background-color: @theme__color__primary-alt;
border-radius: inherit;
content: '';
}
Expand Down