I'm writing SCSS mixins for using it for responsive web design.
For example:
// Large devices
@mixin lg {
@media (min-width: #{$screen-lg-min}) {
@content;
}
}
// Extra large devices
@mixin xl {
@media (min-width: #{$screen-xl-min}) {
@content;
}
}
Now I wanna write a mixin for extra large devices
$screen-2xl-min: 1536px;
But when I try to declare the mixin:
@mixin 2xl {
@media (min-width: #{$screen-2xl-min}) {
@content;
}
}
He gives an error with:
Expected identifier: @mixin 2xl {
Can someone help me? Is there an option to let the name start with a number??
Top comments (0)