Are there any advantages to the speed of adding CSS attributes in alphabetical order?

I hope this question is not too strange and arbitrary. When I browse CSS with Firebug, I noticed that the CSS properties for each tag are in alphabetical order.

Is he trying to tell us something?

Besides the obvious benefits of being able to find a property that you are using more quickly, I was wondering: does the browser speed up the use of properties if they are in alphabetical order in the original stylesheet?

For example, this is ...

body {
  background: #222;
  color: #DDD;
  font-size: 0.85em;  
}

#content {
  background: #444;
  padding: 1em;
}

p {
  border-bottom: 0.9em;
  line-height: 1.2em;
  text-align: justify;
}

... better than that ...?

body {
  font-size: 0.85em;
  background: #222;
  color: #DDD;  
}

#content {
  padding: 1em;
  background: #444;
}

p {
  text-align: justify;
  line-height: 1.2em;
  border-bottom: 0.9em;
}

Can this be effectively tested?

This will obviously be replicated throughout the stylesheet so the browser can do something in order, and if so, would it be worth revising past stylesheets to reorder?

- change -

, : , . .. .. ( , !) . , .

, , , !

+5
4

.

, CSS.

, : CSSTidy. ( ).

+2

- FireBug , , , .

0
source

Firebug does this so that developers can easily look up the value of the attribute, and if you want to get the benefit of speed, write your css intelligently, which includes mainly preventing repetition and redundancy and narrowing

Also, when the page loads, and CSS is parsed, and the layout is displayed once, the next time when it does not run again, stay calm and try to make it more convenient for maintenance

0
source

All Articles