-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
About the css prefix to css #1485
Comments
Not quite sure I follow – can you create a reproduction in the REPL? https://svelte.technology/repl |
https://svelte.technology/repl?version=2.6.4&gist=6ef4f009ca9ae20c24f422d0e44ea7a3 The h1 will not show in the older browser because the transition is implemented by @Keyframe, for example: @keyframe name {
...
} but svelte will not include the prefixed @Keyframe: @-webkit-keyframes name{
...
} So in the old browser would throw a css insert error, and not show the h1 in the REPL example. at the moment, I am not sure why it throw the error, So I guess the reason is that the the prefixed @Keyframes is not included in the animation rule. |
https://svelte.technology/repl?version=2.6.4&gist=cb9db0e243ab33370295a144ad025954 This is another example which add a style attribute. The style include transform css rule In #558 you also had ask about browser support. So my suggestion is that
|
@szmtcjm You can do that at the And then you can just add |
@kaisermann Did you mean add preprocess for the |
@szmtcjm Oh, my bad! Actually, I've just hit the same issue with inline styles. Will update here if I find any solution for it. About the This: @keyframes test {
to {
transform: translateX(125%)
}
} Generates: @-webkit-keyframes test {}
@keyframes svelte-1erlk4x-test {
to {
-webkit-transform: translateX(125%);
transform: translateX(125%)
}
} |
@kaisermann It's true. So I put autoprefixer in the css option of svelte instead of preprocess. svelte({
css: css => {
postcss([autoprefixer({...})])
.process(css.code)
.then(result => css.write(...))
}
}) |
@kaisermann Awesome! But my problem have not solved. |
@szmtcjm The fix in 2.7.0 looks to be working to me - |
Here's the REPL. It's transforming the |
At what step is that happening? It looks to me like that is the browser's doing. In the generated code, I see |
Oh, I see. The api |
@szmtcjm Do you still have other questions or issues related to this - or can this be closed? |
@Conduitry transitions which implemented by |
I'm not sure what would be a good way to handle that that wouldn't impact the vast majority of users who don't need this. The |
@Conduitry emm... It will throw an error when insert the |
We solved this by overriding browser's |
When I use css prefix on style attributes of the html template, svelte will remove it.
Or when I use transition, svelte will not include css prefix and my page will break down in the old browsers.
The text was updated successfully, but these errors were encountered: