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

Set .btn padding for default sized input-group

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Administrator requested to merge github/fork/toooni/patch-1 into main Mar 11, 2020
  • Overview 0
  • Commits 2
  • Pipelines 0
  • Changes 1

Created by: toooni

This fixes an issue if the default value of $btn-padding-y or $btn-padding-x has been changed.

When overwriting the default .btn paddings:

$btn-padding-y: .625rem;
$btn-padding-x: 1.125rem;

This simple input-group

<div class="input-group">
    <input type="text" class="form-control" placeholder="Name" aria-label="Name" aria-describedby="button-addon2">
    <div class="input-group-append">
        <button class="btn btn-primary" type="button" id="button-addon2">Button</button>
    </div>
</div>

Will result in the following: image

The provided fix will result in this: image

This issue does only happen on the default size of .input-group with a .btn. There is already a solution for the sized ones: .input-group-lg (https://github.com/twbs/bootstrap/blob/2a2b0b5abe7b44b519c9e19e8876b75608979dd0/scss/forms/_input-group.scss#L135) and .input-group-sm (https://github.com/twbs/bootstrap/blob/2a2b0b5abe7b44b519c9e19e8876b75608979dd0/scss/forms/_input-group.scss#L154)

It seems like it was also fixed for the non sized .input-group-text but the default size .btn was not being thought of: https://github.com/twbs/bootstrap/blob/2a2b0b5abe7b44b519c9e19e8876b75608979dd0/scss/forms/_input-group.scss#L102

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/toooni/patch-1