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

feat(lineLength): Add class to limit line length #883

Merged
merged 6 commits into from
Nov 22, 2021

Conversation

louismaximepiton
Copy link
Member

@louismaximepiton louismaximepiton commented Nov 3, 2021

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.

Signed-off-by: louismaximepiton <louismaxime.piton@orange.com>
site/content/docs/5.1/getting-started/accessibility.md Outdated Show resolved Hide resolved
scss/_variables.scss Outdated Show resolved Hide resolved
site/content/docs/5.1/utilities/text.md Outdated Show resolved Hide resolved
scss/_variables.scss Outdated Show resolved Hide resolved
louismaximepiton and others added 4 commits November 17, 2021 15:28
Signed-off-by: louismaximepiton <louismaxime.piton@orange.com>
Signed-off-by: louismaximepiton <louismaxime.piton@orange.com>
Copy link
Member

@julien-deramond julien-deramond left a 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?

@julien-deramond julien-deramond merged commit 578d907 into main Nov 22, 2021
@julien-deramond julien-deramond deleted the main-louismaximepiton-line-length branch November 22, 2021 13:14
@julien-deramond julien-deramond mentioned this pull request Nov 22, 2021
Copy link
Contributor

@ffoodd ffoodd left a 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).
Copy link
Contributor

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?

Copy link
Member

Choose a reason for hiding this comment

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

Thanks @ffoodd. Your feedback (both comments) will be tackled in #925

@@ -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.
Copy link
Contributor

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.

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

Successfully merging this pull request may close these issues.

Paragraph's line lentgh as a boolean variable?
4 participants