Comments (12)
I'm inclined to agree. The only question I have is what should the output look like in that case? Let's suppose we have
{:some-property ^:prefix ^:vendors [:webkit] (some-css-fn ...)}
Do we compile separate declarations for each vendor?
lol {
some-property: -webkit-some-css-fn(...);
some-property: some-css-fn(...);
}
from garden.
Yes, that's the correct way of doing this according to MDN. See
https://developer.mozilla.org/en-US/docs/Web/CSS/calc#Examples
On Sat, May 24, 2014 at 9:15 PM, Joel Holdbrooks
[email protected]:
I'm inclined to agree. The only question I have is what should the output
look like in that case? Let's suppose we have{:some-property ^:prefix ^:vendors [:webkit](some-css-fn ...)}
Do we compile separate declarations for each vendor?
lol {
some-property: -webkit-some-css-fn(...);
some-property: some-css-fn(...); }—
Reply to this email directly or view it on GitHubhttps://github.com//issues/52#issuecomment-44096853
.
from garden.
You might also want to consider the following: transtion: all 1s, -webkit-transform 2s;
from garden.
OK. I think this is doable but it's going to require a bit of forethought and planning before we can make this happen. One concern is
^:prefix {:some-property ^:prefix (some-css-fn ...)}
I suppose we could make the assumption that if, for example, the vendors were [:moz :webkit]
we'd compile three lines: one for -moz-
, one for -webkit-
, and one unprefixed.
from garden.
@jeluard I think we can handle that case during declaration expansion but that's kind of gross. The compiler needs to be reworked to operate on a data format like tools.analyzer
has. I've been toying with that idea and I'm willing to bet we could make a lot of these problems go away by moving in that direction.
from garden.
I suppose we could make the assumption that if, for example, the vendors were [:moz :webkit] we'd compile three lines: one for -moz-, one for -webkit-, and one unprefixed.
Sounds reasonable.
from garden.
@the-kenny @jeluard If you guys think of any more edge cases be sure to post them here. I want to close out some of the other stale issues before moving on this.
from garden.
Also not sure how it fits here but I've been thinking it would be really nice to leverage CSS.supports for the ClojureScript implementation. It would allow to generate the proper flavor at runtime and skip the useless ones.
from garden.
@jeluard Yes! That definitely needs to get added!
from garden.
...two years later this has been fixed (734e494).
from garden.
seems like this never got closed?
from garden.
@awkay it's fixed on the 2.0.0
branch (which is still in the works).
from garden.
Related Issues (20)
- defcssfn don't behave as documented HOT 2
- Incorrect CSS emitted for inner media queries HOT 6
- Link broken for Tutorial and example in Wiki HOT 6
- how to supply the value to grid-template-area? in css it is multiple strings... HOT 3
- Changelog since 1.3.6 HOT 1
- Property order is different in output CSS, renders incorrectly in browser HOT 7
- `as-hex` taking into account Alpha value
- No `fr` unit
- Question about defining multiple style maps HOT 6
- Add support for container queries HOT 3
- Incorrect CSS emitted for "&" parent selector
- defcssfn is not defined in cljs or cljc
- `ClassNotFoundException` thrown when running tests on Java 11
- Warning about `garden.color/abs` shadowing `clojure.core` output when using Clojure 1.11.0 HOT 1
- `::marker` pseudo element isn't supported HOT 2
- Release request, to prevent repeated shadowed-var warnings in the REPL HOT 13
- Incorrect handling of selectors HOT 1
- Incorrect css generation HOT 1
- content: " " produces wrong output HOT 5
- Feature request: Support for cascade layers HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from garden.