Skip to content
GitLab
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
  • !34600

Convert buttons to CSS variables

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Mark Otto requested to merge css-vars-btn into main Jul 28, 2021
  • Overview 6
  • Commits 3
  • Pipelines 0
  • Changes 13

Todos:

  • Replace focus styles with rgb color CSS vars (needs #34100 merged first)
  • Replace or update gradient() mixins. Nothing to figure out, we're good to go!
  • Figure out border-radius property vs @include border-radius(). Dropped the mixin here and am using a fallback value in the CSS variable given the valid-radius() function.
  • Figure out RFS sizing in CSS vars (maybe relevant: https://github.com/twbs/rfs/issues/311). I've removed the font-size() mixin from the button-size() mixin and default .btn value. It doesn't seem to matter comparing this PR to main.
  • Replace or update outline variant mixin and styles.
  • Fix .btn-link
  • Tighten bundlewatch before the final merge

Biggest concern for all these PRs will be compiled file size of our CSS. Looking at the bootstrap.css diff though:

319 insertions(+), 485 deletions(-)

This will change a bit once :focus styles are restored.


Preview: https://deploy-preview-34600--twbs-bootstrap.netlify.app/docs/5.1/components/buttons/

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: css-vars-btn