-
-
Notifications
You must be signed in to change notification settings - Fork 557
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
Restructure checklist data #1268
Conversation
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.
I love how DRY this is, thank you. A couple of pieces of feedback, but big-picture this is great.
|
||
// u-text-transform-sentence-case | ||
// | ||
// Converts the text of an element into sentence case. | ||
// NOTE: This utility is not recommended for elements that contain proper nouns, | ||
// as it will convert those proper nouns to lowercase. | ||
|
||
// Markup: | ||
// <p class="u-text-transform-sentence-case">The first letter in this sentence will be capitalized.</p> | ||
// | ||
// Styleguide Utilities.Type Alignment.u-text-transform-sentence-case | ||
.u-text-transform-sentence-case { | ||
text-transform: lowercase; | ||
|
||
&::first-letter { | ||
text-transform: uppercase; | ||
} | ||
} |
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.
@ericwbailey 👀 🔍
I've renamed the class to better describe what it does, as title case and sentence case are different. As a personal stylistic preference, I generally style my headings in sentence case, rather than title case. If you want something different for the headings in the checklist, I'm happy to use the text-transform-initial utility there instead.
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.
I also prefer sentence case. I think this is great, merging.
// NOTE: This utility is not recommended for elements that contain proper nouns, | ||
// as it will convert those proper nouns to lowercase. |
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.
Nice.
|
||
<h2 id="keyboard" class="c-heading-large"> |
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.
❤️
Unblocks some work in #940
Summary
This PR restructures
checklist.json
data so that each checklist category includes its ownpreface
commentary. This allows us to loop over the checklist data to render each category in the list, resulting in a dryer template file.Also:
includes_checklist.njk
has been renamed to_includes/checklist__task.njk
.Before
After