Skip to content

Commit 88c5034

Browse files
committed
Change order of kbd modifier
1 parent e7eef8f commit 88c5034

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

Diff for: README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ Here's a complete list of available element modifiers:
168168
| `prose-figcaption:{utility}` | `figcaption` |
169169
| `prose-strong:{utility}` | `strong` |
170170
| `prose-em:{utility}` | `em` |
171+
| `prose-kbd:{utility}` | `kbd` |
171172
| `prose-code:{utility}` | `code` |
172173
| `prose-pre:{utility}` | `pre` |
173174
| `prose-ol:{utility}` | `ol` |
@@ -181,7 +182,6 @@ Here's a complete list of available element modifiers:
181182
| `prose-img:{utility}` | `img` |
182183
| `prose-video:{utility}` | `video` |
183184
| `prose-hr:{utility}` | `hr` |
184-
| `prose-kbd:{utility}` | `kbd` |
185185

186186
When stacking these modifiers with other modifiers like `hover`, you most likely want the other modifier to come first:
187187

Diff for: src/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ module.exports = plugin.withOptions(
9090
['figcaption'],
9191
['strong'],
9292
['em'],
93+
['kbd'],
9394
['code'],
9495
['pre'],
9596
['ol'],
@@ -104,7 +105,6 @@ module.exports = plugin.withOptions(
104105
['video'],
105106
['hr'],
106107
['lead', '[class~="lead"]'],
107-
['kbd'],
108108
]) {
109109
selectors = selectors.length === 0 ? [name] : selectors
110110

Diff for: src/index.test.js

+10-10
Original file line numberDiff line numberDiff line change
@@ -695,6 +695,7 @@ test('element variants', async () => {
695695
prose-figcaption:opacity-75
696696
prose-strong:font-medium
697697
prose-em:italic
698+
prose-kbd:border-b-2
698699
prose-code:font-mono
699700
prose-pre:font-mono
700701
prose-ol:pl-6
@@ -708,7 +709,6 @@ test('element variants', async () => {
708709
prose-img:rounded-lg
709710
prose-video:my-12
710711
prose-hr:border-t-2
711-
prose-kbd:border-b-2
712712
"
713713
></div>`,
714714
},
@@ -808,6 +808,10 @@ test('element variants', async () => {
808808
:is(:where(em):not(:where([class~='not-prose'], [class~='not-prose'] *))) {
809809
font-style: italic;
810810
}
811+
.prose-kbd\:border-b-2
812+
:is(:where(kbd):not(:where([class~='not-prose'], [class~='not-prose'] *))) {
813+
border-bottom-width: 2px;
814+
}
811815
.prose-code\:font-mono
812816
:is(:where(code):not(:where([class~='not-prose'], [class~='not-prose'] *))) {
813817
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono',
@@ -864,10 +868,6 @@ test('element variants', async () => {
864868
:is(:where([class~='lead']):not(:where([class~='not-prose'], [class~='not-prose'] *))) {
865869
font-style: italic;
866870
}
867-
.prose-kbd\:border-b-2
868-
:is(:where(kbd):not(:where([class~='not-prose'], [class~='not-prose'] *))) {
869-
border-bottom-width: 2px;
870-
}
871871
`
872872
)
873873
})
@@ -894,6 +894,7 @@ test('element variants with custom class name', async () => {
894894
markdown-figcaption:opacity-75
895895
markdown-strong:font-medium
896896
markdown-em:italic
897+
markdown-kbd:border-b-2
897898
markdown-code:font-mono
898899
markdown-pre:font-mono
899900
markdown-ol:pl-6
@@ -907,7 +908,6 @@ test('element variants with custom class name', async () => {
907908
markdown-img:rounded-lg
908909
markdown-video:my-12
909910
markdown-hr:border-t-2
910-
markdown-kbd:border-b-2
911911
"
912912
></div>`,
913913
},
@@ -1009,6 +1009,10 @@ test('element variants with custom class name', async () => {
10091009
:is(:where(em):not(:where([class~='not-markdown'], [class~='not-markdown'] *))) {
10101010
font-style: italic;
10111011
}
1012+
.markdown-kbd\:border-b-2
1013+
:is(:where(kbd):not(:where([class~='not-markdown'], [class~='not-markdown'] *))) {
1014+
border-bottom-width: 2px;
1015+
}
10121016
.markdown-code\:font-mono
10131017
:is(:where(code):not(:where([class~='not-markdown'], [class~='not-markdown'] *))) {
10141018
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono',
@@ -1069,10 +1073,6 @@ test('element variants with custom class name', async () => {
10691073
*))) {
10701074
font-style: italic;
10711075
}
1072-
.markdown-kbd\:border-b-2
1073-
:is(:where(kbd):not(:where([class~='not-markdown'], [class~='not-markdown'] *))) {
1074-
border-bottom-width: 2px;
1075-
}
10761076
`
10771077
)
10781078
})

0 commit comments

Comments
 (0)