An Interest In:
Web News this Week
- April 3, 2024
- April 2, 2024
- April 1, 2024
- March 31, 2024
- March 30, 2024
- March 29, 2024
- March 28, 2024
December 12, 2016 08:53 pm GMT
Original Link: http://csswizardry.com/2016/12/css-shorthand-syntax-considered-an-anti-pattern/
CSS Shorthand Syntax Considered an Anti-Pattern
I remember Estelle Weyl used to mention this a lot in her talks. If you set .button { background: red; }
you've, inadvertently or not, set a whole slew of other properties to their initial values. Harry Roberts demonstrates this clearly and goes so far to say it's a bad practice.
I don't avoid it, but I do actively think about it every time I'm about to use a shorthand. I think "I'm not just doing this to be lazy, …
CSS Shorthand Syntax Considered an Anti-Pattern is a post from CSS-Tricks
Original Link: http://csswizardry.com/2016/12/css-shorthand-syntax-considered-an-anti-pattern/
Share this article:
Tweet
View Full Article