Skip to content
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
1 change: 1 addition & 0 deletions UNRELEASED-v9.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ Use [the changelog guidelines](/documentation/Versioning%20and%20changelog.md) t
- Removed the `unstyled-list()` mixin and replaced any instances with values ([#4960](https://github.com/Shopify/polaris-react/pull/4960))
- Removed `high-contrast-outline()` and `high-contrast-border()` mixins and replaced any instances with tokens and values ([#4962](https://github.com/Shopify/polaris-react/pull/4962))
- Removed the `map-extend` scss function ([#4970](https://github.com/Shopify/polaris-react/pull/4970))
- Removed the `state()` scss mixin ([#4989](https://github.com/Shopify/polaris-react/pull/4989))

### New components

Expand Down
7 changes: 6 additions & 1 deletion src/components/VideoThumbnail/VideoThumbnail.scss
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ $progress-bar-height: 6px;
}

.PlayButton {
--pc-play-button-focused-state-overlay: rgba(223, 227, 232, 0.3);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This rgba value is an extended state color that used to be part of color-palette-data. I didn't want to create a one off value so I put it into a --pc-* token. Would love feedback on this approach.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the right call for now. We can in another PR go through all the hard coded color values.

position: absolute;
top: 0;
left: 0;
Expand All @@ -43,7 +44,11 @@ $progress-bar-height: 6px;

&:focus {
outline: none;
@include state(focused);
box-shadow: inset 2px 0 0 var(--p-focused);
background-image: linear-gradient(
var(--pc-play-button-focused-state-overlay),
var(--pc-play-button-focused-state-overlay)
);
}
}

Expand Down
27 changes: 0 additions & 27 deletions src/styles/shared/_interaction-state.scss
Original file line number Diff line number Diff line change
@@ -1,30 +1,3 @@
/// Sets the background-image and box-shadow for single or multiple given
/// interaction states.
///
/// @param {argList} $interaction-states... - Accepts single or multiple
/// interactions states.
@mixin state($interaction-states...) {
$backgrounds: ();

@each $state in $interaction-states {
$colors: color(state, $state);
$backgrounds: append(
$backgrounds,
linear-gradient($colors, $colors),
comma
);

@if $state == 'focused' {
box-shadow: inset 2px 0 0 var(--p-focused);
}

@if $state == 'focused-destructive' {
box-shadow: inset 2px 0 0 var(--p-focused);
}
}
background-image: $backgrounds;
}

@mixin list-selected-indicator {
content: '';
background-color: var(--p-interactive);
Expand Down