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

Gradient has outdated direction syntax. New syntax is like "to left" instead of "right". #530

Closed
KrunchMuffin opened this issue Sep 28, 2015 · 20 comments · Fixed by foxythemes/bootstrap-datetimepicker-bs4#1

Comments

@KrunchMuffin
Copy link

The line is actually
background-image: linear-gradient(top, #fdd49a, #fdf59a);
not sure where right is coming from? Not even using right at all in the file.

v3.0.2 Gulp

@TrySound
Copy link
Member

@KrunchMuffin Yeah, a little mistake, but hope you understood. Instead of top you should use to bottom value.

@KrunchMuffin
Copy link
Author

Ok, thx. Thought it was to top.

@TrySound
Copy link
Member

Need to fix warning

@ai
Copy link
Member

ai commented Oct 10, 2015

@TrySound what we need to fix in warning?

@ai ai closed this as completed Oct 10, 2015
@ai
Copy link
Member

ai commented Oct 10, 2015

I checked warnings. Everything is fine.

@josephrexme
Copy link

For me there was neither a right or a top. I had a to right which should be correct considering the to bottom for top. Here's my code:

background-image: linear-gradient(to right, #aaa 80%, #555);

@ai
Copy link
Member

ai commented Dec 8, 2015

@bl4ckdu5t maybe you have some legacy code or CSS from libraries?

@josephrexme
Copy link

That was the case exactly. Thanks

@BockwurstJoe
Copy link

actually I had the same warning for:
position: absolute;
left: 10px;
right: 10px;
I guess it would not be interpreted correctly if I take to right and to left here :P

@sekoyo
Copy link

sekoyo commented Nov 20, 2018

This error is really getting to me, postcss vendor prefix is outputting:

background-image: -webkit-linear-gradient(top, #78932b, #8cb434);
  background-image: -moz-linear-gradient(top, #78932b, #8cb434);
  background-image: -o-linear-gradient(top, #78932b, #8cb434);
  background-image: linear-gradient(to bottom, #78932b, #8cb434);

Is that not correct? Doesn't it make sense old vendor prefixes have the old syntax?

@ai
Copy link
Member

ai commented Nov 20, 2018

@dominictobias show full text of your warning

@sekoyo
Copy link

sekoyo commented Nov 20, 2018

@ai Not much to go by but here it is! (using latest create-react-app react-scripts):

(2183:3) Gradient has outdated direction syntax. New syntax is like `to left` instead of `right`.

./node_modules/neo-core-css/dist/neo-core-css.css (./node_modules/css-loader??ref--6-oneOf-3-1!./node_modules/postcss-loader/src??postcss!./node_modules/neo-core-css/dist/neo-core-css.css)
Warning

That isn't a public NPM module sorry!

@ai
Copy link
Member

ai commented Nov 20, 2018

Maybe it is different line? Your code is correct.

@sekoyo
Copy link

sekoyo commented Nov 20, 2018

@ai whoops, thanks for confirming, I've found the culprit now (y)

epalmans added a commit to epalmans/x-editable that referenced this issue Oct 3, 2019
Outdated syntax causes warnings with postcss.

- postcss/autoprefixer#530
- https://developer.mozilla.org/en/docs/Web/CSS/linear-gradient

PS. I know this addresses an issue from a 3rd party component. However, bootstrap-datapicker seems unmaintained. Or if you're using a fork, kindly let me know and I'll be happy to PR to that repo instead
@andreas83
Copy link

just want to point out, its 2019 and this issue is still helpful. not sure if this is a good or bad thing.

@OttoTrezza
Copy link

For me there was neither a right or a top. I had a to right which should be correct considering the to bottom for top. Here's my code:

background-image: linear-gradient(to right, #aaa 80%, #555);

i have this..
-moz-linear-gradient(top, #ffffff, #f0f0f0);
and i change it for...
-moz-linear-gradient(to right, #ffffff, #f0f0f0);

the same error disapear!

JacobHsu added a commit to JacobHsu/vue-web-app that referenced this issue Feb 27, 2020
@abdullaachilov
Copy link

Just to be clear, we should change

top - > to bottom
left - > to right
right - > to left ??

@ai
Copy link
Member

ai commented Jan 25, 2021

@abdullaachilov yeap

@dragoscv
Copy link

Just to be clear, we should change

top - > to bottom
left - > to right
right - > to left ??

2022 and this post still helpful

@KrunchMuffin
Copy link
Author

And green means stop and red means go. Glad I could be of assistance all these years later. 😁

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

Successfully merging a pull request may close this issue.

10 participants