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

Respect BEM when outputting the base stylesheet #1687

Closed
amsheehan opened this issue Dec 4, 2017 · 3 comments · Fixed by #2255
Closed

Respect BEM when outputting the base stylesheet #1687

amsheehan opened this issue Dec 4, 2017 · 3 comments · Fixed by #2255
Assignees
Labels

Comments

@amsheehan
Copy link
Contributor

Previously, I believe the specificity was warranted because of some other demo pages outside of the MDC Web catalog page. Since this is no longer the case, I think we should change it back to the demo selector.

Instead of .mdc-radio.demo-radio--custom {}, use .demo-radio--custom {}

Also if we're trying to use BEM here, we are using it incorrectly. For there to be a modifier class, we need a block or element to modify.

For instance, in demos/radio.html we have elements with:

class="mdc-radio demo-radio--custom"

This should read: class="mdc-radio demo-radio demo-radio--custom" to adhere to BEM style.

@amsheehan amsheehan changed the title SCSS files in the demo/ folder specify MDC Web's name space in the selectors. SCSS files in the demos folder specify MDC Web's name space in the selectors. Dec 4, 2017
@bonniezhou
Copy link
Contributor

To the first point, yes we should be using only the demo selector in CSS.
To the second point, we decided that for just the demo pages, better readability is more important than strict adherence to BEM style.

@lynnmercier
Copy link
Contributor

See #1733 for an example on how to fix the Sass mixins and demo pages. This PR is for checkbox only

@moog16
Copy link
Contributor

moog16 commented Dec 13, 2017

I will also remove the <style> tags from all the demo files and place into the .scss files. I think @acdvorak mentioned wanting to do that in #1730.

This was referenced Dec 14, 2017
@lynnmercier lynnmercier changed the title SCSS files in the demos folder specify MDC Web's name space in the selectors. Respect BEM when outputting the base stylesheet Jan 23, 2018
@moog16 moog16 self-assigned this Jan 31, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment