-
-
Couldn't load subscription status.
- Fork 44
Description
This awesome library, does not seem to be currently capable of generating a style sheet statically and ahead of time (as opposed to, on-demand in response to a known JS environment) to be served to potentially many different browsers on different Platforms for which a union of browser prefix Transforms are needed. For instance, I might want to generate my css with both Firefox and Safari prefixes. Currently, you can subclass DevDefaults to override the default implicit def cssEnv with any singular Platform you wish, e.g.:
object DevDefaults extends Exports with DefaultSettings.Dev {
override implicit val cssEnv: CssEnv = {
// val platform: Platform[Option] = Platform[Option](Some("Chrome"),Some("Blink"),Some("40.0.2214.115"),Some("Chrome 40.0.2214.115 on Linux 64-bit"),None,None,Some("Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.115 Safari/537.36"),Some(OS[Option](Some(Bits64),Some("Linux"),None)))
val platform: Platform[Option] = Platform[Option](Some("Firefox"),Some("Gecko"),Some("36.0"),Some("Firefox 36.0 on Linux 64-bit"),None,None,Some("Mozilla/5.0 (X11; Linux x86_64; rv:36.0) Gecko/20100101 Firefox/36.0"),Some(OS[Option](Some(Bits64),Some("Linux"),None)))
CssEnv(platform, CssEnv.Media.empty(None))
}
}
import DevDefaults._
However, it does not seem to be possible to configure this to generate prefixes for TWO Platforms at the same time. Since Platform and Env are both declared final you cannot subclass and override Env.prefixWhitelist and CanIUse2 is an object that cannot be swapped out.
Is there a current, or could there be a feature added, to permit statically generating style sheets targeting multiple `Platforms simultaneously?
Thank you!