com-lihaoyi / scalatags

ScalaTags is a small XML/HTML construction library for Scala.
https://com-lihaoyi.github.io/scalatags/
MIT License
758 stars 117 forks source link

Support media queries in stylesheet package #156

Open lihaoyi opened 7 years ago

lihaoyi commented 7 years ago

Currently they don't work. You can do weird workarounds by embedding the entire text of a stylesheet into a string:

tags2.style(s"@media (min-width: 60em) {${styles.Wide.sheet}}"),
tags2.style(s"@media (max-width: 60em) {${styles.Narrow.sheet}}"),

But they really should be supported as part of scalatags.stylesheet