Ana Tudor 🐯 on Nostr: #tinyCSStip #KnowYourDefaults: default direction for a `linear-gradient()` is 180deg ...
#tinyCSStip
#KnowYourDefaults: default direction for a `linear-gradient()` is 180deg (12 o'clock to 6 o'clock).
❌ DON'T
`linear-gradient(to bottom, gold, purple)`
✅ DO
`linear-gradient(gold, purple)`
Both produce the same visual result, but 2nd is easier to read & process, not to mention fewer bytes.
#CSS #CSSgradient #coding #frontend #webDev #webDevelopment
#KnowYourDefaults: default direction for a `linear-gradient()` is 180deg (12 o'clock to 6 o'clock).
❌ DON'T
`linear-gradient(to bottom, gold, purple)`
✅ DO
`linear-gradient(gold, purple)`
Both produce the same visual result, but 2nd is easier to read & process, not to mention fewer bytes.
#CSS #CSSgradient #coding #frontend #webDev #webDevelopment