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
2 changes: 2 additions & 0 deletions UNRELEASED.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@ Use [the changelog guidelines](/documentation/Versioning%20and%20changelog.md) t
- Removed filter sass function and color-icon() mixin ([#4676](https://github.com/Shopify/polaris-react/pull/4676))
- Renamed `--p-duration-1-0-0` and `--p-duration-1-5-0` to `--p-duration-100` and `--p-duration-150`.
- Removed miscellaneous css custom properties ([#4686](https://github.com/Shopify/polaris-react/pull/4686))
- Removed `skeleton-shimmer` mixin ([#4462])(https://github.com/Shopify/polaris-react/pull/4462)

### Enhancements

- Removed motion from `Skeleton` components mixin ([#4462])(https://github.com/Shopify/polaris-react/pull/4462)
- Allow for `readonly` items in ActionList ([#4623](https://github.com/Shopify/polaris-react/pull/4623))
- Updated `VisuallyHidden` styles to not use `top` or `clip` ([#4641](https://github.com/Shopify/polaris-react/pull/4641))
- Added `PlainAction` type to `ComplexAction`. ([#4489](https://github.com/Shopify/polaris-react/pull/4489))
Expand Down
20 changes: 0 additions & 20 deletions src/components/AppProvider/AppProvider.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,6 @@

:root {
--polaris-version-number: '{{POLARIS_VERSION}}';
// This value matches the name of the animation defined below.
// The animation name is stored in a custom property so that the scss mixins
// in our public api that reference this animation can do so with
// `var(--polaris-animation-skeleton-shimmer)` instead of
// `:global(polaris-SkeletonShimmerAnimation)`. This allows us to expose a
// single set of public sass API files instead of needing distinct sass API
// entrypoints for consumers that use css-modules in locals mode (such as scss
// files in apps using sewing-kit) and for consumers not using css-modules.
// stylelint-disable-next-line value-keyword-case
--polaris-animation-skeleton-shimmer: polaris-SkeletonShimmerAnimation;
}
Copy link
Member

@kyledurand kyledurand Sep 1, 2021

Choose a reason for hiding this comment

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

Looks like there's a keyframe reference at the end of this file that can be removed as well

https://github.com/Shopify/polaris-react/blob/main/src/components/AppProvider/AppProvider.scss#L84-L92


html,
Expand Down Expand Up @@ -87,13 +77,3 @@ button::-moz-focus-inner,
[type='submit']::-moz-focus-inner {
border-style: none;
}

@keyframes :global(polaris-SkeletonShimmerAnimation) {
0% {
opacity: 0.45;
}

100% {
opacity: 0.9;
}
}
4 changes: 0 additions & 4 deletions src/components/SkeletonBodyText/SkeletonBodyText.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ $body-text-height: rem(8px);
$body-text-line-height: rem(12px);
$body-text-last-line-width: 80%;

.SkeletonBodyTextContainer {
@include skeleton-shimmer;
}

.SkeletonBodyText {
height: $body-text-height;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ $skeleton-display-text-max-width: rem(120px);
.DisplayText {
max-width: $skeleton-display-text-max-width;

@include skeleton-shimmer;
@include skeleton-content;
}

Expand Down
1 change: 0 additions & 1 deletion src/components/SkeletonPage/SkeletonPage.scss
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ $skeleton-display-text-max-width: rem(120px);
}

.SkeletonTitle {
@include skeleton-shimmer;
@include skeleton-content;
max-width: $skeleton-display-text-max-width;
height: rem(28px);
Expand Down
1 change: 0 additions & 1 deletion src/components/SkeletonThumbnail/SkeletonThumbnail.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
}

.SkeletonThumbnail {
@include skeleton-shimmer;
@include skeleton-content;
}

Expand Down
16 changes: 0 additions & 16 deletions src/styles/shared/_skeleton.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
/// Used to create the shimmer effect of skeleton components
$skeleton-shimmer-duration: duration(slower) * 2;

// Used by both Thumbnail and SkeletonThumbnail
$small-thumbnail-size: rem(40px);
$medium-thumbnail-size: rem(60px);
Expand All @@ -16,19 +13,6 @@ $thumbnail-sizes: (
@return map-get($thumbnail-sizes, $size);
}

@mixin skeleton-shimmer {
Copy link
Contributor

Choose a reason for hiding this comment

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

This would be considered a breaking change right? I know I've seen this used in web.

Copy link
Member Author

Choose a reason for hiding this comment

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

Of course it is...

// This is a global animation, defined in /src/components/AppProvider/AppProvider.scss
// See that file for why this is referenced as a custom property instead of
// by name
animation: var(--polaris-animation-skeleton-shimmer)
$skeleton-shimmer-duration linear infinite alternate;
will-change: opacity;

@media (prefers-reduced-motion) {
animation: none;
}
}

@mixin skeleton-content {
position: relative;

Expand Down