-
-
Notifications
You must be signed in to change notification settings - Fork 79.2k
Move transparent background to .btn and remove background-image #27003
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
I've also set the color and hover color to |
andresgalante
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MartijnCuppens just a question, is the color definition a fallback for cases when .btn is used without a modifier?
|
@andresgalante, yes. And if a developer wants to extend the |
| @mixin button-outline-variant($color, $color-hover: color-yiq($color), $active-background: $color, $active-border: $color) { | ||
| color: $color; | ||
| background-color: transparent; | ||
| background-image: none; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe the background-image: none was for overriding some browser defaults on the button. I can't recall which browser or version, but I recall having to set this in order for custom backgrounds to work properly. Looking around, seems fine now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, yes:
Line 17 in 2c2ac33
| background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214 |
And it looks like it was then removed in Android Firefox, so safe to ship I think. necolas/normalize.css#214 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, but do we support such old versions anymore? I too remember this issue but it was very old.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The .btn elements don't have a background-image either, that's why I assumed it was save to remove this.
|
The default .btn background color was actually quite nice in my opinion, and I was using it over btn-secondary (too harsh). I've lost this after moving to 4.2.1 😢 Would definitely like to see the .btn default background color come back (although I've just edited my bootstrap to counter this). #ececec, with #d8d8d8 on hover is nice. |
|
@shanehoban you shouldn't use |
Closes #27002
.btnbackground-image: none;from thebutton-outline-variantmixin. Buttons and links don't have a background image by default, I guess this was a line to override the gradient backgrounds in the past.