Skip to content
GitLab
    • Explore Projects Groups Snippets
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • B bootstrap
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 263
    • Issues 263
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 114
    • Merge requests 114
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Bootstrap
  • bootstrap
  • Merge requests
  • !36126
An error occurred while fetching the assigned milestone of the selected merge_request.

Use the `border-color` property instead of the CSS variable in border color utilities

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Mark Otto requested to merge css-var-border-color into main 3 years ago
  • Overview 3
  • Commits 1
  • Pipelines 0
  • Changes 2

Fixes #36087 (closed).

Also adds a note to our docs about how these utilities are slightly different than .text-* and .bg-* utilities in that they do not come with an additional --bs-border-opacity CSS variable as that variable is already present on .border-* classes, and not applicable (yet) on other components where these utilities may be used presently.

/cc @julien-deramond

Compare
  • main (base)

and
  • latest version
    dcd13a8e
    1 commit, 2 years ago

2 files
+ 7
- 2

    Preferences

    File browser
    Compare changes
sc‎ss‎
_utilit‎ies.scss‎ +1 -2
site/content/do‎cs/5.1/utilities‎
borde‎rs.md‎ +6 -0
scss/_utilities.scss
+ 1
- 2
  • View file @ dcd13a8e

  • Edit in single-file editor

  • Open in Web IDE


@@ -148,8 +148,7 @@ $utilities: map-merge(
)
),
"border-color": (
css-var: true,
css-variable-name: border-color,
property: border-color,
class: border,
values: $utilities-border-colors
),
site/content/docs/5.1/utilities/borders.md
+ 6
- 0
  • View file @ dcd13a8e

  • Edit in single-file editor

  • Open in Web IDE


@@ -43,6 +43,12 @@ Change the border color using utilities built on our theme colors.
<span class="border border-white"></span>
{{< /example >}}
{{< callout >}}
Unlike text and background color utilities, border color utilities redeclare the `border-color` property **without** an additional `--bs-border-opacity`, as opposed to resetting only `--bs-border-color`. This ensures the backward compatibility of border color utilities applying to other components while providing additional functionality through CSS variables.
This will be revisited in a future major release.
{{< /callout >}}
## Opacity
{{< added-in "5.2.0" >}}
0 Assignees
None
Assign to
0 Reviewers
None
Request review from
Labels
0
None
0
None
    Assign labels
  • Manage project labels

Milestone
No milestone
None
None
Time tracking
No estimate or time spent
Lock merge request
Unlocked
0
0 participants
Reference:
Source branch: css-var-border-color

Menu

Explore Projects Groups Snippets