Skip to content

Commit

Permalink
Add support for visibility: collapse with new collapsed utility (#…
Browse files Browse the repository at this point in the history
…9181)

* Add support for `visibility: collapse` with new `collapsed` utility

* fixup

* Update changelog

Co-authored-by: Jordan Pittman <jordan@cryptica.me>
  • Loading branch information
brandonmcconnell and thecrypticace committed Sep 9, 2022
1 parent d6bec49 commit cc1be47
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Add future flag to disable color opacity utility plugins ([#9088](https://github.com/tailwindlabs/tailwindcss/pull/9088))
- Add negative value support for `outline-offset` ([#9136](https://github.com/tailwindlabs/tailwindcss/pull/9136))
- Allow negating utilities using min/max/clamp ([#9237](https://github.com/tailwindlabs/tailwindcss/pull/9237))
- Add new `collapse` utility for `visibility: collapse` ([#9181](https://github.com/tailwindlabs/tailwindcss/pull/9181))

### Fixed

Expand Down
1 change: 1 addition & 0 deletions src/corePlugins.js
Expand Up @@ -397,6 +397,7 @@ export let corePlugins = {
addUtilities({
'.visible': { visibility: 'visible' },
'.invisible': { visibility: 'hidden' },
'.collapse': { visibility: 'collapse' },
})
},

Expand Down
3 changes: 3 additions & 0 deletions tests/basic-usage.test.css
Expand Up @@ -137,6 +137,9 @@
.invisible {
visibility: hidden;
}
.collapse {
visibility: collapse;
}
.absolute {
position: absolute;
}
Expand Down
1 change: 1 addition & 0 deletions tests/basic-usage.test.html
Expand Up @@ -183,6 +183,7 @@
<div class="select-none"></div>
<div class="align-middle"></div>
<div class="invisible"></div>
<div class="collapse"></div>
<div class="whitespace-nowrap"></div>
<div class="w-12"></div>
<div class="break-words"></div>
Expand Down
3 changes: 3 additions & 0 deletions tests/raw-content.test.css
Expand Up @@ -43,6 +43,9 @@
.invisible {
visibility: hidden;
}
.collapse {
visibility: collapse;
}
.absolute {
position: absolute;
}
Expand Down
1 change: 1 addition & 0 deletions tests/raw-content.test.html
Expand Up @@ -139,6 +139,7 @@
<div class="select-none"></div>
<div class="align-middle"></div>
<div class="invisible"></div>
<div class="collapse"></div>
<div class="whitespace-nowrap"></div>
<div class="w-12"></div>
<div class="break-words"></div>
Expand Down

0 comments on commit cc1be47

Please sign in to comment.