Skip to content

Commit

Permalink
Put calculations in less files in brackets if they were not there alr…
Browse files Browse the repository at this point in the history
…eady, this fixes generating correct css again after the upgrade to less.js v4 in AC-8098 & AC-9713.
  • Loading branch information
hostep committed Jan 7, 2024
1 parent 1b2e87c commit 79b2f37
Show file tree
Hide file tree
Showing 110 changed files with 366 additions and 365 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
position: absolute;
right: -1px;
top: 100%;
z-index: @z-index-5 - 2;
z-index: (@z-index-5 - 2);

._active & {
display: block;
Expand All @@ -115,7 +115,7 @@
@_triangle__width: @message-system-triangle__width;
@_triangle__color: @message-system__color;
@_triangle__hover__color: darken(@message-system__color, 10%);
@_triangle__right: (@message-system-triangle__padding-right / 2) - (@message-system-triangle__width/ 2);
@_triangle__right: ((@message-system-triangle__padding-right / 2) - (@message-system-triangle__width/ 2));
);
}

Expand All @@ -139,8 +139,8 @@
.notices-wrapper {
.admin__data-grid-loading-mask {
display: none;
min-height: @message-system-short-wrapper__height + @message-system__border-width;
z-index: @z-index-5 - 1;
min-height: (@message-system-short-wrapper__height + @message-system__border-width);
z-index: (@z-index-5 - 1);
}

.admin__data-grid-outer-wrap {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
// ---------------------------------------------

@page-header__indent-horizontal: @content__indent;
@page-header__indent-vertical: @content__indent / 2;
@page-header__indent-vertical: (@content__indent / 2);

//

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
// Variables
// ---------------------------------------------

@menu-wrapper__z-index: @menu__z-index - 1;
@menu-wrapper__z-index: (@menu__z-index - 1);

@menu__background-color: @color-very-dark-grayish-orange;

@menu-logo__padding-bottom: 1.7rem;
@menu-logo__outer-size: @menu-logo__padding-top + @menu-logo-img__height + @menu-logo__padding-bottom;
@menu-logo__outer-size: (@menu-logo__padding-top + @menu-logo-img__height + @menu-logo__padding-bottom);
@menu-logo__padding-top: 1.7rem;
@menu-logo-img__height: 4.1rem;
@menu-logo-img__width: 3.5rem;
Expand All @@ -31,12 +31,12 @@
@menu-line-before__background-color: @color-brownie-vanilla;
@menu-line-before__height: 1px;

@menu-overlay__z-index: @menu__z-index - 3;
@menu-overlay__z-index: (@menu__z-index - 3);

@submenu__background-color: @menu-item__active__background-color;
@submenu__padding-horizontal: 1.5rem;
@submenu__padding-vertical: 2rem;
@submenu__z-index: @menu__z-index - 2;
@submenu__z-index: (@menu__z-index - 2);
@submenu__height: 720px;
@submenu-column__width: 23.8rem;
@submenu-column__width__l: 19.8rem;
Expand Down Expand Up @@ -119,7 +119,7 @@

.logo {
display: block;
height: @menu-logo-img__height + @menu-logo__padding-top + @menu-logo__padding-bottom;
height: (@menu-logo-img__height + @menu-logo__padding-top + @menu-logo__padding-bottom);
padding: @menu-logo__padding-top 0 @menu-logo__padding-bottom;
position: relative;
text-align: center;
Expand Down Expand Up @@ -181,7 +181,7 @@
display: block;
height: @menu-line-before__height;
left: 0;
margin-left: (100% - @_menu-separator__width) / 2;
margin-left: ((100% - @_menu-separator__width) / 2);
position: absolute;
top: 0;
width: @_menu-separator__width;
Expand Down Expand Up @@ -265,7 +265,7 @@
transition-property: transform, visibility;
transition-timing-function: ease-in-out;
visibility: hidden;
z-index: @submenu__z-index - 1;
z-index: (@submenu__z-index - 1);

.ie11 & {
height: 100%;
Expand Down Expand Up @@ -305,8 +305,8 @@

&:active {
background-color: @submenu-link__active__background-color;
padding-bottom: @submenu-link__padding-vertical - .1rem;
padding-top: @submenu-link__padding-vertical + .1rem;
padding-bottom: (@submenu-link__padding-vertical - .1rem);
padding-top: (@submenu-link__padding-vertical + .1rem);
}
}
}
Expand Down Expand Up @@ -363,16 +363,16 @@
display: block;
font-size: 2.2rem;
font-weight: @font-weight__semibold;
margin-bottom: .4rem + @submenu-heading-group__indent-bottom;
margin-left: @submenu__padding-horizontal * 2;
margin-right: @submenu__padding-horizontal * 2 + @submenu-action-close__indent-right;
margin-bottom: (.4rem + @submenu-heading-group__indent-bottom);
margin-left: (@submenu__padding-horizontal * 2);
margin-right: (@submenu__padding-horizontal * 2 + @submenu-action-close__indent-right);
}

.submenu-sub-title {
color: @submenu-title__color;
display: block;
font-size: @font-size__s;
margin: -(@submenu-heading-group__indent-bottom) @submenu__padding-horizontal * 2 + @submenu-action-close__indent-right 3.8rem @submenu__padding-horizontal * 2;
margin: -(@submenu-heading-group__indent-bottom) (@submenu__padding-horizontal * 2 + @submenu-action-close__indent-right) 3.8rem (@submenu__padding-horizontal * 2);
}

.action-close {
Expand Down Expand Up @@ -404,7 +404,7 @@

content: @icon-dashboard__content;
font-size: @_menu-item-dashboard__size;
padding-top: @menu-item-icon__height - @_menu-item-dashboard__size;
padding-top: (@menu-item-icon__height - @_menu-item-dashboard__size);
}
}
}
Expand Down Expand Up @@ -433,7 +433,7 @@
content: @icon-customers__content;
font-size: @_menu-item-dashboard__size;
position: relative;
top: @menu-item-icon__height - @_menu-item-dashboard__size;
top: (@menu-item-icon__height - @_menu-item-dashboard__size);
}
}
}
Expand All @@ -445,7 +445,7 @@

content: @icon-promotions__content;
font-size: @_menu-item-dashboard__size;
padding-top: @menu-item-icon__height - @_menu-item-dashboard__size;
padding-top: (@menu-item-icon__height - @_menu-item-dashboard__size);
}
}
}
Expand All @@ -458,7 +458,7 @@
content: @icon-cms__content;
font-size: @_menu-item-dashboard__size;
position: relative;
top: @menu-item-icon__height - @_menu-item-dashboard__size;
top: (@menu-item-icon__height - @_menu-item-dashboard__size);
}
}
}
Expand All @@ -478,7 +478,7 @@

content: @icon-stores__content;
font-size: @_menu-item-dashboard__size;
padding-top: @menu-item-icon__height - @_menu-item-dashboard__size;
padding-top: (@menu-item-icon__height - @_menu-item-dashboard__size);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
// Variables
// ---------------------------------------------

@page-header-action__height: @action__height + .1rem;
@page-header-action__height: (@action__height + .1rem);

//

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@
@page-title__font-size: 2.8rem;

// Breadcrumbs component not included in common styles, but title used it
@page-title-breadcrumbs__min-height: round(@page-title-breadcrumb__font-size * @line-height__base, 1);
@page-title-breadcrumbs__min-height: round((@page-title-breadcrumb__font-size * @line-height__base), 1);
@page-title-breadcrumb__font-size: @font-size__s;

//

.page-header-hgroup {
padding-right: @content__indent / 2;
padding-right: (@content__indent / 2);
}

//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
// Variables
// ---------------------------------------------

@notifications__font-size: round(@font-size__s - .1rem, 1);
@notifications__font-size: round((@font-size__s - .1rem), 1);
@notifications__color: @color-gray20;

@notifications-action__color: @text__color;
@notifications-action__padding-bottom: (@page-header-action__height - @notifications-action-icon__size) / 2 - .05rem;
@notifications-action__padding-bottom: ((@page-header-action__height - @notifications-action-icon__size) / 2 - .05rem);
@notifications-action__padding-side: 2rem;
@notifications-action__padding-top: (@page-header-action__height - @notifications-action-icon__size) / 2 + .05rem;
@notifications-action__padding-top: ((@page-header-action__height - @notifications-action-icon__size) / 2 + .05rem);
@notifications-action__hover__color: darken(@action-dropdown__color, 20%);
@notifications-action-icon__size: 1.9rem;
@notifications-action-menu__z-index: @header__z-index;
Expand Down Expand Up @@ -49,7 +49,7 @@
border: none;
content: '';
display: block;
height: @component__shadow-size__base + 1;
height: (@component__shadow-size__base + 1);
left: -(@component__shadow-size__base + 1);
margin-top: 0;
position: absolute;
Expand Down Expand Up @@ -177,7 +177,7 @@
.notifications-close {
&:extend(.abs-action-reset all);
line-height: 1;
padding: @notifications-action__padding-side / 2;
padding: (@notifications-action__padding-side / 2);
position: absolute;
right: 0;
top: .6rem;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,18 @@
// Variables
// ---------------------------------------------

@search-global__z-index: @user-account-menu__z-index - 10; // Should be lower than user account
@search-global__z-index: (@user-account-menu__z-index - 10); // Should be lower than user account

@search-global-field__width: @search-global-input__width;

@search-global-input__font-size: @font-size__base;
@search-global-input__height: @page-header-action__height;
@search-global-input__padding-bottom: (@search-global-input__height - @search-global-icon__height) / 2 - .1rem;
@search-global-input__padding-top: (@search-global-input__height - @search-global-icon__height) / 2 + .1rem;
@search-global-input__padding-bottom: ((@search-global-input__height - @search-global-icon__height) / 2 - .1rem);
@search-global-input__padding-top: ((@search-global-input__height - @search-global-icon__height) / 2 + .1rem);
@search-global-input__padding-side: @font-size__base;
@search-global-input__width: @search-global-icon__width + @search-global-input__padding-side * 2;
@search-global-input__width: (@search-global-icon__width + @search-global-input__padding-side * 2);

@search-global-input__active__padding-right: @search-global-icon__height + 2rem;
@search-global-input__active__padding-right: (@search-global-icon__height + 2rem);
@search-global-input__active__width: 25rem;

@search-global-label-icon__color: @text__color;
Expand Down Expand Up @@ -60,7 +60,7 @@
right: 0;
text-indent: -100%;
top: 0;
width: @search-global-icon__width + @search-global-input__padding-side * 2;
width: (@search-global-icon__width + @search-global-input__padding-side * 2);
z-index: 3;
}
}
Expand Down Expand Up @@ -155,7 +155,7 @@
background-color: transparent;
border: 1px solid transparent;
font-size: @search-global-input__font-size;
height: @search-global-input__height + .2;
height: (@search-global-input__height + .2);
padding: @search-global-input__padding-top @search-global-input__padding-side @search-global-input__padding-bottom;
position: absolute;
right: 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
@user-account__padding-right: 2.8rem;

@user-account-menu__min-width: 20rem;
@user-account-menu__z-index: @notifications-action-menu__z-index - 10; // Should be lower than notifications
@user-account-menu__z-index: (@notifications-action-menu__z-index - 10); // Should be lower than notifications
@user-account-menu__hover__background-color: @action__hover__background-color;
@user-account-menu__active__background-color: darken(@color-blue-clear-sky, 5%);

Expand Down Expand Up @@ -61,7 +61,7 @@
content: @icon-account__content;
font-size: @_icon-user__size;
left: 1.1rem;
margin-top: -(@_icon-user__size / 2) - .1rem;
margin-top: (-(@_icon-user__size / 2) - .1rem);
position: absolute;
top: 50%;
}
Expand Down Expand Up @@ -113,5 +113,5 @@
.admin-user-account-text {
.lib-text-overflow-ellipsis();
display: inline-block;
max-width: @user-account-menu__min-width - @user-account__padding-left - @user-account__padding-right - 2rem;
max-width: (@user-account-menu__min-width - @user-account__padding-left - @user-account__padding-right - 2rem);
}
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
position: fixed;
right: 0;
top: 0;
z-index: @page-actions__fixed__z-index + 101;
z-index: (@page-actions__fixed__z-index + 101);

.page-actions-inner {
&:before {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
.store-switcher {
color: @text__color;
float: left;
font-size: round(@font-size__base - .1rem, 1);
font-size: round((@font-size__base - .1rem), 1);
margin-top: .59rem;

.admin__action-dropdown {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
@dashboard-secondary-table-col-name__width-px: 135px;
@dashboard-secondary-table-col-value__width-px: 50px;

@dashboard-secondary-table-col-name__width-pct: @dashboard-secondary-table-col-name__width-px * 100% / @dashboard-secondary-table__width-px; // 57.44680851%
@dashboard-secondary-table-col-value__width-pct: @dashboard-secondary-table-col-value__width-px * 100% / @dashboard-secondary-table__width-px; // 21.27659574%
@dashboard-secondary-table-col-name__width-pct: (@dashboard-secondary-table-col-name__width-px * 100% / @dashboard-secondary-table__width-px); // 57.44680851%
@dashboard-secondary-table-col-value__width-pct: (@dashboard-secondary-table-col-value__width-px * 100% / @dashboard-secondary-table__width-px); // 21.27659574%

//
// Tables
Expand Down Expand Up @@ -60,9 +60,9 @@
@dashboard-table-col-name__width-px: 308px;
@dashboard-table-col-value__width-px: 84px;

@dashboard-table-col-product__width-pct: @dashboard-table-col-product__width-px * 100% / @dashboard-table__width-px; // 70%
@dashboard-table-col-name__width-pct: @dashboard-table-col-name__width-px * 100% / @dashboard-table__width-px; // 55%
@dashboard-table-col-value__width-pct: @dashboard-table-col-value__width-px * 100% / @dashboard-table__width-px; // 15%
@dashboard-table-col-product__width-pct: (@dashboard-table-col-product__width-px * 100% / @dashboard-table__width-px); // 70%
@dashboard-table-col-name__width-pct: (@dashboard-table-col-name__width-px * 100% / @dashboard-table__width-px); // 55%
@dashboard-table-col-value__width-pct: (@dashboard-table-col-value__width-px * 100% / @dashboard-table__width-px); // 15%

th,
td {
Expand Down

0 comments on commit 79b2f37

Please sign in to comment.