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

chore(docs): core docs about style components (draft) #27

Merged
merged 1 commit into from Sep 17, 2019

Conversation

tlouisse
Copy link
Member

@tlouisse tlouisse commented May 7, 2019

Draft for documenting shadow BEM modifiers: they should be .my-block[modifier] instead of .my-block--modifier. See don't self-apply classes.

Please note that the scope of this pull request is way broader than only modifiers: the documentation also contains the context (why we use BEM and how to apply it in shadow dom).

Please have a quick look at this draft.
If we agree on the approach (about modifiers), we should also make issues to align all of our CSS with it.
Also, it might lead to some discussions about how we want to map style modules to webcomponents having shadow dom.

I will reread this myself and try to wrap up in a few days


## Style components
A style component consists of a set of css classes mapping to a certain html structure.
Read [more about style components](./styleComponents.md) here.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

link is 404

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

- **Performance** we aim for applications having a limited number of shadow roots and we consider
shadow root creation a performance concern. Style components reduce the need for shadow roots.
<!-- TODO: we definitely suffered here in the Polymer era. We might want to create some new perf
tests for our lit-element based apps to verify this claim again. -->
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe make this TODO visible in the Markdown for everyone, not only in the source code?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea. Will pick up later

packages/core/docs/definitions.md Outdated Show resolved Hide resolved
packages/core/docs/definitions.md Outdated Show resolved Hide resolved
packages/core/docs/markupAndStyling.md Outdated Show resolved Hide resolved
packages/core/docs/styleComponents.md Outdated Show resolved Hide resolved
packages/core/docs/styleComponents.md Outdated Show resolved Hide resolved
packages/core/docs/styleComponents.md Outdated Show resolved Hide resolved
packages/core/docs/styleComponents.md Outdated Show resolved Hide resolved
packages/core/docs/styleComponents.md Outdated Show resolved Hide resolved
packages/core/docs/styleComponents.md Outdated Show resolved Hide resolved
packages/core/docs/styleComponents.md Outdated Show resolved Hide resolved
@daKmoR daKmoR force-pushed the docs/shadowBem branch 2 times, most recently from a39c637 to 4ea5d94 Compare September 17, 2019 08:58
@daKmoR daKmoR marked this pull request as ready for review September 17, 2019 09:00
@daKmoR daKmoR merged commit 11ee5e9 into master Sep 17, 2019
@daKmoR daKmoR deleted the docs/shadowBem branch September 17, 2019 09:04
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

Successfully merging this pull request may close these issues.

None yet

5 participants