Are "CSS Shorthand" not good in team development?
When multiple person work on same project . any person can have different level knowledge of CSS so some people can be confused with shorthand when they need any changes in css.
For example:
Should i avoid this
font: 1em/1.5em bold italic serif
and use this
font-size: 1em;
line-height: 1.5em;
font-weight: bold;
font-style: italic;
font-family: serif
in team development? and Which shorthands are other CSS shorthand are not good to use for readability and which are good?
When "writing code", i tend to be fairly verbose. When code such as css/js are pushed to production they can easily be minimized/optimized automatically by a delivery script, giving you the best of both worlds.
While evidently unpopular on SO, a couple points in favor of breaking things onto multiple lines in team scenarios:
1) Clarity when using source control. Individual lines changing in source control are often easier to deal with and very clear when reviewing changelogs.
2) With tools like firebug, etc. having the correlation to exact line numbers can be helpful when you are tweaking properties, hunting, saving, reloading vs. one property of many in one line.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With