border/at-rule-disallowed-list

Disallows use of legacy Sass border mixins.

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

Example
// Do
+ outline: var(--p-border-width-025) solid transparent;
// Don't
- @include high-contrast-outline()

NOTE: The focus-ring at rule does not currently have an equivalent token or component. If you need to use it, feel free to add a stylelint ignore comment until a solution from Polaris is ready.

Example
// Do
+ &:focus {
  + outline: var(--p-border-width-050) solid var(--p-color-border-focus);
  + outline-offset: var(--p-space-050);
+ }
// Don't
- @include focus-ring

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