Is there a way to have separate transitions in media queries without duplicating code?
@media screen and (min-width: 800px) {
#div {
transition: width 1s;
}
}
#div {
transition: height 1s; /* Overrides previous one :( */
}
How can I achieve this? Is there an alternative to creating multiple duplicate media queries?
@media screen and (max-width: 799px) {
#div {
transition: height 1s;
}
}
@media screen and (min-width: 800px) {
#div {
transition: width 1s, height 1s; /* Ugly duplication :( */
}
}
This issue extends beyond just media queries to complex selectors as well.