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

use stylelint to normalize default stylesheets #14152

Merged
merged 1 commit into from Apr 11, 2019

Conversation

fdellwing
Copy link
Contributor

While doing another PR I noticed that the indentation in the stylesheets is really bad. I run stylelint with autofix enabled against it and this is the result. There are still some things that it doesn't like, but that are mostly order of selector related issues.

Please test the changes locally to make sure everything still works.

I used the following config: https://github.com/stylelint/stylelint-config-standard

Extends stylelint-config-recommended.

Turns on additional rules to enforce the common stylistic conventions found within a handful of CSS styleguides, including: The Idiomatic CSS Principles, Google's CSS Style Guide, Airbnb's Styleguide, and @mdo's Code Guide.

It favours flexibility over strictness for things like multi-line lists and single-line rulesets, and tries to avoid potentially divisive rules.

@fdellwing
Copy link
Contributor Author

You can do this yourself very easily:

Install stylelint and stylelint-config-standard:

npm install -g stylelint
npm install -g stylelint-config-standard

Run find plugins/Morpheus/stylesheets/ -type f -regextype posix-extended -regex '.*.(css|less|sass)' -exec stylelint --config "/usr/lib/node_modules/stylelint-config-standard" {} --fix \; in your Matomo base dir.

@fdellwing fdellwing force-pushed the stylelint branch 2 times, most recently from 785b15a to 1438c80 Compare March 19, 2019 15:51
@tsteur
Copy link
Member

tsteur commented Apr 11, 2019

@fdellwing there's a merge conflict where I wasn't 100% sure how to resolve it. Could you resolve the conflict and then we can merge?

Cheers for this 👍

@fdellwing
Copy link
Contributor Author

Let's see how it looks like after the latest changes, should not change much.

@fdellwing
Copy link
Contributor Author

UI failures seem unrelated to me, but there are a lot of them.

This should be probably be looked at outside of this PR: https://builds-artifacts.matomo.org/matomo-org/matomo/3.x-dev/33656/Overlay_framed_loaded.png

@tsteur
Copy link
Member

tsteur commented Apr 11, 2019

Thanks @fdellwing

Looked good on my local instance 👍

@tsteur tsteur merged commit 7a7f529 into matomo-org:3.x-dev Apr 11, 2019
@tsteur tsteur added c: Platform For Matomo platform changes that aren't impacting any of our APIs but improve the core itself. c: Tests & QA For issues related to automated tests or making it easier to QA & test issues. and removed c: Platform For Matomo platform changes that aren't impacting any of our APIs but improve the core itself. labels Apr 11, 2019
@fdellwing fdellwing deleted the stylelint branch May 9, 2019 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: Tests & QA For issues related to automated tests or making it easier to QA & test issues.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants