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

Fix custom file input focus border color

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Administrator requested to merge github/fork/MartijnCuppens/custom-input-file-focus into v4-dev 6 years ago
  • Overview 0
  • Commits 1
  • Pipelines 0
  • Changes 2

Created by: MartijnCuppens

Fixes #27112 (closed).

Also did a tiny optimalization for the border of the browse button. The left border from the ::after pseudo element is now inherited from the element so you don't have to define the border color for every state and the transition of the border color is also applied to the browse button.

Demo: https://codepen.io/MartijnCuppens/pen/bxEyrQ

image

Compare
  • v4-dev (base)

and
  • latest version
    85a7344f
    1 commit, 2 years ago

2 files
+ 2
- 7

    Preferences

    File browser
    Compare changes
sc‎ss‎
mix‎ins‎
_form‎s.scss‎ +1 -2
_custom-f‎orms.scss‎ +1 -5
scss/mixins/_forms.scss
+ 1
- 2
  • View file @ 85a7344f

  • Edit in single-file editor

  • Open in Web IDE


@@ -180,8 +180,6 @@
&.is-#{$state} {
~ .custom-file-label {
border-color: $color;
&::after { border-color: inherit; }
}
~ .#{$state}-feedback,
@@ -191,6 +189,7 @@
&:focus {
~ .custom-file-label {
border-color: $color;
box-shadow: 0 0 0 $input-focus-width rgba($color, .25);
}
}
scss/_custom-forms.scss
+ 1
- 5
  • View file @ 85a7344f

  • Edit in single-file editor

  • Open in Web IDE


@@ -258,10 +258,6 @@
&:focus ~ .custom-file-label {
border-color: $custom-file-focus-border-color;
box-shadow: $custom-file-focus-box-shadow;
&::after {
border-color: $custom-file-focus-border-color;
}
}
&:disabled ~ .custom-file-label {
@@ -303,7 +299,7 @@
color: $custom-file-button-color;
content: "Browse";
@include gradient-bg($custom-file-button-bg);
border-left: $custom-file-border-width solid $custom-file-border-color;
border-left: inherit;
@include border-radius(0 $custom-file-border-radius $custom-file-border-radius 0);
}
}
0 Assignees
None
Assign to
0 Reviewers
None
Request review from
Labels
2
css v4
2
css v4
    Assign labels
  • Manage project labels

Milestone
No milestone
None
None
Time tracking
No estimate or time spent
Lock merge request
Unlocked
1
1 participant
Administrator
Reference: twbs/bootstrap!27134
Source branch: github/fork/MartijnCuppens/custom-input-file-focus

Menu

Explore Projects Groups Snippets