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
  • !30650

Remove checkbox/radio toggle from button plugin in favor of a CSS only solution

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Administrator requested to merge master-mc-button-toggles into master Apr 26, 2020
  • Overview 2
  • Commits 3
  • Pipelines 0
  • Changes 10

Created by: MartijnCuppens

Alternative solution for #28463. This PR also separates the checkboxes docs from the button groups and buttons.

  • The Button plugin is removed in favor of a CSS only solution, a checkbox/radio with a .btn-toggle class. This solution works with as well normal as outlined buttons.
  • The checkbox and radio toggles docs are moved to the form checks docs.
  • An active state example for links is added to the button groups
  • Some outline examples are added to the button groups.

This PR removes the button toggle functionality (toggling active classes to buttons). I think it's better to just rely on checkboxes to toggle states, since the the js solution introduces issues like https://github.com/twbs/bootstrap/issues/25122.

Note the increase of CSS file size will be negligible once we use custom properties for our button component.

  • Toggle buttons removed from https://deploy-preview-30650--twbs-bootstrap.netlify.app/docs/4.3/components/buttons/, the .active documentation is kept.
  • Active link & oulined example added to https://deploy-preview-30650--twbs-bootstrap.netlify.app/docs/4.3/components/button-group/
  • Button toggles documentation added to https://deploy-preview-30650--twbs-bootstrap.netlify.app/docs/4.3/forms/checks/#toggle-buttons
  • Migration docs added to https://deploy-preview-30650--twbs-bootstrap.netlify.app/docs/4.3/migration/#buttons

Checks:

  • Check for .btn-group-toggle leftovers in docs.
  • Check for data-toggle="button" leftovers in docs.

Closes #28463 Closes https://github.com/twbs/bootstrap/issues/30615 Closes https://github.com/twbs/bootstrap/issues/25122 since the button plugin is removed

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: master-mc-button-toggles