-
Notifications
You must be signed in to change notification settings - Fork 56
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
feat(lineLength): Add class to limit line length #883
Conversation
Signed-off-by: louismaximepiton <louismaxime.piton@orange.com>
Signed-off-by: louismaximepiton <louismaxime.piton@orange.com>
Signed-off-by: louismaximepiton <louismaxime.piton@orange.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good to me. @Lausselloic, do you want to look at it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great feature, nice to see this implemented!
|
||
### Maximum line length | ||
|
||
When writing a paragraph, it is commonly admitted that a line should have 80 characters as a maximum. This phenomenon is carefully explained in the [C20 website: Using relative measurements to set column widths](https://www.w3.org/TR/2016/NOTE-WCAG20-TECHS-20161007/C20). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
C20 is a WCAG technique, not a website. Maybe ask for some EASE review for such contents?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -101,6 +101,17 @@ Change the line height with `.lh-*` utilities. | |||
<p class="lh-lg">This is a long paragraph written to show how the line-height of an element is affected by our utilities. Classes are applied to the element itself or sometimes the parent element. These classes can be customized as needed with our utility API.</p> | |||
{{< /example >}} | |||
|
|||
## Line length | |||
|
|||
Limit the line length with `.ll-*` utilities. It applies `max-width` rule to an element with a width based on `ch` dimension, only on block-level elements and not on inline elements. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
max-width
us a property, not a rule.
ch
is a unit, not a dimension—and maybe explain why it's done using this unit?
No need to mention block
/inline
since max-width
doesn't apply to inline
elements anyway. Probably better to mention that it required anything but inline
to apply.
Fix #219 Netlify : https://deploy-preview-883--boosted.netlify.app/docs/5.1/utilities/text/#line-length
Adding a class instead of a boolean attribute because of the css optimization. Moreover, I think it fits well with text utilities section.