-
Notifications
You must be signed in to change notification settings - Fork 55
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
Dark mode: colored buttons, outline, and change of rendering #2301
Dark mode: colored buttons, outline, and change of rendering #2301
Conversation
✅ Deploy Preview for boosted ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for boosted ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
950991f
to
cb7cdac
Compare
e47281e
to
1efd7ac
Compare
@@ -171,15 +190,34 @@ When using button classes on `<a>` elements that are used to trigger in-page fun | |||
|
|||
## Outline buttons | |||
|
|||
In need of a button with a transparent default background color? Replace the default modifier classes with the `.btn-outline-secondary` one to remove all background colors on buttons. | |||
In need of a button, but not the hefty background colors they bring? Replace the default modifier classes with the `.btn-outline-*` ones to remove all background images and colors on any button. |
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.
In need of a button, but not the hefty background colors they bring? Replace the default modifier classes with the `.btn-outline-*` ones to remove all background images and colors on any button. | |
In need of a button, but not the hefty background colors they bring? Replace the default modifier classes with the `.btn-outline-*` ones to remove all background colors and colors on any button. |
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.
Sorry but I think the language level is a little too high to express something simple... I would prefer to have the mention of transparent background in these sentences.
LM what do you mean "all background colors and colors"?
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.
Things to try in Bootstrap:
- Change "hefty" wording
- "to remove all background images and colors on any button." > "to remove all background colors on any button."
@louismaximepiton or @hannahiss I let you propose something
1efd7ac
to
09d9abf
Compare
25acc6f
to
dad7287
Compare
Co-authored-by: Louis-Maxime Piton <louismaxime.piton@orange.com>
Co-authored-by: Louis-Maxime Piton <louismaxime.piton@orange.com>
Co-authored-by: Louis-Maxime Piton <louismaxime.piton@orange.com>
dad7287
to
f7f0aec
Compare
Description
Warning button
.btn-warning
rendering has changed from being forced from orange to yellow (functional color).Info Button
.btn-info
rendering has changed from being forced from black to blue (functional color)..btn-secondary
and the "alert big panel" has been forced to usedata-bs-theme="dark"
..btn-secondary
too. The other previously.btn-secondary
buttons in the middle (and in this page) will rather use.btn-outline-secondary
anyway (which is closer to what Bootstrap does with outline primary buttons).Light Button
.btn-light
rendering has changed from being a black outlined button to a light gray button (using$light
color).Dark Button
.btn-dark
rendering has changed only on dark bg (using$dark
color).Secondary Button
.btn-secondary
rendering has changed from being a black outline button to a black button/js/tests/integration/index.html
: nothing to do/js/tests/unit/carousel.spec.js
: nothing to do (handled directly in main via fix(unit tests): drop.btn-secondary
from carousel play/pause buttons #2306)/js/tests/unit/quantity-selector.js
:.btn-secondary
s have been changed to.btn-outline-secondary
to follow QS modifications/js/tests/visual/alert.html
: nothing to do/js/tests/visual/dropdown.html
:.btn-secondary
s have been changed to.btn-outline-secondary
only for split buttons/js/tests/visual/modal.html
:.btn-secondary
s have been changed to.btn-outline-secondary
for close buttons/js/tests/visual/popover.html
: nothing to do/js/tests/visual/tooltip.html
: nothing to dotac.js
: comes from.btn-info
->.btn-secondary
site/content/docs/5.3/dark-mode.md
: changed.btn-secondary
to.btn-outline-secondary
for split buttonssite/content/docs/5.3/components/back-to-top.md
: changed.btn-secondary
to.btn-outline-secondary
site/content/docs/5.3/components/button-group.md
: changed.btn-secondary
to.btn-outline-secondary
to keep the same rendering as beforesite/content/docs/5.3/components/buttons.md
.btn-outline-secondary
but comes transparent!site/content/docs/5.3/components/close-button.md
: changed.btn-secondary
to.btn-outline-secondary
site/content/docs/5.3/components/dropdown.md
: changed.btn-secondary
to.btn-outline-secondary
only for split dropdownssite/content/docs/5.3/components/modal.md
: changed.btn-secondary
to.btn-outline-secondary
site/content/docs/5.3/components/popover.md
: nothing to changesite/content/docs/5.3/components/toast.md
: nothing to change cause we don't have any design for thatsite/content/docs/5.3/components/tooltips.md
: nothing to changesite/content/docs/5.3/examples/download-app
: changed.btn-secondary
to.btn-outline-secondary
site/content/docs/5.3/forms/input-group.md
: go back to.btn-outline-secondary
like Bootstrapsite/content/docs/5.3/forms/quantity-selector.md
: changed.btn-secondary
to.btn-outline-secondary
site/content/docs/5.3/forms/validation.md
: changed.btn-secondary
to.btn-outline-secondary
for the QSsite/content/docs/5.3/helpers/clearfix.md
: nothing to changesite/content/docs/5.3/helpers/stacks.md
: changed.btn-secondary
to.btn-outline-secondary
like Bootstrapsite/content/docs/5.3/utilities/position.md
: nothing to changesite/layouts/_default/docs.html
: changed.btn-secondary
to.btn-outline-secondary
to keep the same designsite/layouts/_default/single.html
: nothing to changesite/layouts/partials/docs-subnav.html
: changed.btn-secondary
to.btn-outline-secondary
to keep the same designsite/layouts/partials/footer.html
: changed.btn-secondary
to.btn-outline-secondary
for the back to topsite/layouts/shortcodes/card.html
: changed.btn-secondary
to.btn-outline-secondary
to keep the same designsite/layouts/shortcodes/orange-footer.html
: changed.btn-secondary
to.btn-outline-secondary
to keep the same design.btn-outline-secondary
instead, sometimes they can keep.btn-secondary
..btn-outline-secondary
but with a solid background; it would mean that maybe a variant is missing in their regular buttons?This is the description of the previous PR
This PR reintroduces the colored versions of buttons and outlined buttons coming from Bootstrap instead of hiding them or overwriting their value.
First of all, it adds a little bit of extra CSS in the bundle due to the new outline classes. However, it's necessary for compatibility with Bootstrap when folks use external plugins, libraries, etc. based on Bootstrap with Boosted style.
For regular buttons, the changes are minimal since we modify only the rendering of
.btn-warning
and.btn-info
so that they use ODS functional colors. They are not compatible with ODS design guidelines rules so a design callout has been added to mention that to the users.The migration guide includes something about it since the rendering of these buttons will change whenever folks have wrongly used the concepts with
.btn-warning
and.btn-info
; this can happen if they have used them only based on the rendering and not the meaning.Please note that I tried to get back to the code from Bootstrap to create the "regular" buttons, but the rules are too precise and not generic enough to be able to do that (event if some success, danger, info, warning buttons rely on the same parameters).
For the outlined buttons, we already had only the secondary one.
Technically, I've used the same technique as Bootstrap by looping over the
$theme-colors
and calling the newly createdbutton-outline-variant
mixin (with extra parameters to differentiate the active from the hover state).A special rendering has been introduced for outline secondary and dark buttons when rendered as dark variants.
The new variants and the new mixin are documented in the migration guide, and a design callout has been added to mention that only the secondary variant can be used on their website.
Sub-tasks
.btn-dark
and.btn-secondary
.btn-primary
active state$dark
stays black? or#141414
<details><summary>
approachbtn-warning
btn-info
btn-light
btn-dark
btn-secondary
(use.btn-outline-secondary
only when the rendering is imposed by ODS).dropdown
and.btn-check
need Boosted specific classes to keep their specific rendering.Live previews