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

doc: fix typos on nested-components.md #83

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/nested-components.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ Sometimes it's necessary to nest components. Here are some guidelines for doing
A component may need to appear a certain way when nested in another component. Avoid modifying the nested component by reaching into it from the containing component.

```scss
.article-header {
.article-link {
> .vote-box > .up { /* ✗ avoid this */ }
}
```

Instead, prefer to add a variant to the nested component and apply it from the containing component.

```html
<div class='article-header'>
<div class='article-link'>
<div class='vote-box -highlight'>
...
</div>
Expand Down