css - How important is the order of Attributes within a class -
i know if order within class important , if might effect speed of website. know order of classes within stylesheet important what's attributes within classes, important too?
has correctly or incorrectly order of attributes within class effect? if so, effect , common rule such order?
of course there more attributes guess should give idea order use. there should/can improve it:
- positioning
- styling
- font
- radius
css
.example_class { float: l/r; position: rel/absl; margin: 0 0 0 0; padding:0 0 0 0; width: xy px; height: xy px; background: image/color; font-family: font-name; font-size: xy px; color: #xyz / #abcdef / red; radius: 0 0 0 0; }
the order of properties within selector doesn't matter @ all, aside fact can override selectors browsers can't read:
background: #fff; /* used browsers can't understand: */ background: linear-gradient(...);
other it's matter of taste -- sort them alphabetically or "group" you've done, or whatever like.
Comments
Post a Comment