Skip to content

Commit

Permalink
Migrate z-index custom properties from v10 to v11 (#8423)
Browse files Browse the repository at this point in the history
### WHY are these changes introduced?

Part of #8405 

### WHAT is this pull request doing?

Runs the
[`v11-styles-replace-custom-property-zindex`](#8272)
from `@shopify/polaris-migrator` to migrate `z-index` custom properties
from `v10` to `v11`. e.g.

```sh
cd polaris-react

npx @shopify/polaris-migrator@0.0.0-snapshot-release-20230217170608 \ 
v11-styles-replace-custom-property-zindex \
'./src/**/*.scss'

npx prettier --write "./src/**/*.scss"
```
  • Loading branch information
lgriffee committed Feb 17, 2023
1 parent 48dffd0 commit bc8ab02
Show file tree
Hide file tree
Showing 15 changed files with 27 additions and 22 deletions.
5 changes: 5 additions & 0 deletions .changeset/itchy-turtles-thank.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@shopify/polaris': minor
---

Migrated `z-index` custom properties from `v10` to `v11`
4 changes: 2 additions & 2 deletions polaris-react/src/components/Backdrop/Backdrop.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.Backdrop {
// stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY
position: fixed;
z-index: var(--p-z-10);
z-index: var(--p-z-index-10);
// stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY
top: 0;
// stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY
Expand All @@ -23,5 +23,5 @@
}

.belowNavigation {
z-index: var(--p-z-7);
z-index: var(--p-z-index-7);
}
2 changes: 1 addition & 1 deletion polaris-react/src/components/DataTable/DataTable.scss
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@
// stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY
right: 0;
visibility: hidden;
z-index: var(--p-z-1);
z-index: var(--p-z-index-1);
}

.StickyHeaderInner {
Expand Down
2 changes: 1 addition & 1 deletion polaris-react/src/components/Filters/Filters.scss
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ $list-filters-footer-height: 70px;
.Backdrop {
// stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY
position: fixed;
z-index: var(--p-z-10);
z-index: var(--p-z-index-10);
// stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY
top: 0;
// stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY
Expand Down
14 changes: 7 additions & 7 deletions polaris-react/src/components/Frame/Frame.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
.Navigation {
// stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY
position: fixed;
z-index: var(--p-z-8);
z-index: var(--p-z-index-8);
// stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY
top: 0;
// stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY
Expand Down Expand Up @@ -155,7 +155,7 @@
.TopBar {
// stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY
position: fixed;
z-index: var(--p-z-4);
z-index: var(--p-z-index-4);
// stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY
top: 0;
// stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY
Expand All @@ -181,7 +181,7 @@
.ContextualSaveBar {
// stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY
position: fixed;
z-index: var(--p-z-5);
z-index: var(--p-z-index-5);
// stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY
top: 0;
// stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY
Expand Down Expand Up @@ -248,7 +248,7 @@
.GlobalRibbonContainer {
// stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY
position: fixed;
z-index: var(--p-z-3);
z-index: var(--p-z-index-3);
// stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY
bottom: 0;
// stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY
Expand Down Expand Up @@ -277,7 +277,7 @@
.LoadingBar {
// stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY
position: fixed;
z-index: var(--p-z-6);
z-index: var(--p-z-index-6);
// stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY
top: 0;
// stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY
Expand All @@ -297,7 +297,7 @@
}

.hasTopBar & {
z-index: var(--p-z-6);
z-index: var(--p-z-index-6);
}
}
}
Expand All @@ -307,7 +307,7 @@
--pc-frame-skip-vertical-offset: 10px;
// stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY
position: fixed;
z-index: var(--p-z-9);
z-index: var(--p-z-index-9);
// stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY
top: var(--pc-frame-skip-vertical-offset);
// stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
.ToastManager {
// stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY
position: fixed;
z-index: var(--p-z-12);
z-index: var(--p-z-index-12);
// stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY
right: 0;
// stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY
Expand Down
4 changes: 2 additions & 2 deletions polaris-react/src/components/IndexTable/IndexTable.scss
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ $loading-panel-height: 53px;
// stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY
position: absolute;
// stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY
z-index: var(--p-z-2);
z-index: var(--p-z-index-2);
// stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY
top: 0;
// stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY
Expand Down Expand Up @@ -211,7 +211,7 @@ $loading-panel-height: 53px;

.TableHeading {
background: var(--p-surface-subdued);
z-index: var(--p-z-1);
z-index: var(--p-z-index-1);
padding: var(--p-space-2) var(--p-space-4);
text-align: left;
font-weight: var(--p-font-weight-medium);
Expand Down
2 changes: 1 addition & 1 deletion polaris-react/src/components/MediaCard/MediaCard.scss
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
.Popover {
// stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY
position: absolute;
z-index: var(--p-z-2);
z-index: var(--p-z-index-2);
// stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY
top: var(--p-space-4);
// stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ $breakpoints-height-limit-up: '(min-height: #{breakpoint($height-limit + $vertic
.Container {
// stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY
position: fixed;
z-index: var(--p-z-11);
z-index: var(--p-z-index-11);
// stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY
top: 0;
// stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.PositionedOverlay {
// stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY
position: absolute;
z-index: var(--p-z-2);
z-index: var(--p-z-index-2);
}

.fixed {
Expand Down
2 changes: 1 addition & 1 deletion polaris-react/src/components/Sheet/Sheet.scss
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ $sheet-desktop-width: 380px;
.Container {
// stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY
position: fixed;
z-index: var(--p-z-11);
z-index: var(--p-z-index-11);
// stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY
top: 0;
// stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY
Expand Down
2 changes: 1 addition & 1 deletion polaris-react/src/components/TopBar/TopBar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ $icon-size: 20px;
}

.Contents {
z-index: var(--p-z-1);
z-index: var(--p-z-index-1);
// stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY
display: flex;
// stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY
position: fixed;
visibility: hidden;
z-index: var(--p-z-8);
z-index: var(--p-z-index-8);
pointer-events: none;
// stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY
top: $top-bar-height;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
left: 0;
// stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY
right: 0;
z-index: var(--p-z-7);
z-index: var(--p-z-index-7);
// stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY
height: 100%;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ $search-icon-width: calc(#{$icon-size} + var(--p-space-4));
--pc-search-field-icon: 3;
--pc-search-field-action: 3;
// stylelint-enable
z-index: var(--p-z-11);
z-index: var(--p-z-index-11);
// stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY
position: relative;
// stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY
Expand Down

0 comments on commit bc8ab02

Please sign in to comment.