-
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
[OUDS] Add "Dimension" tokens, utilities and documentation #2754
base: ouds/main
Are you sure you want to change the base?
Conversation
6b7eec8
to
05f8527
Compare
373e453
to
f2a2a25
Compare
05f8527
to
75dc727
Compare
70308ad
to
33c6ba1
Compare
a70db7f
to
eec9a1b
Compare
2f78431
to
a378e58
Compare
5656e5b
to
394082a
Compare
a378e58
to
005f07b
Compare
✅ Deploy Preview for boosted ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
33dc6ce
to
fdab9a8
Compare
f0847dd
to
5671e80
Compare
<div class="z-1 position-absolute p-5"><span>z-1</span></div> | ||
<div class="z-0 position-absolute p-5"><span>z-0</span></div> | ||
<div class="z-n1 position-absolute p-5"><span>z-n1</span></div> | ||
<div class="z-3 position-absolute p-spacious"><span>z-3</span></div> |
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.
Please don't take this comment for granted and don't modify the PR. This is a complex one to review, so I'll put some comments here and there with my 2 cents. Hopefully, in the end, with your rules, some comments, and the designers inputs, we might create a cool mapping table for usage, but also for migrations.
Here, the previous value is 60px. So I would rather use as a real project "huge" (56px) or "jumbo" (64px) to have the same rendering.
The previous rule is that the values doubled between 0,1, 2, 3, 4, 5 → 0, 5px, 10px, 20px, 30px, 60px.
If we keep this rule I would rather use for equivalent usages and easier migration none, shortest, shorter, medium, taller, jumbo instead of the current none, shortest, shorter, medium, tall, spacious.
<code>.overflow-y-hidden</code> example on an element with set width and height dimensions. | ||
</div> | ||
<div class="overflow-y-visible p-3 mb-3 mb-md-0 me-md-3 w-100 border" style="max-width: 200px; max-height: 100px;"> | ||
<div class="overflow-y-visible p-medium mb-medium mb-md-none me-md-medium w-100 border" style="max-width: 200px; max-height: 100px;"> |
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.
There's an issue with this example, as the text is not long-enough to show the feature. It's mainly because we go from 20px padding to 16px padding. Maybe we should use tall
instead in the entire page?
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.
Let's wait for #2754 (comment) final values as it could be fixed automatically
@@ -1,6 +1,6 @@ | |||
{{ define "body_override" }}<body{{ if (eq .Page.Params.toc true) }} data-bs-spy="scroll" data-bs-target="#TableOfContents"{{ end }}>{{ end }} | |||
{{ define "main" }} | |||
<div class="container-fluid container-max-width bd-gutter mt-3 my-md-4 bd-layout"> | |||
<div class="container-fluid container-max-width bd-gutter mt-medium my-md-tall bd-layout"> |
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.
This layout sounds a little bit too compact. It was pretty tight already in Boosted docs. Let's check with the designers.
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.
Let's wait for #2754 (comment) final values. Could be fixed automatically.
In most cases, while building a page with the layouts, it makes more sense most of the time to use pixels for paddings and margins as we don't want them to change while zooming out. In the components, we might use both depending on the use cases, but we're not supposed to use utilities to build components. |
IMO, |
It concerns only icons and typos, so let's postpone it. |
|
||
- **Gutters start at `2px` and go up to `64px` wide.** This allows us to match our grid to the [padding and margin spacers]({{< docsref "/utilities/spacing" >}}) scale. | ||
- **Gutter utilities start at `2px` and go up to `64px` wide.** This allows us to match our grid to the [padding and margin spacers]({{< docsref "/utilities/spacing" >}}) scale. |
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.
Gutters was fine, wasn't it?
- **Gutter utilities start at `2px` and go up to `64px` wide.** This allows us to match our grid to the [padding and margin spacers]({{< docsref "/utilities/spacing" >}}) scale. | |
- **Gutters start at `2px` and go up to `64px` wide.** This allows us to match our grid to the [padding and margin spacers]({{< docsref "/utilities/spacing" >}}) scale. |
## Horizontal gutters | ||
|
||
`.gx-*` classes can be used to control the horizontal gutter widths. The `.container` or `.container-fluid` parent may need to be adjusted if larger gutters are used too to avoid unwanted overflow, using a matching padding utility. For example, in the following example we've increased the padding with `.px-tall`. Note that in the previous example, we use a `short` gutter width, so there isn't a need for the `.overflow-hidden` wrapper class. | ||
`.gx-*` classes can be used to control the horizontal gutter widths. The wrapper element may need to be adjusted if larger gutters are used too to avoid unwanted overflow, using a matching padding utility. For example, in the following example we've increased the padding with `.px-tall`. |
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.
You can say "The container", it works too.
Related issues
Closes #2605.
Description
Remaining tasks and questions
Questions:
px
and inrem
. I mean not only a functionpx-to-rem
but an option like$enable-rem-utilities
that make a dupe of each utility but in rem? IMO, we should but it will probably make the bundle size raise a lot. Not done yet._utilities.scss
for utilities priority? IMO we should stick to the one proposed for the doc implementation.$spacer
and$spacers
variables? IMO,$spacer
should take the value$ouds-dimension-base * 5
. Not done yet. It's the base of many calculations inside Boosted/Bootstrap. Do we replace them with our$ouds-dimension-base
and$ouds-dimension-space-fixed
? IMO, we should keep the Bootstrap ones..w-100
, etc.. ? IMO, we should since the tokens don't look like they are done for it.Done list
The following was done in the PR:
_ouds-maps.scss
and rather introducetokens/_composite.scss
. Change all the related files._root.scss
file for the scaled utilities.tokens/_raw.scss
and intokens/_semantic.scss
sizing.md
andspacing.md
utilities.To be done after the PR is merged
Motivation & Context
Types of change
Live previews