Skip to content
This repository was archived by the owner on Dec 19, 2024. It is now read-only.

Commit 2fe1eeb

Browse files
SemigradskyMoOx
authored andcommitted
Added: attribute case insensitive support (#306)
Specification: https://www.w3.org/TR/selectors4/#attribute-case Plugin documentation: https://github.com/Semigradsky/postcss-attribute-case-insensitive
1 parent 72c94af commit 2fe1eeb

File tree

7 files changed

+32
-0
lines changed

7 files changed

+32
-0
lines changed

docs/content/features.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -428,6 +428,20 @@ body {
428428
|
429429
[Plugin documentation](https://github.com/MattDiMu/postcss-replace-overflow-wrap)
430430

431+
## attribute case insensitive
432+
433+
Allows you to use case insensitive attributes.
434+
435+
```css
436+
[frame=hsides i] {
437+
border-style: solid none;
438+
}
439+
```
440+
441+
[Specification](https://www.w3.org/TR/selectors4/#attribute-case)
442+
|
443+
[Plugin documentation](https://github.com/Semigradsky/postcss-attribute-case-insensitive)
444+
431445
## @todo
432446

433447
Any omissions of the CSS specifications (even in draft) that are subject to be

docs/content/index.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,9 @@ title: cssnext - Use tomorrow’s CSS syntax, today.
135135
(<code>word-wrap</code> fallback)
136136
</small>
137137
</li>
138+
<li class="r-Grid-cell r-minS--1of2">
139+
<a href="/features/#attribute-case-insensitive">attribute case insensitive</a>
140+
</li>
138141
</ul>
139142
<small
140143
class="cssnext-FeaturesList-small"

docs/content/playground.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,11 @@
7979
/* overflow-wrap fallback */
8080
body {
8181
overflow-wrap: break-word;
82+
}
83+
84+
/* attribute case insensitive */
85+
[frame=hsides i] {
86+
border-style: solid none;
8287
}
8388

8489
</textarea>

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
"pleeease-filters": "^3.0.0",
2929
"postcss": "^5.0.4",
3030
"postcss-apply": "^0.3.0",
31+
"postcss-attribute-case-insensitive": "^1.0.1",
3132
"postcss-calc": "^5.0.0",
3233
"postcss-color-function": "^2.0.0",
3334
"postcss-color-gray": "^3.0.0",
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[data-foo=test i] {
2+
display: block;
3+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[data-foo=test],[data-foo=Test],[data-foo=tEst],[data-foo=TEst],[data-foo=teSt],[data-foo=TeSt],[data-foo=tESt],[data-foo=TESt],[data-foo=tesT],[data-foo=TesT],[data-foo=tEsT],[data-foo=TEsT],[data-foo=teST],[data-foo=TeST],[data-foo=tEST],[data-foo=TEST] {
2+
display: block;
3+
}

src/features.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ export default {
2727
// https://npmjs.com/package/postcss-custom-selectors
2828
customSelectors: (options) => require("postcss-custom-selectors")(options),
2929

30+
// https://npmjs.com/package/postcss-attribute-case-insensitive
31+
attributeCaseInsensitive: (options) => require("postcss-attribute-case-insensitive")(options),
32+
3033
// https://npmjs.com/package/postcss-color-rebeccapurple
3134
colorRebeccapurple: (options) => require("postcss-color-rebeccapurple")(options),
3235

0 commit comments

Comments
 (0)