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

Support radial-gradient #38

Open
outoftime opened this issue Jan 24, 2016 · 3 comments
Open

Support radial-gradient #38

outoftime opened this issue Jan 24, 2016 · 3 comments

Comments

@outoftime
Copy link
Contributor

Hello,

I noticed that radial-gradient and the associated vendor properties are not recognized, though linear-gradient et. al. are. Seems like an oversight?

Thanks for the great library!
Mat

outoftime pushed a commit to popcodeorg/popcode that referenced this issue Jan 24, 2016
…ient

[PrettyCSS does not recognize
`radial-gradient`](fidian/PrettyCSS#38) and
its vendor-prefixed equivalents, so just work around that by checking to
see if the token for that error is a `radial-gradient` property and ignore
the error if it is.
@fidian
Copy link
Owner

fidian commented Jan 25, 2016

I would rather add proper support for the properties. Would you be willing to assemble links to the CSS specs for the various browsers? For instance, typically I have been using the CSS3 spec, useful Webkit Blog Posts and Firefox's documentation. Can you help me find references for the other browsers or variations on the syntax?

With the rules as found on other websites, I am able to make a parser that properly validates the value instead of just ignoring it.

@outoftime
Copy link
Contributor Author

@fidian okay sure, I’ll see what I can come up with. thanks!

@outoftime
Copy link
Contributor Author

@fidian here you go:

  • CSS3 Spec (you have this one)
  • February 2011 CSS3 Draft Spec
  • MDN (you have this one too)
  • WebKit blog post (this is more recent and covers -webkit-radial-gradient, which I believe has the same syntax as the unprefixed version)
  • MSDN blog post (has examples of older -ms-radial-gradient although the article is about moving to the unprefixed versions)
  • Opera blog post (about gradients in general, but includes examples of -o-radial-gradient)

TL;DR: As far as I can see, the -moz, -webkit, and -o vendor prefixed properties use the same syntax as the current unprefixed spec. It appears from the blog post that the -ms vendor prefix used the older draft spec (so e.g. cover is an allowed size). And of course there is -webkit-gradient.

Let me know if that’s helpful—I must admit I am not a CSS expert, so there might be subtlety I’m missing.

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