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

refactor(button-group): cleaning up

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Administrator requested to merge github/fork/ffoodd/patch-1 into v4-dev 5 years ago
  • Overview 0
  • Commits 1
  • Pipelines 0
  • Changes 1

Created by: ffoodd

Two changes:

  1. the hover() mixin used to apply the exact same styles than :focus, :active, .active stack above — which doesn't use dedicated mixins… Removing mixin here seems a good thing since we can simplify selectors stack and reduce complexity a bit;
  2. a stylelint check is disabled for useless qualifying selector: [type="radio"] and [type="checkbox"] obviously applies to input elements, and removing this element selector doesn't prevent selector to match.

Tried this locally without seeing any regression. Did I miss something?

Compare
  • v4-dev (base)

and
  • latest version
    eb64994d
    1 commit, 2 years ago

1 file
+ 3
- 7

    Preferences

    File browser
    Compare changes
scss/_button-group.scss
+ 3
- 7
  • View file @ eb64994d


// stylelint-disable selector-no-qualifying-type
// Make the div behave like a button
.btn-group,
.btn-group-vertical {
@@ -13,9 +11,7 @@
// Bring the hover, focused, and "active" buttons to the front to overlay
// the borders properly
@include hover() {
z-index: 1;
}
&:hover,
&:focus,
&:active,
&.active {
@@ -153,8 +149,8 @@
> .btn-group > .btn {
margin-bottom: 0; // Override default `<label>` value
input[type="radio"],
input[type="checkbox"] {
[type="radio"],
[type="checkbox"] {
position: absolute;
clip: rect(0, 0, 0, 0);
pointer-events: none;
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
2
2 participants
Administrator
Ghost User
Reference: twbs/bootstrap!29581
Source branch: github/fork/ffoodd/patch-1

Menu

Explore Projects Groups Snippets