Skip to content

Commit 831036a

Browse files
adamwathanthecrypticace
authored andcommitted
Add svh, lvh, and dvh values to default theme (#11317)
* Add svh, lvh, and dvh values to default theme * Update changelog --------- Co-authored-by: Adam Wathan <[email protected]>
1 parent 3125829 commit 831036a

5 files changed

+109
-3
lines changed

CHANGELOG.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10-
- Nothing yet!
10+
### Added
11+
12+
- Add `svh`, `lvh`, and `dvh` values to default `height`/`min-height`/`max-height` theme ([#11317](https://github.com/tailwindlabs/tailwindcss/pull/11317))
13+
1114

1215
## [3.3.6] - 2023-12-04
1316

stubs/config.full.js

+12
Original file line numberDiff line numberDiff line change
@@ -517,6 +517,9 @@ module.exports = {
517517
'5/6': '83.333333%',
518518
full: '100%',
519519
screen: '100vh',
520+
svh: '100svh',
521+
lvh: '100lvh',
522+
dvh: '100dvh',
520523
min: 'min-content',
521524
max: 'max-content',
522525
fit: 'fit-content',
@@ -621,6 +624,9 @@ module.exports = {
621624
none: 'none',
622625
full: '100%',
623626
screen: '100vh',
627+
svh: '100svh',
628+
lvh: '100lvh',
629+
dvh: '100dvh',
624630
min: 'min-content',
625631
max: 'max-content',
626632
fit: 'fit-content',
@@ -650,6 +656,9 @@ module.exports = {
650656
0: '0px',
651657
full: '100%',
652658
screen: '100vh',
659+
svh: '100svh',
660+
lvh: '100lvh',
661+
dvh: '100dvh',
653662
min: 'min-content',
654663
max: 'max-content',
655664
fit: 'fit-content',
@@ -967,6 +976,9 @@ module.exports = {
967976
'11/12': '91.666667%',
968977
full: '100%',
969978
screen: '100vw',
979+
svw: '100svw',
980+
lvw: '100lvw',
981+
dvw: '100dvw',
970982
min: 'min-content',
971983
max: 'max-content',
972984
fit: 'fit-content',

tests/basic-usage.oxide.test.css

+45
Original file line numberDiff line numberDiff line change
@@ -201,15 +201,60 @@
201201
.aspect-video {
202202
aspect-ratio: 16 / 9;
203203
}
204+
.h-0 {
205+
height: 0;
206+
}
204207
.h-16 {
205208
height: 4rem;
206209
}
210+
.h-dvh {
211+
height: 100dvh;
212+
}
213+
.h-full {
214+
height: 100%;
215+
}
216+
.h-lvh {
217+
height: 100lvh;
218+
}
219+
.h-screen {
220+
height: 100vh;
221+
}
222+
.h-svh {
223+
height: 100svh;
224+
}
225+
.max-h-0 {
226+
max-height: 0;
227+
}
228+
.max-h-dvh {
229+
max-height: 100dvh;
230+
}
231+
.max-h-full {
232+
max-height: 100%;
233+
}
234+
.max-h-lvh {
235+
max-height: 100lvh;
236+
}
207237
.max-h-screen {
208238
max-height: 100vh;
209239
}
240+
.max-h-svh {
241+
max-height: 100svh;
242+
}
210243
.min-h-0 {
211244
min-height: 0;
212245
}
246+
.min-h-dvh {
247+
min-height: 100dvh;
248+
}
249+
.min-h-full {
250+
min-height: 100%;
251+
}
252+
.min-h-lvh {
253+
min-height: 100lvh;
254+
}
255+
.min-h-svh {
256+
min-height: 100svh;
257+
}
213258
.w-12 {
214259
width: 3rem;
215260
}

tests/basic-usage.test.css

+45
Original file line numberDiff line numberDiff line change
@@ -201,15 +201,60 @@
201201
.aspect-video {
202202
aspect-ratio: 16 / 9;
203203
}
204+
.h-0 {
205+
height: 0;
206+
}
204207
.h-16 {
205208
height: 4rem;
206209
}
210+
.h-dvh {
211+
height: 100dvh;
212+
}
213+
.h-full {
214+
height: 100%;
215+
}
216+
.h-lvh {
217+
height: 100lvh;
218+
}
219+
.h-screen {
220+
height: 100vh;
221+
}
222+
.h-svh {
223+
height: 100svh;
224+
}
225+
.max-h-0 {
226+
max-height: 0;
227+
}
228+
.max-h-dvh {
229+
max-height: 100dvh;
230+
}
231+
.max-h-full {
232+
max-height: 100%;
233+
}
234+
.max-h-lvh {
235+
max-height: 100lvh;
236+
}
207237
.max-h-screen {
208238
max-height: 100vh;
209239
}
240+
.max-h-svh {
241+
max-height: 100svh;
242+
}
210243
.min-h-0 {
211244
min-height: 0;
212245
}
246+
.min-h-dvh {
247+
min-height: 100dvh;
248+
}
249+
.min-h-full {
250+
min-height: 100%;
251+
}
252+
.min-h-lvh {
253+
min-height: 100lvh;
254+
}
255+
.min-h-svh {
256+
min-height: 100svh;
257+
}
213258
.w-12 {
214259
width: 3rem;
215260
}

tests/basic-usage.test.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,10 @@ crosscheck(({ stable, oxide, engine }) => {
9191
<div class="list-disc"></div>
9292
<div class="list-image-none"></div>
9393
<div class="m-4 my-2 mx-auto mt-0 mr-1 mb-3 ml-4"></div>
94-
<div class="max-h-screen"></div>
94+
<div class="h-0 h-full h-screen h-svh h-lvh h-dvh"></div>
95+
<div class="max-h-0 max-h-full max-h-screen max-h-svh max-h-lvh max-h-dvh"></div>
9596
<div class="max-w-full"></div>
96-
<div class="min-h-0"></div>
97+
<div class="min-h-0 min-h-full min-h-0 min-h-svh min-h-lvh min-h-dvh"></div>
9798
<div class="min-w-min"></div>
9899
<div class="object-cover"></div>
99100
<div class="object-bottom"></div>

0 commit comments

Comments
 (0)