Giter VIP home page Giter VIP logo

standardcss's Issues

Write urls without quotes

In README.md you have written that you write urls without quoters. I totally agree with this rule. But if you check .stylelintrc there is written rule "function-url-quotes": "always",. And this mean that you have to write quotes when defining URLs.

If you change it to "function-url-quotes": "never",, everything will be fixed again.

More strict rules

@adamkudrna after your talk in Prague, I tried to implement it in our project https://app.becontentking.com and also did some comparison with this article http://www.creativenightly.com/2016/02/How-to-lint-your-css-with-stylelint/

I think that rules can be more strict. I'll write you down my list of additional rules which works also for us:

  • "max-empty-lines": 3 - sometimes I need to have more empty lines in my comments of SCSS. It will improve readability. But maximum 3 empty lines is enough
  • "selector-list-comma-space-before": "never", "declaration-block-no-duplicate-properties": [true, {"ignore": ["consecutive-duplicates"]}] - prevent duplicates in SCSS
  • "block-no-empty": true - disallow empty blocks in SCSS
  • "color-no-invalid-hex": true - disallow invalid hex color
  • "declaration-colon-space-before": "never" - require a single space or disallow whitespace before the colon of declarations
  • "media-feature-colon-space-after": "always", "media-feature-colon-space-before": "never", "media-feature-name-no-vendor-prefix": true - add stylelint rules for media queries
  • "number-leading-zero": "never" - disallow a leading zero for fractional numbers less than 1
  • "number-no-trailing-zeros": true - disallow trailing zeros in numbers
  • "property-no-vendor-prefix": true, "value-no-vendor-prefix": true - disallow vendor prefixes in SCSS. This job is done usually by autoprefixer.

Really long box-shadow definition

I have this CSS property:

box-shadow: rgba(#000, .15) 0 1px 3px 0,
	rgba(#000, .05) 0 0 0 1px,
	rgba(#3DB6F2, .6) 0 0 0 1px;

With stylelint rule "value-list-comma-space-after": "always", I have to rewrite it to:

box-shadow: rgba(#000, .15) 0 1px 3px 0, rgba(#000, .05) 0 0 0 1px, rgba(#3DB6F2, .6) 0 0 0 1px;

From my point of view this will make box-shadow property really long on one line. What will be better is to allow both: writing everything on one line or on multiline. And always keep rule that we need to have space after comma. Changing stylelint rule value-list-comma-space-after to this "value-list-comma-space-after": "always-single-line", will do this magic 🌹

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.