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

Stylus catched some errors with the CSS #534

Closed
ghost opened this issue Sep 5, 2017 · 7 comments
Closed

Stylus catched some errors with the CSS #534

ghost opened this issue Sep 5, 2017 · 7 comments

Comments

@ghost
Copy link

ghost commented Sep 5, 2017

warning | 925 | : | 5 | Expected (static | relative | absolute | fixed) but found 'sticky'.
warning | 926 | : | 5 | Expected (static | relative | absolute | fixed) but found '-webkit-sticky'.
warning | 931 | : | 5 | Expected (static | relative | absolute | fixed) but found 'sticky'.
warning | 932 | : | 5 | Expected (static | relative | absolute | fixed) but found '-webkit-sticky'.
warning | 965 | : | 5 | Duplicate property 'background-color' found.
warning | 1239 | : | 14 | Expected (static | relative | absolute | fixed) but found 'sticky'.
warning | 1241 | : | 7 | Expected (static | relative | absolute | fixed) but found 'sticky'.
warning | 3283 | : | 5 | Duplicate property 'background' found.


I'm using Stylus 1.1.3.1 with Firefox 55.0.3 (64-bit) and latest GitHub-Dark theme

Thanks!

@Mottie
Copy link
Member

Mottie commented Sep 6, 2017

Hi @MrLabRat!

Those are CSSLint issues. The CSSLint core isn't getting updated, but the owners of Stylus (and me) have addressed this and added support for position: sticky.

The two duplicate properties are due to the way we set up GitHub-Dark... within our style you'll find two entries that use this similar format:

.selector {
  background-color: rgba(65, 131, 196, .2) !important;
  background-color: rgba(, .2) !important;
}

What happens is that Userstyles replaces the /*[[base-color-rgb]]*/ with the custom color you select when installing the style, but if you keep the default color, you'll end up with a duplicate rgba() color. This is why CSSLint is reporting duplicate properties.

So, bottom line, please ignore these errors. In the next version of Stylus, you'll still see the duplicate warning, but you'll be able to configure the linter to disable that warning.

@silverwind
Copy link
Member

Maybe the Stylus default linter config should be adjusted to ignore duplicates, seeing that it is probably pretty common among userstyles.

@Mottie
Copy link
Member

Mottie commented Sep 6, 2017

Like I said, you can change the CSSLint configuration in the next update... I also added Stylelint support, and the ability to configure it as well - see openstyles/stylus#150.

@ghost
Copy link
Author

ghost commented Sep 6, 2017

Thanks for all your replies! :D

@Mottie Mottie closed this as completed Sep 6, 2017
@Mottie
Copy link
Member

Mottie commented Sep 7, 2017

Stylus v1.1.4.1 for Firefox is now available.

@ghost
Copy link
Author

ghost commented Sep 7, 2017

Yeah, I've already have it on auto-update 👍

Thanks!

@tophf
Copy link

tophf commented Sep 13, 2017

As for the duplicates, it's possible to disable CSSLint warning via inline comments, FWIW.

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

3 participants