4 ms·
Did I read that not carefully enough, or did the article really not explain what that "vw" unit is/stands for? And what does the "calc(33vw - 100px)" do, appar
by perlgeek 12y ago
Did I read that not carefully enough, or did the article really not explain what that "vw" unit is/stands for?
And what does the "calc(33vw - 100px)" do, apparently in void context?
Somehow I feel more confused after reading the article.
- zenojevski 12y agoI believe it stands for "viewport width" which is specified in percents over the width of the browser viewport. Google has a first-class definition, too: https://www.google.com/search?q=css+vw+unit https://www.google.com/search?q=css+vw+unit
- anselmh 12y agoThe `vw` unit is unrelated to responsive images but a new unit type that reflects the Viewport Width (100vw = 100% of browser’s viewport). There’s also a not so good supported vh unit, all specified under CSS Values and Units Module Level 3 (http://www.w3.org/TR/css3-values/ http://www.w3.org/TR/css3-values/). The `calc()` function is a CSS function that lets you calculate values like 100vw - 100px, similar to what you can do in JavaScript. See more: https://developer.mozilla.org/en-US/docs/Web/CSS/calc https://developer.mozilla.org/en-US/docs/Web/CSS/calc