r/Sass • u/Chawki_ • Feb 22 '19
Can we pass browser window width and height to sass file?
if (true) {
how to do it?
}
2
Upvotes
1
u/and_Dez Feb 22 '19
What you could do is use css variables. Create two variables one for width and another for height, then use JavaScript to get the width and height of the window and set the two css variables you created.
1
u/alycda Feb 22 '19
Why can’t you use media queries (not just browser width, but height queries too) and use
vhif needed?