Skip to content

Commit

Permalink
Update postcss infrastructure.
Browse files Browse the repository at this point in the history
  • Loading branch information
kuasha420 committed May 7, 2024
1 parent e023adf commit e5c20b4
Show file tree
Hide file tree
Showing 5 changed files with 1,107 additions and 1,372 deletions.
26 changes: 1 addition & 25 deletions assets/sass/components/global/_googlesitekit-button-icon.scss
Original file line number Diff line number Diff line change
Expand Up @@ -40,39 +40,15 @@
}

&.googlesitekit-button-icon--spinner__before {
/**
* TODO: Remove the fallback margin-{left|right} and html[dir="rtl"] specific
* overrides from `.mdc-button__label` when `postcss-preset-env` is configured
* to not polyfill `logical-properties-and-values`.
* @see https://github.com/google/site-kit-wp/pull/8372#discussion_r1527263640
* @see https://github.com/google/site-kit-wp/issues/8414
*/

.mdc-button__label {
margin-inline-start: 8px;
margin-left: 8px;

html[dir="rtl"] & {
margin-left: 0;
}
}
}

&.googlesitekit-button-icon--spinner__after {
/**
* TODO: Remove the fallback margin-{left|right} and html[dir="rtl"] specific
* overrides from `.mdc-button__label` when `postcss-preset-env` is configured
* to not polyfill `logical-properties-and-values`.
* @see https://github.com/google/site-kit-wp/pull/8372#discussion_r1527263640
* @see https://github.com/google/site-kit-wp/issues/8414
*/
/* stylelint-disable-next-line no-descending-specificity */
.mdc-button__label {
margin-inline-end: 8px;
margin-right: 8px;

html[dir="rtl"] & {
margin-right: 0;
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,36 +23,19 @@
flex-direction: column;
margin: $grid-gap-phone;

/**
* TODO: Remove fallback `right` inset and html[dir="rtl"] specific
* overrides when `postcss-preset-env` is configured to not polyfill
* `logical-properties-and-values`, so the `inset-inline-end` property
* can be used directly without the need for the workaround.
* @see https://github.com/google/site-kit-wp/issues/8414
*/
@media (min-width: $bp-tablet) {
bottom: 32px;
box-shadow: 0 8px $grid-gap-desktop 0 rgba(0, 0, 0, 0.25);
inset-inline-end: 32px;
margin: 0;
max-width: 296px;
position: fixed;
right: 32px;
z-index: $z-index-sk-overlay-notification;

html[dir="rtl"] & {
right: unset;
}
}

@media (min-width: $bp-desktop) {
bottom: 22px;
inset-inline-end: 42px;
right: 42px;

html[dir="rtl"] & {
right: unset;
}
}

.googlesitekit-overlay-notification__body {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,39 +51,16 @@
}

&.googlesitekit-button-icon--spinner__before {
/**
* TODO: Remove the fallback margin-{left|right} and html[dir="rtl"] specific
* overrides from `.mdc-button__label` when `postcss-preset-env` is configured
* to not polyfill `logical-properties-and-values`.
* @see https://github.com/google/site-kit-wp/pull/8372#discussion_r1527263640
* @see https://github.com/google/site-kit-wp/issues/8414
*/

.mdc-button__label {
margin-inline-start: 8px;
margin-left: 8px;

html[dir="rtl"] & {
margin-left: 0;
}
}
}

&.googlesitekit-button-icon--spinner__after {
/**
* TODO: Remove the fallback margin-{left|right} and html[dir="rtl"] specific
* overrides from `.mdc-button__label` when `postcss-preset-env` is configured
* to not polyfill `logical-properties-and-values`.
* @see https://github.com/google/site-kit-wp/pull/8372#discussion_r1527263640
* @see https://github.com/google/site-kit-wp/issues/8414
*/
/* stylelint-disable-next-line no-descending-specificity */

.mdc-button__label {
margin-inline-end: 8px;
margin-right: 8px;

html[dir="rtl"] & {
margin-right: 0;
}
}
}
}
Expand Down
Loading

0 comments on commit e5c20b4

Please sign in to comment.