Comments on: The Order of CSS Classes in HTML Doesn’t Matter https://css-tricks.com/the-order-of-css-classes-in-html-doesnt-matter/ Tips, Tricks, and Techniques on using Cascading Style Sheets. Tue, 26 Oct 2021 02:13:34 +0000 hourly 1 https://wordpress.org/?v=6.1.1 By: Saddek Touati https://css-tricks.com/the-order-of-css-classes-in-html-doesnt-matter/#comment-1784301 Tue, 26 Oct 2021 02:13:34 +0000 https://css-tricks.com/?p=300141#comment-1784301 In reply to Aleš Kounovský.

You tripped me into believing you might be correct. Itried it in my browser… surprise surprise… it gives the same result

]]>
By: Mike Vysocka https://css-tricks.com/the-order-of-css-classes-in-html-doesnt-matter/#comment-1753149 Wed, 18 Dec 2019 16:01:56 +0000 https://css-tricks.com/?p=300141#comment-1753149 For style, it doesn’t matter. But what about Gzip and Brotli compression? Gzip compresses like-strings

]]>
By: Sam https://css-tricks.com/the-order-of-css-classes-in-html-doesnt-matter/#comment-1753132 Tue, 17 Dec 2019 21:42:37 +0000 https://css-tricks.com/?p=300141#comment-1753132 This make perfect sens. The CSS is interpreted (and cascading blah blah) not the html.

]]>
By: Aleš Kounovský https://css-tricks.com/the-order-of-css-classes-in-html-doesnt-matter/#comment-1753130 Tue, 17 Dec 2019 20:46:04 +0000 https://css-tricks.com/?p=300141#comment-1753130 Well, unless you go for [class^=”a”] that is.

]]>
By: Koko https://css-tricks.com/the-order-of-css-classes-in-html-doesnt-matter/#comment-1753127 Tue, 17 Dec 2019 18:31:30 +0000 https://css-tricks.com/?p=300141#comment-1753127 CSS always takes place from last to top and right to left so the ordering of the CSS matters not the classes in HTML.

]]>
By: Alex Batista https://css-tricks.com/the-order-of-css-classes-in-html-doesnt-matter/#comment-1753124 Tue, 17 Dec 2019 18:14:45 +0000 https://css-tricks.com/?p=300141#comment-1753124 If we think that before HTML is shown, it loads the css first… so the will colorize the last loaded in the cascade file.

]]>
By: Kyrodes https://css-tricks.com/the-order-of-css-classes-in-html-doesnt-matter/#comment-1753120 Tue, 17 Dec 2019 16:56:43 +0000 https://css-tricks.com/?p=300141#comment-1753120 Because it’s CASCADE Style Sheet. The cascade order is what matters.

]]>
By: zeen3 https://css-tricks.com/the-order-of-css-classes-in-html-doesnt-matter/#comment-1753119 Tue, 17 Dec 2019 16:48:41 +0000 https://css-tricks.com/?p=300141#comment-1753119 Indeed. DOMTokenList (or whatever the name is) is generally considered unordered.

It’s good form, however, to keep these sorts of things in the same order, particularly when using bootstrap or a similar model, due to compression and readability.

]]>