From a098cb96e14ed92bc4584d9638799c42d825b9cc Mon Sep 17 00:00:00 2001 From: Alex Page Date: Fri, 19 Nov 2021 14:38:08 -0800 Subject: [PATCH 1/2] Replace --p-duration-1-0-0 with duration(fast) --- src/components/Checkbox/Checkbox.scss | 4 ++-- src/components/OptionList/components/Checkbox/Checkbox.scss | 4 ++-- src/components/RadioButton/RadioButton.scss | 6 +++--- src/styles/shared/_controls.scss | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/components/Checkbox/Checkbox.scss b/src/components/Checkbox/Checkbox.scss index 67787bb03b3..befb1540b20 100644 --- a/src/components/Checkbox/Checkbox.scss +++ b/src/components/Checkbox/Checkbox.scss @@ -65,8 +65,8 @@ transform: translate(-50%, -50%) scale(0.25); opacity: 0; - transition: opacity var(--p-duration-1-0-0) var(--p-ease), - transform var(--p-duration-1-0-0) var(--p-ease); + transition: opacity duration(fast) var(--p-ease), + transform duration(fast) var(--p-ease); @media (-ms-high-contrast: active) { fill: ms-high-contrast-color('text'); diff --git a/src/components/OptionList/components/Checkbox/Checkbox.scss b/src/components/OptionList/components/Checkbox/Checkbox.scss index c952aac4522..7bdef1e4083 100644 --- a/src/components/OptionList/components/Checkbox/Checkbox.scss +++ b/src/components/OptionList/components/Checkbox/Checkbox.scss @@ -70,8 +70,8 @@ pointer-events: none; transform: translate(-50%, -50%) scale(0.25); opacity: 0; - transition: opacity var(--p-duration-1-0-0) var(--p-ease), - transform var(--p-duration-1-0-0) var(--p-ease); + transition: opacity duration(fast) var(--p-ease), + transform duration(fast) var(--p-ease); @media (-ms-high-contrast: active) { fill: ms-high-contrast-color('text'); diff --git a/src/components/RadioButton/RadioButton.scss b/src/components/RadioButton/RadioButton.scss index 09efcb10c66..cc49d6e44b9 100644 --- a/src/components/RadioButton/RadioButton.scss +++ b/src/components/RadioButton/RadioButton.scss @@ -52,7 +52,7 @@ border: var(--p-control-border-width) solid var(--p-border); border-radius: 50%; background-color: var(--p-surface); - transition: border-color var(--p-duration-1-0-0) var(--p-ease); + transition: border-color duration(fast) var(--p-ease); &::before { content: ''; @@ -66,8 +66,8 @@ width: var(--p-icon-size); background-color: var(--p-interactive); border-radius: 50%; - transition: opacity var(--p-duration-1-0-0) var(--p-ease), - transform var(--p-duration-1-0-0) var(--p-ease); + transition: opacity duration(fast) var(--p-ease), + transform duration(fast) var(--p-ease); @media (forced-colors: active) { @include high-contrast-border(rem(5px)); diff --git a/src/styles/shared/_controls.scss b/src/styles/shared/_controls.scss index 050bbfbc0be..4e6b5220950 100644 --- a/src/styles/shared/_controls.scss +++ b/src/styles/shared/_controls.scss @@ -32,8 +32,8 @@ background-color: var(--p-interactive); opacity: 0; transform: scale(0.25); - transition: opacity var(--p-duration-1-0-0) var(--p-ease), - transform var(--p-duration-1-0-0) var(--p-ease); + transition: opacity duration(fast) var(--p-ease), + transform duration(fast) var(--p-ease); } &.hover, From ac2a6f195f70fc7739d0d24e2fe2e88c78f8d630 Mon Sep 17 00:00:00 2001 From: Alex Page Date: Fri, 19 Nov 2021 14:39:28 -0800 Subject: [PATCH 2/2] Update UNRELEASED.md --- UNRELEASED.md | 1 + 1 file changed, 1 insertion(+) diff --git a/UNRELEASED.md b/UNRELEASED.md index e7838d417b9..f8bf8ff6593 100644 --- a/UNRELEASED.md +++ b/UNRELEASED.md @@ -12,6 +12,7 @@ Use [the changelog guidelines](/documentation/Versioning%20and%20changelog.md) t - Updated timeout of `Popover` exit to `durationFast`. ([#4651](https://github.com/Shopify/polaris-react/pull/4651)) - Reduced the size of the `progress` pip in `Badge` ([#4658](https://github.com/Shopify/polaris-react/pull/4658)) - Updated styling of `DropZone` border and overlay text. ([#4662](https://github.com/Shopify/polaris-react/pull/4662)) +- Remove duplicate duration(fast) usage. ([#4682](https://github.com/Shopify/polaris-react/pull/4682)) ### Bug fixes