Prefer leading zeros in CSS values

This was reversed in the internal style guide a while ago to align the guidance with our autoformatting tooling configuration.

Any optimisations to reduce file size should be handled by compilers and minifiers.
This commit is contained in:
Tony Ruscoe 2022-01-13 13:53:15 +00:00 committed by GitHub
parent 50c42bf956
commit 2dcaf50252
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -592,11 +592,11 @@ padding: 0;
<h4 id="Leading_0s" class="numbered">Leading 0s</h4>
<p>Omit leading “0”s in values.</p>
<p>Always include leading “0”s in values.</p>
<p>Do not put <code>0</code>s in front of values or lengths between -1 and 1.</p>
<p>Put <code>0</code>s in front of values or lengths between -1 and 1.</p>
<pre><code class="language-css good">font-size: .8em;
<pre><code class="language-css good">font-size: 0.8em;
</code></pre>
<h4 id="Hexadecimal_Notation" class="numbered">Hexadecimal Notation</h4>