Skip to content

Commit b0658b4

Browse files
authored
Updated missing relative units in css.md
Few relative units were missing from the cheat sheet which have been updated
1 parent 5953417 commit b0658b4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

css.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,8 @@ Units are used for interpreting length in your css code value. These are used in
122122
| vh | relative to the viewport's height, for eg.: ```6vh``` would be ```6% of the height``` of the viewport |
123123
| vmax | relative to the viewport's bigger dimension which could be either the height or the width, for eg.: ```3vmax``` would mean ```3vh``` if the height is more than the width and would mean ```3vw``` otherwise |
124124
| vmin | similar to vmax, differs because it would consider the smaller dimension of either the height or the width |
125+
| ch | it is relative to the width of zero (0) |
126+
| ex | it is relative to the x height of the current font |
125127

126128
> relative units are much more preferred nowadays as their are just too many devices with varying screen heights, widths, pixel densities etc.
127129

0 commit comments

Comments
 (0)