Skip to content

Commit 1faa779

Browse files
authored
Make the Declaration Order recommendation optional
This recommendation was relaxed in the internal style guide a few months ago. The suggestion is still to continue using alphabetical order unless teams have access to the appropriate tooling which can support consistently automating and enforcing different sorting rules which may be more logical to read.
1 parent cada798 commit 1faa779

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

htmlcssguide.html

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -735,10 +735,12 @@ <h3 id="CSS_Formatting_Rules" class="numbered">CSS Formatting Rules</h3>
735735

736736
<h4 id="Declaration_Order" class="numbered">Declaration Order</h4>
737737

738-
<p>Alphabetize declarations.</p>
738+
<p>Alphabetize declarations (optional).</p>
739739

740-
<p>Put declarations in alphabetical order in order to
741-
achieve consistent code in a way that is easy to remember and maintain.</p>
740+
<p>Sort declarations consistently within a project. In the absence of tooling to
741+
automate and enforce a consistent sort order, consider putting declarations in
742+
alphabetical order in order to achieve consistent code in a way that is easy to
743+
learn, remember, and manually maintain.</p>
742744

743745
<p>Ignore vendor-specific prefixes for sorting purposes. However, multiple
744746
vendor-specific prefixes for a certain CSS property should be kept sorted (e.g.

0 commit comments

Comments
 (0)