Skip to content

Commit cc1be47

Browse files
Add support for visibility: collapse with new collapsed utility (#9181)
* Add support for `visibility: collapse` with new `collapsed` utility * fixup * Update changelog Co-authored-by: Jordan Pittman <jordan@cryptica.me>
1 parent d6bec49 commit cc1be47

File tree

6 files changed

+10
-0
lines changed

6 files changed

+10
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1414
- Add future flag to disable color opacity utility plugins ([#9088](https://github.com/tailwindlabs/tailwindcss/pull/9088))
1515
- Add negative value support for `outline-offset` ([#9136](https://github.com/tailwindlabs/tailwindcss/pull/9136))
1616
- Allow negating utilities using min/max/clamp ([#9237](https://github.com/tailwindlabs/tailwindcss/pull/9237))
17+
- Add new `collapse` utility for `visibility: collapse` ([#9181](https://github.com/tailwindlabs/tailwindcss/pull/9181))
1718

1819
### Fixed
1920

src/corePlugins.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -397,6 +397,7 @@ export let corePlugins = {
397397
addUtilities({
398398
'.visible': { visibility: 'visible' },
399399
'.invisible': { visibility: 'hidden' },
400+
'.collapse': { visibility: 'collapse' },
400401
})
401402
},
402403

tests/basic-usage.test.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,9 @@
137137
.invisible {
138138
visibility: hidden;
139139
}
140+
.collapse {
141+
visibility: collapse;
142+
}
140143
.absolute {
141144
position: absolute;
142145
}

tests/basic-usage.test.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@
183183
<div class="select-none"></div>
184184
<div class="align-middle"></div>
185185
<div class="invisible"></div>
186+
<div class="collapse"></div>
186187
<div class="whitespace-nowrap"></div>
187188
<div class="w-12"></div>
188189
<div class="break-words"></div>

tests/raw-content.test.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@
4343
.invisible {
4444
visibility: hidden;
4545
}
46+
.collapse {
47+
visibility: collapse;
48+
}
4649
.absolute {
4750
position: absolute;
4851
}

tests/raw-content.test.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@
139139
<div class="select-none"></div>
140140
<div class="align-middle"></div>
141141
<div class="invisible"></div>
142+
<div class="collapse"></div>
142143
<div class="whitespace-nowrap"></div>
143144
<div class="w-12"></div>
144145
<div class="break-words"></div>

0 commit comments

Comments
 (0)