refactor: divider documentation#2978
Conversation
✅ Deploy Preview for boosted ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
louismaximepiton
left a comment
There was a problem hiding this comment.
It looks way better, just some questions because I can't remember the meetng we had about it
| description: Use the horizontal or vertical rule helpers to create dividers. A divider can be used to visually structure an interface by clearly separating content sections. | ||
| group: helpers | ||
| aliases: | ||
| - "/docs/helpers/divider/" |
There was a problem hiding this comment.
Should we add ? for links compatibility
| - "/docs/helpers/divider/" | |
| - "/docs/helpers/divider/" | |
| - "/docs/helpers/dividers/" |
There was a problem hiding this comment.
/docs/helpers/dividers only exist since 0.4, I don't think anyone has bookmarked it yet. ;-)
There was a problem hiding this comment.
If a page has already been published, the file exists in the gh-pages branch. If we don't keep this alias for new versions, Hugo will not generate a new page with a redirection, and when we'll update the doc we will not overwrite the existing file. Therefore we will have the old page available on /dividers/ and the new one on /divider/. I would keep the alias, even if you're not wrong, nobody should have bookmarked the page.
There was a problem hiding this comment.
Ok noted. I add the link for compatibility
There was a problem hiding this comment.
We've lost the colored bg part, I can't remember if it was asked or not 🤔
There was a problem hiding this comment.
You have some examples in the color section, isn't it enough?
| description: Use the horizontal or vertical rule helpers to create dividers. A divider can be used to visually structure an interface by clearly separating content sections. | ||
| group: helpers | ||
| aliases: | ||
| - "/docs/helpers/divider/" |
There was a problem hiding this comment.
If a page has already been published, the file exists in the gh-pages branch. If we don't keep this alias for new versions, Hugo will not generate a new page with a redirection, and when we'll update the doc we will not overwrite the existing file. Therefore we will have the old page available on /dividers/ and the new one on /divider/. I would keep the alias, even if you're not wrong, nobody should have bookmarked the page.
|
|
||
| ## Horizontal rules | ||
|
|
||
| Horizontal rules should use the `<hr>` tag, when the separator has semantic meaning (i.e., when it represents a topic change or a significant transition in the content). If the divider is purely decorative, prefer using a border CSS property on a `<div>` or our [border utilities]({{< docsref "/utilities/borders" >}}), or even ensure to hide it from assistive technologies (e.g., `aria-hidden="true"`). |
There was a problem hiding this comment.
Maybe we should be less specific and say "on an element" or "on an HTML element" rather than "on a div" ?
There was a problem hiding this comment.
Ok for me, I updated the doc
| {{< example class="d-flex flex-column gap-1" >}} | ||
| <div><hr class="border-muted"></div> | ||
| <div><hr class="border-emphasized"></div> | ||
| <div><hr class="border-brand-primary"></div> |
There was a problem hiding this comment.
I think we could remove the <div> element around the <hr> on these 3 examples. It is not needed, and it will make it easier to see the hr element.
e3bb682 to
522ff26
Compare
Related issues
#2977
Description
Update Divider documenation
Motivation & Context
Following design review in order to be more structured and comprehensive
Types of change
Live previews
Checklist
Contribution
Accessibility
Design
Development
Documentation