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

module vs component - why not both? #77

Open
georgir opened this issue May 3, 2018 · 1 comment
Open

module vs component - why not both? #77

georgir opened this issue May 3, 2018 · 1 comment

Comments

@georgir
Copy link

georgir commented May 3, 2018

In section 6, modules, the "Modules vs components" subsection could mention the two are not exclusive of each other. Nested modules are essentially also components and should have both classes.
I.e. you could have class "button" and "checkout-nextStepButton" at once... then have styles that apply for all buttons on .button{...} and those that differentiate this specific button on .checkout-nextStepButton{...}

@adamsilver
Copy link
Owner

Yes, I think that's a fair point, though I'd like to think through some of the problems that may come out of such an approach.

Thinking aloud, it might be that the class name on the button could/should just be .checkout-nextStepButton and that the .button is added via a mixin (or equivalent).

I'd also like to note that the words Module and Components are often used interchangeably, and so I'm thinking about sorting out the nomenclature.

Perhaps:

  • Component (instead of module)
  • Element (instead of component)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants