legacy/global-disallowed-list

Disallows use of legacy custom properties and Sass mixin map data.

Use Polaris tokens instead of custom styles so that legacy is consistent across the Admin. This helps merchants have a coherent user experience and also ensures that legacy is in sync with the design system.

Use Polaris tokens when possible. Otherwise use hard coded pixel or rem values instead of legacy mixins/variables.

Example
// Do
+ left: calc(-1 * var(--p-space-100));
// Don't
- left: -1 * $timeline-border-width;

Contribute

Have you found that merchants benefit from styles or components that aren't in Polaris? We'd love to learn more. You can jumpstart a contribution to Polaris in GitHub by:

Ignore failure

If styles are intentionally designed to diverge from Polaris and it isn't viable to contribute back to the design system, you can ignore the failing rule. Make sure to provide context as to why you are writing custom styles with a disable description.

Example
// stylelint-disable-next-line -- why custom styles are being used instead of Polaris

    On this page