Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate deprecated v11 tokens in stylelint docs #10777

Merged
merged 4 commits into from
Sep 29, 2023
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
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import RulePostamble from '../_postamble.md';

```diff
// Do
+ outline: var(--p-border-width-1) solid transparent;
+ outline: var(--p-border-width-025) solid transparent;
// Don't
- @include high-contrast-outline()
```
Expand All @@ -28,7 +28,7 @@ NOTE: The `focus-ring` at rule does not currently have an equivalent token or co
```diff
// Do
+ &:focus {
+ outline: var(--p-border-width-2) solid var(--p-color-border-interactive-focus);
+ outline: var(--p-border-width-050) solid var(--p-color-border-focus);
+ outline-offset: var(--p-space-050);
+ }
// Don't
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import RulePostamble from '../_postamble.md';

```diff
// Do
+ border-radius: var(--p-border-radius-2);
+ border-radius: var(--p-border-radius-200);
// Don't
- border-radius: var(--p-border-radius-large);
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import RulePostamble from '../_postamble.md';

```diff
// Do
+ border-width: var(--p-border-width-2);
+ border-radius: var(--p-border-radius-2);
+ border-width: var(--p-border-width-050);
+ border-radius: var(--p-border-radius-200);
// Don't
- border-width: 2px;
- border-radius: 0.5rem;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import RulePostamble from '../_postamble.md';

```diff
// Do
+ border-radius: var(--p-border-radius-1);
+ border-radius: var(--p-border-radius-100);
// Don't
- border-radius: border-radius();
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import RulePostamble from '../_postamble.md';
```diff
// Do
+ svg {
+ fill: var(--p-color-icon-subdued);
+ fill: var(--p-color-icon-secondary);
+}

// Don't
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import RulePostamble from '../_postamble.md';
```diff
// Do
+ color: var(--p-color-text-disabled);
+ background: var(--p-color-bg-inverse-hover);
+ background: var(--p-color-bg-fill-inverse-hover);
// Don't
- color: rgb(140, 145, 150);
- background: color('hover');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Flags declaration property values using `--p-*` that are not valid Polaris token

```diff
// Do
+ font-size: var(--p-font-size-200);
+ font-size: var(--p-font-size-400);
// Don't
- font-size: var(--p-fontsize-200);
```
Expand All @@ -38,7 +38,7 @@ Flags declaration property values using private `--pc-*` tokens.

```diff
// Do
+ background: var(--p-color-bg-inset-strong);
+ background: var(--p-color-bg-fill-inverse);
// Don't
- background: var(--pc-button-color-depressed);
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import RulePostamble from '../_postamble.md';

```diff
// Do
+ box-shadow: var(--p-shadow-md);
+ box-shadow: var(--p-shadow-300);
// Don't
- box-shadow: var(--p-shadow-deep)
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import RulePostamble from '../_postamble.md';

```diff
// Do
+ box-shadow: var(--p-shadow-md);
+ box-shadow: var(--p-shadow-300);
// Don't
- box-shadow: 0px 2px 4px rgba(31, 33, 36, 0.1), 0px 1px 6px rgba(31, 33, 36, 0.05);
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import RulePostamble from '../_postamble.md';

```diff
// Do
+ box-shadow: var(--p-shadow-md);
+ box-shadow: var(--p-shadow-300);
// Don't
- filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import RulePostamble from '../_postamble.md';

```diff
// Do
+ font-size: var(--p-font-size-75);
+ line-height: var(--p-font-line-height-3);
+ font-size: var(--p-font-size-300);
+ line-height: var(--p-font-line-height-600);
// Don't
- font-size: 12px;
- line-height: 1.5rem
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import RulePostamble from '../_postamble.md';
// Do
+ <Text variant="headingXs" as="p" />
// Do
+ font-size: var(--p-font-size-75);
+ font-size: var(--p-font-size-300);
// Don't
- font-size: font-size('caption');
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import RulePostamble from '../_postamble.md';

```diff
// Do
+ font-size: var(--p-font-size-200);
+ font-size: var(--p-font-size-400);
// Don't
- font-size: $base-font-size;
```
Expand Down