Skip to content

Commit 0683b8c

Browse files
committed
test: Keep dir attribute selector and dir pseudo-class intact
We have uses like this https://github.com/wikimedia/mediawiki/blob/30c622c09149eda2e37b5c9c76de492bafda09f4/resources/lib/codex/mixins/css-icon.less#L200-L201 and maybe we can use dir pseudo-class selector in the future so I want to make sure there is a guarantee on current behavior of these cases to not break in the future. Change-Id: I19c6ba056484386072b8e98b1e971724469b3d9d
1 parent 98b09ef commit 0683b8c

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

test/data.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -923,5 +923,19 @@
923923
"span { border-block-start-width: 1px; border-block-end-width: medium; border-inline-start-width: thin; border-inline-end-width: thick; border-block-width: thick thin; border-inline-width: medium; border-block-start-style: dotted; border-block-end-style: solid; border-inline-start-style: none; border-inline-end-style: outset; border-block-style: outset solid; border-inline-style: dotted; border-block-start-color: red; border-block-end-color: red; border-inline-start-color: red; border-inline-end-color: red; border-block-color: green; border-inline-color: transparent red; border-block-start: 1px; border-block-end: medium; border-inline-start: thin; border-inline-end: thick; border-block: thick; border-inline: red; border-start-start-radius: red; border-start-end-radius: red; border-end-start-radius: red; border-end-end-radius: red; }"
924924
]
925925
]
926+
},
927+
"do not touch dir attribute selector and dir pseudo-class selector": {
928+
"cases": [
929+
[
930+
"div[dir=rtl] { padding: 1em } html[ dir='ltr' ] { padding: 1em } div[dir=\"rtl\"] { padding: 1em }"
931+
],
932+
[
933+
".x:dir( ltr ) { padding: 1em } .x:dir(rtl) :not( [ dir='ltr' ] ) { padding: 1em } .x:dir(ltr) { padding: 1em }"
934+
],
935+
[
936+
"span:dir(rtl) { direction: ltr; padding-right: 1em; } span[dir=ltr] { direction: rtl; padding-right: 1em; }",
937+
"span:dir(rtl) { direction: rtl; padding-left: 1em; } span[dir=ltr] { direction: ltr; padding-left: 1em; }"
938+
]
939+
]
926940
}
927941
}

0 commit comments

Comments
 (0)