Skip to content

Commit

Permalink
Use the same font on the button as on the field itself
Browse files Browse the repository at this point in the history
  • Loading branch information
MartijnCuppens committed Oct 28, 2020
1 parent b2be299 commit b1c7d1d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 9 additions & 1 deletion scss/_reboot.scss
Expand Up @@ -575,7 +575,15 @@ legend {
padding: 0;
}

// 1. Change font properties to `inherit` in Safari.

// Inherit font family and line height for file input buttons

// stylelint-disable-next-line selector-pseudo-element-no-unknown
::file-selector-button {
font: inherit;
}

// 1. Change font properties to `inherit`
// 2. Correct the inability to style clickable types in iOS and Safari.

::-webkit-file-upload-button {
Expand Down
2 changes: 0 additions & 2 deletions scss/forms/_form-control.scss
Expand Up @@ -72,7 +72,6 @@
margin: (-$input-padding-y) (-$input-padding-x);
margin-inline-end: $input-padding-x;
-moz-margin-end: subtract($input-padding-x, 5px); // stylelint-disable-line property-no-vendor-prefix
line-height: inherit;
color: $form-file-button-color;
@include gradient-bg($form-file-button-bg);
pointer-events: none;
Expand All @@ -93,7 +92,6 @@
padding: $input-padding-y $input-padding-x;
margin: (-$input-padding-y) (-$input-padding-x);
margin-inline-end: $input-padding-x;
line-height: inherit;
color: $form-file-button-color;
@include gradient-bg($form-file-button-bg);
pointer-events: none;
Expand Down

0 comments on commit b1c7d1d

Please sign in to comment.