Docs: consistent usage of CSS sections#38219
Conversation
7d9c614 to
6b62dab
Compare
|
@mdo I've updated this branch by going one step further in this refactoring for consistency. Love to hear your thoughts about it. Re-requesting a review (final this time). |
mdo
left a comment
There was a problem hiding this comment.
Loving it, will give another review after alpha 2 ships, but this all looks great so far.
| ### Utilities API | ||
| ### Sass utilities API | ||
|
|
||
| Overflow utilities are declared in our utilities API in `scss/_utilities.scss`. [Learn how to use the utilities API.]({{< docsref "/utilities/api#using-the-api" >}}) |
There was a problem hiding this comment.
Realizing through this code review that, separately or here, we could perhaps turn this section (heading and paragraph) into an include with an argument lol. Maybe, maybe not.
There was a problem hiding this comment.
The idea's great. We would need a shortcode or partial or anything else with two params:
- First part of the sentence (e.g. "Background" or "Object fit")
- The param (the key) used for
scss-docs(e.g. "utils-bg-color")
The issue is I don't know how to build it with Hugo. I tried few things but haven't managed to succeed by calling scss-docs and docsref within another shortcode or form a partial.
Would like to call it like this:
{{< sass-utilities-api-section "Background" "utils-bg-color" >}}
And it would contain something like:
### Sass utilities API
{{ firstParam }} utilities are declared in our utilities API in `scss/_utilities.scss`. [Learn how to use the utilities API.]({{< docsref "/utilities/api#using-the-api" >}})
{{< scss-docs name="{{ secondParam }}" file="scss/_utilities.scss" >}}
Maybe @XhmikosR you'd know how to do it
There was a problem hiding this comment.
@mdo Maybe we can do it with a step-by-step approach: merge this PR, and create an issue to track this possible enhancement?
Co-authored-by: Mark Otto <markd.otto@gmail.com>
Description
Following #38175, this PR suggests more modifications in the way we display CSS and Sass info globally in our docs:
To summarize, here's the new structure:
Hope I haven't broken too much links in the process 😇
Motivation & Context
Docs headings global consistency around CSS and Sass.
Type of changes
Checklist
npm run lint)Live previews