-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
at-media does not allow for non-standard media queries #7
Comments
Thanks! I appreciate it. :)
I think you're right. This is a good idea and eventually I'd like to see this happen.
Yes, this is definitely in order. The problem is I made media queries too strict (see here) basing them solely on what was put forward in the specs. This morning I also discovered it's not possible to express something like Taking these two problems in to account I think it's probably best that Garden avoid the business of validating media query properties and just focus on the semantics of values. This would solve your issue and (potentially) prevent others like it in the future. I'll get started on a patch and keep an eye on this issue. Please let me know if you spot anything else. |
Thanks for the timely response.
I agree. Even if you had a clojure CSS3 parser that was fully compliant with W3 standards that you could use for proper validation, you would still need the parser to recognize CSS3 vendor-specific grammar subsets... e.g. maybe the parser would accept a keyword/value pair like {:include-grammar "webkit"} or {:include-grammar "mozilla"}. Better to leave validation to another library! |
OK. That should do it. I've pushed up a new version of the library so we should be good to go. Thanks for bringing this to my attention! I appreciate it. |
Thanks for making media queries like this possible: repl> (css (at-media {:screen true :min-device-width (px 1080) :orientation :portrait :-webkit-min-device-pixel-ratio "3"} [:html {:width (px 1080)}])) |
First, I want to say that I like garden. A clojurescript port would be very nice... using the library for in-browser dynamic CSS generation for media queries would be awesome but I digress.
My issue is that non-standard media queries are not recognized.
e.g. at the repl:
repl> (css (at-media {:screen true :-webkit-min-device-pixel-ratio "2"} [:html {:width "480px"}]))
"@media screen{html{width:480px}}"
Could you please allow for generic media queries to be made so that vendor specific media queries can be created? I think something as simple as wrapping parens around anything that has a non-boolean value {:query "value"} -> (query:value) and anything with a boolean value like {:query true} -> query
Thanks!
The text was updated successfully, but these errors were encountered: