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

Updating CSSLint and CodeMirror #10

Closed
schomery opened this issue Feb 2, 2017 · 12 comments
Closed

Updating CSSLint and CodeMirror #10

schomery opened this issue Feb 2, 2017 · 12 comments

Comments

@schomery
Copy link
Contributor

schomery commented Feb 2, 2017

#5 (comment)

@silverwind
Copy link
Contributor

stylellint is a more active and modern alternative to CSSLint. It could potentially be included through browserify or webpack.

Also see stylish-userstyles/stylish-chrome#184 for some more discussion about it.

@schomery
Copy link
Contributor Author

schomery commented Feb 8, 2017

CodeMirror and CSSLint are updated to versions 5.23.0 and 1.0.4 on
https://github.com/schomery/stylish-chrome/tree/codemirror-update branch. Please try this branch and report bugs related to these updates

@tophf is there anything else in https://github.com/schomery/stylish-chrome/tree/codemirror-update/codemirror that can be removed?

@tophf
Copy link
Member

tophf commented Feb 8, 2017

Half of the addons you added can be removed I guess. You should have updated only the existing files. See my old PR.

@narcolepticinsomniac
Copy link
Member

It's got some real issues. Basically every line of code is throwing a warning.
chrome_2017-02-08_15-22-02
The warnings are pretty bizarre.
chrome_2017-02-08_15-23-20

@schomery
Copy link
Contributor Author

schomery commented Feb 9, 2017

@tophf all the unnecessary addons are removed; 0e13a15

@narcolepticinsomniac how about now; 0f63da4

@narcolepticinsomniac
Copy link
Member

narcolepticinsomniac commented Feb 9, 2017

Much better so far. I see some improvements on false positives as well. initial doesn't throw warnings and a few other obscure properties are recognized now. Haven't seen any bugs in limited testing, other than some I would guess are still unaccounted for in Lint itself. Still doesn't seem to recognize variables and throws errors, still throws warnings for decimal points in hsl, like: hsl(210, 100%, 2.2%).

Overall it seems a decent improvement. Not sure whether there's any good fixes for Lint's limitations.

@tophf
Copy link
Member

tophf commented Feb 9, 2017

Why CSSLint 1.0.4? It's 1.0.5 in the official repo, the main change being parser 1.1.1 update (see CSSLint/parser-lib@v1.0.0...v1.1.1).

@schomery
Copy link
Contributor Author

schomery commented Feb 9, 2017

@tophf
Copy link
Member

tophf commented Feb 9, 2017

Everything's fine, their versioning is simply weird: 1.0.4 inside the files but the repo is tagged 1.0.5 just after the dist update :-)

@schomery
Copy link
Contributor Author

schomery commented Feb 9, 2017

@narcolepticinsomniac this hsl color warning you get is related to this known-properties rule we added to the linter. It is somehow related to https://github.com/CSSLint/csslint/wiki/Require-fallback-colors. Not sure how to eliminate it.

@narcolepticinsomniac
Copy link
Member

Yeah, like I said, these are "bugs" in CSSLint itself. I don't use variables personally, but a lot of people do. The issue has been brought up for years with no resolution.

As for the hsl warnings, they've gotten rid of the fallback hex warning. The one I was referring to is what I would guess is an oversight, not allowing for decimal points (fractions) in percentage values in hsl regex parsing (found here maybe?). hsl is probably the least popular and I'm sure that even attempting fractions in percentages isn't very common.

Variables are more important, and they tend to throw errors. hsl fractions merely throw warnings and are likely a far less common issue. Not sure what could be done without tweaking CSSLint files, and I don't know how doable that would be.

In general, the update is an improvement regardless. These are only a couple shortcomings I observed right off the bat that were always issues and apparently still are.

@schomery
Copy link
Contributor Author

This is merged to the master branch

@schomery schomery mentioned this issue Mar 3, 2017
tophf added a commit that referenced this issue Nov 21, 2017
hex mode similar to chrome-devtools:
* Ctrl-Up/Down for R channel
* Shift-Up/Down for G channel
* Alt-Up/Down for B channel
* Up/Down treats the entire color as a hex integer e.g. #00f -> #10

rgb/hsl modes similar to chrome-devtools:
* Ctrl-Up/Down steps by 100 (alpha: by 1)
* Shift-Up/Down steps by 10 (alpha: by .1)
* Up/Down steps by 1  (alpha: by .01)

* PgUp/PgDn to switch format
* Tab to switch format when at the first/last input field
tophf added a commit that referenced this issue Nov 24, 2017
hex mode similar to chrome-devtools:
* Ctrl-Up/Down for R channel
* Shift-Up/Down for G channel
* Alt-Up/Down for B channel
* Up/Down treats the entire color as a hex integer e.g. #00f -> #10

rgb/hsl modes similar to chrome-devtools:
* Ctrl-Up/Down steps by 100 (alpha: by 1)
* Shift-Up/Down steps by 10 (alpha: by .1)
* Up/Down steps by 1  (alpha: by .01)

* PgUp/PgDn to switch format
* Tab to switch format when at the first/last input field
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

4 participants