Use mediaqueries with help of the matchMedia method.
npm install @jtorm/mediaquery-method
Option | Type | Required | Description |
---|---|---|---|
q |
string |
true |
Mediaquery. |
->mediaquery(q: '(min-width: 950px)') {
body->attr {
n: 'class';
v: 'min-width-950';
m: 'a';
}
}
->mq {
q: '(max-width: 949px)';
body->attr {
n: 'class';
v: 'max-width-949';
m: 'p';
}
}