Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for visibility: collapse with new collapsed utility #9181

Merged
merged 5 commits into from Sep 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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