mirror of
https://github.com/clagnut/webtypography.git
synced 2025-09-02 09:33:27 +02:00
Update 2.2.1.html
tweaked copy to remove 'bad example' language and explain the downsides leavding the reader to decide whether it's bad for them or not
This commit is contained in:
@@ -8,9 +8,9 @@
|
||||
line-height: 15pt;
|
||||
}</code></pre>
|
||||
|
||||
<p>However <strong>that example is bad</strong> as <code>line-height</code> should never be applied using absolute units such as points or pixels. In the prior example, when text is resized in a browser, the font-size increases <span class='bracket'>(</span>to 18 pt for example<span class='bracket'>)</span> but the line-height may remain at 15 pt. So instead of the lines being spaced apart, they would actually overlap.</p>
|
||||
<p>That example will give you the same line-height throughout all your paragraphs, however it does introduce the danger that, when the browser text size is increased by your reader <span class='bracket'>(</span>to 18 pt for example<span class='bracket'>)</span> the line-height may remain at 15 pt. The result being that, instead of the lines being spaced apart, they would actually overlap.</p>
|
||||
|
||||
<p>A better approach is to use a unitless value. The preceding example could also be coded as:</p>
|
||||
<p>A safer approach is to use a unitless value. The preceding example could also be coded as:</p>
|
||||
|
||||
<pre><code>p {
|
||||
font-size: 12pt;
|
||||
|
Reference in New Issue
Block a user