Skip to content
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

What about a new syntax for gradients? #24

Closed
nDmitry opened this issue May 12, 2013 · 6 comments
Closed

What about a new syntax for gradients? #24

nDmitry opened this issue May 12, 2013 · 6 comments

Comments

@nDmitry
Copy link

nDmitry commented May 12, 2013

It would be nice to have a fallback for old syntax when we use the new one (with to keyword). I mean if I type this:

.test {
  background-image: linear-gradient(to right bottom, #000, #fff);
}

I would like to see this output:

.test {
  background-image: -webkit-linear-gradient(top left, #000, #fff); /* and other prefixes... */
  background-image: linear-gradient(top left, #000, #fff); /* fallback to old syntax */
  background-image: linear-gradient(to right bottom, #000, #fff);
}
@ai
Copy link
Member

ai commented May 13, 2013

What browsers need this?

@nDmitry
Copy link
Author

nDmitry commented May 13, 2013

Firefox 16+, Chrome 26+, IE 10, Opera 12.10.
More: https://developer.mozilla.org/en-US/docs/Web/CSS/linear-gradient#Browser_compatibility
It's a standard syntax and it's already implemented in modern browsers.

@ai
Copy link
Member

ai commented May 14, 2013

Maybe we just can replace to left right to degrees values and forget about different syntaxes? What do you think about it?

@ai
Copy link
Member

ai commented May 14, 2013

Nope, to left right is different, that 45deg, because depend on block size :(.

@ai
Copy link
Member

ai commented May 14, 2013

@ai ai closed this as completed May 14, 2013
@ai
Copy link
Member

ai commented May 15, 2013

Released in 0.4.20130515

ai added a commit that referenced this issue Sep 3, 2015
Readme: update live demo link as it's moved to jsbin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants