You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: css3-values/Overview.src.html
+11Lines changed: 11 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -851,6 +851,17 @@ <h3 id="calc">
851
851
}</pre>
852
852
</div>
853
853
854
+
<divclass="example">
855
+
<p>The following sets the 'font-size' so that exactly 40em fits within the viewport, ensuring that roughly the same amount of text always fills the screen no matter the screen size.</p>
856
+
857
+
<pre>
858
+
:root {
859
+
font-size: calc(100vw / 40);
860
+
}</pre>
861
+
862
+
<p>If the rest of the design is specified using the ''rem'' unit, the entire layout will scale to match the viewport width.</p>
863
+
</div>
864
+
854
865
<pclass='issue'>Add less trivial examples, particularly involving parens
0 commit comments