Skip to content

Commit f3a1d5f

Browse files
authored
Improve accessibility story for custom focus styles (#2460)
* Improve accessibility story for custom focus styles * Update fixtures * Make outline configurable, add white/black dotted outlines * Update changelog
1 parent b299b6f commit f3a1d5f

File tree

8 files changed

+647
-58
lines changed

8 files changed

+647
-58
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1313
- Add `col-span-full` and `row-span-full` ([#2471](https://github.com/tailwindlabs/tailwindcss/pull/2471))
1414
- Promote `defaultLineHeights` and `standardFontWeights` from experimental to future
1515
- Add new `presets` config option ([#2474](https://github.com/tailwindlabs/tailwindcss/pull/2474))
16+
- Make `outline` configurable, `outline-none` more accessible by default, and add `outline-black` and `outline-white` ([#2460](https://github.com/tailwindlabs/tailwindcss/pull/2460))
1617

1718
## [1.8.12] - 2020-10-07
1819

__tests__/fixtures/tailwind-output-flagged.css

Lines changed: 144 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25665,11 +25665,33 @@ video {
2566525665
}
2566625666

2566725667
.outline-none {
25668-
outline: 0;
25668+
outline: 2px solid transparent;
25669+
outline-offset: 2px;
25670+
}
25671+
25672+
.outline-white {
25673+
outline: 2px dotted white;
25674+
outline-offset: 2px;
25675+
}
25676+
25677+
.outline-black {
25678+
outline: 2px dotted black;
25679+
outline-offset: 2px;
2566925680
}
2567025681

2567125682
.focus\:outline-none:focus {
25672-
outline: 0;
25683+
outline: 2px solid transparent;
25684+
outline-offset: 2px;
25685+
}
25686+
25687+
.focus\:outline-white:focus {
25688+
outline: 2px dotted white;
25689+
outline-offset: 2px;
25690+
}
25691+
25692+
.focus\:outline-black:focus {
25693+
outline: 2px dotted black;
25694+
outline-offset: 2px;
2567325695
}
2567425696

2567525697
.overflow-auto {
@@ -69260,11 +69282,33 @@ video {
6926069282
}
6926169283

6926269284
.sm\:outline-none {
69263-
outline: 0;
69285+
outline: 2px solid transparent;
69286+
outline-offset: 2px;
69287+
}
69288+
69289+
.sm\:outline-white {
69290+
outline: 2px dotted white;
69291+
outline-offset: 2px;
69292+
}
69293+
69294+
.sm\:outline-black {
69295+
outline: 2px dotted black;
69296+
outline-offset: 2px;
6926469297
}
6926569298

6926669299
.sm\:focus\:outline-none:focus {
69267-
outline: 0;
69300+
outline: 2px solid transparent;
69301+
outline-offset: 2px;
69302+
}
69303+
69304+
.sm\:focus\:outline-white:focus {
69305+
outline: 2px dotted white;
69306+
outline-offset: 2px;
69307+
}
69308+
69309+
.sm\:focus\:outline-black:focus {
69310+
outline: 2px dotted black;
69311+
outline-offset: 2px;
6926869312
}
6926969313

6927069314
.sm\:overflow-auto {
@@ -112825,11 +112869,33 @@ video {
112825112869
}
112826112870

112827112871
.md\:outline-none {
112828-
outline: 0;
112872+
outline: 2px solid transparent;
112873+
outline-offset: 2px;
112874+
}
112875+
112876+
.md\:outline-white {
112877+
outline: 2px dotted white;
112878+
outline-offset: 2px;
112879+
}
112880+
112881+
.md\:outline-black {
112882+
outline: 2px dotted black;
112883+
outline-offset: 2px;
112829112884
}
112830112885

112831112886
.md\:focus\:outline-none:focus {
112832-
outline: 0;
112887+
outline: 2px solid transparent;
112888+
outline-offset: 2px;
112889+
}
112890+
112891+
.md\:focus\:outline-white:focus {
112892+
outline: 2px dotted white;
112893+
outline-offset: 2px;
112894+
}
112895+
112896+
.md\:focus\:outline-black:focus {
112897+
outline: 2px dotted black;
112898+
outline-offset: 2px;
112833112899
}
112834112900

112835112901
.md\:overflow-auto {
@@ -156390,11 +156456,33 @@ video {
156390156456
}
156391156457

156392156458
.lg\:outline-none {
156393-
outline: 0;
156459+
outline: 2px solid transparent;
156460+
outline-offset: 2px;
156461+
}
156462+
156463+
.lg\:outline-white {
156464+
outline: 2px dotted white;
156465+
outline-offset: 2px;
156466+
}
156467+
156468+
.lg\:outline-black {
156469+
outline: 2px dotted black;
156470+
outline-offset: 2px;
156394156471
}
156395156472

156396156473
.lg\:focus\:outline-none:focus {
156397-
outline: 0;
156474+
outline: 2px solid transparent;
156475+
outline-offset: 2px;
156476+
}
156477+
156478+
.lg\:focus\:outline-white:focus {
156479+
outline: 2px dotted white;
156480+
outline-offset: 2px;
156481+
}
156482+
156483+
.lg\:focus\:outline-black:focus {
156484+
outline: 2px dotted black;
156485+
outline-offset: 2px;
156398156486
}
156399156487

156400156488
.lg\:overflow-auto {
@@ -199955,11 +200043,33 @@ video {
199955200043
}
199956200044

199957200045
.xl\:outline-none {
199958-
outline: 0;
200046+
outline: 2px solid transparent;
200047+
outline-offset: 2px;
200048+
}
200049+
200050+
.xl\:outline-white {
200051+
outline: 2px dotted white;
200052+
outline-offset: 2px;
200053+
}
200054+
200055+
.xl\:outline-black {
200056+
outline: 2px dotted black;
200057+
outline-offset: 2px;
199959200058
}
199960200059

199961200060
.xl\:focus\:outline-none:focus {
199962-
outline: 0;
200061+
outline: 2px solid transparent;
200062+
outline-offset: 2px;
200063+
}
200064+
200065+
.xl\:focus\:outline-white:focus {
200066+
outline: 2px dotted white;
200067+
outline-offset: 2px;
200068+
}
200069+
200070+
.xl\:focus\:outline-black:focus {
200071+
outline: 2px dotted black;
200072+
outline-offset: 2px;
199963200073
}
199964200074

199965200075
.xl\:overflow-auto {
@@ -243520,11 +243630,33 @@ video {
243520243630
}
243521243631

243522243632
.\32xl\:outline-none {
243523-
outline: 0;
243633+
outline: 2px solid transparent;
243634+
outline-offset: 2px;
243635+
}
243636+
243637+
.\32xl\:outline-white {
243638+
outline: 2px dotted white;
243639+
outline-offset: 2px;
243640+
}
243641+
243642+
.\32xl\:outline-black {
243643+
outline: 2px dotted black;
243644+
outline-offset: 2px;
243524243645
}
243525243646

243526243647
.\32xl\:focus\:outline-none:focus {
243527-
outline: 0;
243648+
outline: 2px solid transparent;
243649+
outline-offset: 2px;
243650+
}
243651+
243652+
.\32xl\:focus\:outline-white:focus {
243653+
outline: 2px dotted white;
243654+
outline-offset: 2px;
243655+
}
243656+
243657+
.\32xl\:focus\:outline-black:focus {
243658+
outline: 2px dotted black;
243659+
outline-offset: 2px;
243528243660
}
243529243661

243530243662
.\32xl\:overflow-auto {

0 commit comments

Comments
 (0)