postcss / postcss-bem-linter

A BEM linter for postcss
MIT License
571 stars 35 forks source link

Allow chaining modifier and state in suit selector #81

Closed flip-it closed 8 years ago

flip-it commented 8 years ago

Chaining modifiers and state, like: .Foo--big.Foo--colored or .Foo.is-open.is-disabled, isn't a problem according to Suit as far as I can read out. I'm already using it in a project. Though I need the stylelint-disable comment to pass stylelint. I suggest this plugin to allow chaining, with these changes.

davidtheclark commented 8 years ago

@flip-it: Thanks. Chaining state classes seems pretty legit to me, but I'm not so sure about chaining modifiers. Can you please verify this with the SUITCSS team?

tbck commented 8 years ago

IMO chaining modifiers breaks BEM by adding specificity to selectors. The only benefit being prettier classnames. Would be interested to see what others have to say though.

davidtheclark commented 8 years ago

I agree that chaining modifiers seems to mean that you are introducing unnecessary specificity and there should be a better way.

flip-it commented 8 years ago

Thanks for your considerations. Seems that the Suit team agrees on allowing the chaining: https://github.com/suitcss/suit/issues/131

davidtheclark commented 8 years ago

OK, thanks! I will look into merging that PR tonight or tomorrow.

On Mon, Feb 29, 2016 at 8:11 AM, Filip Holm notifications@github.com wrote:

Thanks for your considerations. Seems that the Suit team agrees on allowing the chaining: suitcss/suit#131 https://github.com/suitcss/suit/issues/131

— Reply to this email directly or view it on GitHub https://github.com/postcss/postcss-bem-linter/pull/81#issuecomment-190251658 .

davidtheclark commented 8 years ago

What do you think --- breaking change? or minor update?

davidtheclark commented 8 years ago

Released in 2.4.0.

flip-it commented 8 years ago

Great!

simonsmith commented 8 years ago

Nice one :+1: