-
-
Notifications
You must be signed in to change notification settings - Fork 78.9k
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
Docs: consistent usage of CSS sections #38219
Docs: consistent usage of CSS sections #38219
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.
So far so good!
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). |
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mdo Maybe we can do it with a step-by-step approach: merge this PR, and create an issue to track this possible enhancement?
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.
FYI tracked in #38434
Co-authored-by: Mark Otto <[email protected]>
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