0

Quick question which I suppose is trivial. Let's say I write the following CSS:

.card{ width: 200px, height: 500px }

Now I open the page up in Chrome and look at the "computed" tab whilst I have .card selected and it's arranged in alphabetical order. Does the browser conduct this every time you load a page or does this sorting only happen when you open the "computed" tab. Also if the sorting is happening every time you load the page (ie Chrome sorts CSS before executing it) is it possible to gain even a tiny performance boost by sorting your properties in the CSS file to save Chrome the extra work?

I realise I have singled out Chrome but other browsers work similarly

Thanks

Josh Dempsey
  • 253
  • 1
  • 2
  • 10
  • Simply..."NO" it's not. – Paulie_D Dec 08 '15 at 14:53
  • Every element already has those style properties, most iof them initially being set to `0` or `auto`. Think of it as a big struct with each of these properties having their own position. Now executing this stylesheet changes the width property on .card first, then the height property, and that's it. It doesn't add properties to the end of a a list. – Mr Lister Dec 08 '15 at 18:08
  • Possible duplicate of [Are there speed benefits of putting CSS attributes in alphabetical order?](http://stackoverflow.com/questions/7080934/are-there-speed-benefits-of-putting-css-attributes-in-alphabetical-order) – Paul Sweatte Feb 12 '16 at 17:30

0 Answers0