Comments (8)
Thats really sad :(
We are using the CamelCase style and this would be a really nice feature. Since @nicholaslee119 did already the work, why did you not merge it?
from stylelint-bem.
me too, ernscht.
Im also interested in using this with PascalCase
from stylelint-bem.
Thanks a lot for your input.
Because of simplicity, readability and consistency we decided to go the way allowing only small letters in our rules. But, this is not yet set in stone - the idea sounds interesting.
We will reconsider our decision, check your PR and try to merge with our ideas for naming - but we need some time ;-)
from stylelint-bem.
That's where i read under naming rules: "written in lowercase" ;-)
We don't want to invest time in a feature we won't need and in our opinion doesn't make the css more readable and makes the linter more error-prone.
from stylelint-bem.
anyway, I PR for this 😄
from stylelint-bem.
@nicholaslee119 your pull request looks really nice but unfortunately I am with ernscht.
Small cased class names are a standard which is very widely used over the web.
According to stackoverflow:
"Using uppercase, dashes or underscores when naming css selectors"
The CSS spec does not specify how browsers should handle case, so using camelCase leaves one open to ambiguous interpretation.
from stylelint-bem.
Sorry, guys.
Besides @jantimon 's argument (see above), there was another reason not to take over the PR: It was not ready. For example, the linter would not work with PascalCase names, which you want to use.
So, we decided to not apply a PR with a config param which allows classes like m-applEBlock
or o-bAnAnAbLOCK
and, at the same time, disallows classes like m-AppleBlock
.
You see, it's not easy, and we actually want to stick with a small, simple linter.
from stylelint-bem.
Ok, so I why not add options for the different BEM styles? I agree that we don't want to habe something like bAnAnAbLOCK
or m-applEBlock
either ;)
See "Alternative naming schemes" from https://en.bem.info/methodology/naming-convention/
from stylelint-bem.
Related Issues (14)
- make list of prefixes extendable HOT 1
- Support for Namespaces HOT 5
- Please add 'css-nested-elements' rule. HOT 3
- allow scss variables in selectors HOT 1
- Option to customize conventions HOT 10
- Error occurs by using less mixins with brackets. HOT 3
- Rule expected but "%" found plugin/stylelint-bem-namics HOT 2
- Rule expected but ")" found on `:is` with nested selectors HOT 4
- ✖ Rule expected but "_" found plugin/stylelint-bem-namics HOT 2
- Rule expected but "@" found HOT 2
- If I dont want to use patternPrefix and helperPrefix, HOT 6
- Split code formatting from naming convention HOT 2
- Option disallow nested elements HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stylelint-bem.