Skip to content
Closed
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
456 changes: 455 additions & 1 deletion polaris.shopify.com/content/tools/stylelint-polaris/index.md

Large diffs are not rendered by default.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,40 +3,23 @@ title: depth/declaration-property-unit-disallowed-list
description: Disallows box-shadow declarations with hard coded px, rem, or em units
keywords:
- stylelint
- dev tools
- developer tools
- tools
- tooling
- development
- plugin
- rules
- linter
- linting
- css
- stylelint polaris
- depth
- depth rules
- shadows
---

Please use Polaris [depth tokens](https://polaris.shopify.com/tokens/depth) instead of custom styles so that depth is consistent across the Admin. This helps merchants have a coherent user experience and also ensures that depth are in sync with updates from the design system.

_{Insert why depth consistency impacts merchant [wayfinding, etc]}_

Have you found that merchants benefit from {an additional layer of visual hierarchy that's not in the depth tokens? We'd love to learn more. You can jumpstart a contribution to Polaris in GitHub by:

- Starting a [discussion](https://github.com/Shopify/polaris/discussions/6750) to collaborate with the community to find a solution
- Submitting a [feature proposal issue](https://github.com/Shopify/polaris/issues/new?assignees=&labels=Feature+request&template=FEATURE_REQUEST.md) to share context on your suggestion
- Drafting a [pull request](https://github.com/Shopify/polaris/pulls) with your proposed improvement or addition


Use the [Polaris depth tokens](https://polaris.shopify.com/tokens/z-index) instead of custom shadows.
Use a [Polaris depth token](https://polaris.shopify.com/tokens/depth) instead of a custom box-shadow so that visual depth is consistent throughout the admin. This helps merchants have a coherent user experience. Using the depth tokens will also ensure that your feature can benefit from future design language updates automatically.

```diff
// Don't
- box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
// Do
+ box-shadow: var(--p-shadow-card);

// Don't
- box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
```

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:
Have you found that merchants benefit from an additional layer of visual hierarchy that's not in the [Polaris depth tokens](https://polaris.shopify.com/tokens/depth)? We'd love to learn more. You can jumpstart a contribution to Polaris in GitHub by:

- Starting a [discussion](https://github.com/Shopify/polaris/discussions/6750) to collaborate with the community to find a solution
- Submitting a [feature proposal issue](https://github.com/Shopify/polaris/issues/new?assignees=&labels=Feature+request&template=FEATURE_REQUEST.md) to share context on your suggestion
Expand Down

This file was deleted.

This file was deleted.

Loading