-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add border color utilities to the Colors tokens PR
- Loading branch information
1 parent
9db1ce9
commit 797713a
Showing
13 changed files
with
137 additions
and
117 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,7 +48,52 @@ Or remove borders: | |
|
||
{{< /bootstrap-compatibility >}} | ||
|
||
<!--## Color--> | ||
## Color | ||
|
||
Change the border color using utilities. The color utilities are generated from our `$theme-colors` Sass map. | ||
|
||
{{< example class="bd-example-border-utils d-flex align-items-center" >}} | ||
<span class="border border-brand-primary"></span> | ||
<span class="border border-default"></span> | ||
<span class="border border-emphasized"></span> | ||
<div data-bs-theme="light" class="bg-brand-primary d-inline-flex m-shortest p-shorter"><span class="border border-on-brand-primary m-none bg-brand-primary"></span></div> | ||
{{< /example >}} | ||
|
||
{{< bootstrap-compatibility >}} | ||
|
||
{{< callout info >}} | ||
Border utilities like `.border-*` that generated from our original `$theme-colors` Sass map don't yet respond to color modes, however, any `.border-*-subtle` utility will. This will be resolved in v6. | ||
{{< /callout >}} | ||
|
||
{{< example class="bd-example-border-utils" >}} | ||
{{< border.inline >}} | ||
{{- range (index $.Site.Data "theme-colors") }} | ||
<span class="border border-{{ .name }}"></span> | ||
<span class="border border-{{ .name }}-subtle"></span> | ||
{{- end -}} | ||
{{< /border.inline >}} | ||
<span class="border border-black"></span> | ||
<span class="border border-white"></span> | ||
{{< /example >}} | ||
|
||
Or modify the default `border-color` of a component: | ||
|
||
{{< example >}} | ||
<div class="mb-4"> | ||
<label for="exampleFormControlInput1" class="form-label">Email address</label> | ||
<input type="email" class="form-control border-success" id="exampleFormControlInput1" placeholder="[email protected]"> <!-- TODO LM: Check after the complete list --> | ||
</div> | ||
|
||
<div class="h4 pb-2 mb-4 text-danger border-bottom border-danger"> <!-- TODO LM: Check after the complete list --> | ||
Dangerous heading | ||
</div> | ||
|
||
<div class="p-3 bg-info bg-opacity-10 border border-info border-start-0 rounded-end"> <!-- TODO LM: Check after the complete list --> | ||
Changing border color and width | ||
</div> | ||
{{< /example >}} | ||
|
||
{{< /bootstrap-compatibility >}} | ||
|
||
<!--## Opacity--> | ||
|
||
|
@@ -182,7 +227,7 @@ Border semantic tokens are defined as Sass variables. | |
|
||
{{< scss-docs name="border-radius-variables" file="scss/_variables.scss" >}} | ||
|
||
<!--Variables for setting `border-color` in `.border-{direction}-subtle` utilities in light and dark mode: | ||
<!-- TODO LM: Variables for setting `border-color` in `.border-{direction}-subtle` utilities in light and dark mode: | ||
{{< scss-docs name="theme-border-subtle-variables" file="scss/_variables.scss" >}} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.