-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Make our form/button styles match bootstrap's #1809
Make our form/button styles match bootstrap's #1809
Conversation
The html using this was removed in 057c608
Instead we should rely on bootstrap's styling of anchors. The main motivation is that specifying the color for `:visited` is incompatible with bootstrap's styles (like those for a.button). Bootstrap colours :focus the same as :hover, making that variable unnecessary.
The last element using this was removed in 4de00c7
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.
Awesome (have a small change regarding deprecated variables)
@@ -289,16 +289,16 @@ $input-padding-y: .375rem !default; | |||
$input-bg: #fff !default; | |||
$input-bg-disabled: $gray-lighter !default; | |||
|
|||
$input-color: $gray !default; | |||
$input-border-color: #ccc !default; | |||
$input-color: $color-txt-text !default; |
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.
We deprecated the $color-txt-text
variable. Can we use $color-3
instead?
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.
We've deprecated it, which means if a user sets $color-txt-text
, they should see a warning, but it should continue working. This line (and the few below) are necessary for it to continue working
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.
Your are right. Ignore me
$input-color: $gray !default; | ||
$input-border-color: #ccc !default; | ||
$input-color: $color-txt-text !default; | ||
$input-border-color: $color-txt-brd !default; |
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.
dito
$input-btn-border-width: $border-width !default; // For form controls and buttons | ||
$input-box-shadow: inset 0 1px 1px rgba(0,0,0,.075) !default; | ||
|
||
$input-border-radius: $border-radius !default; | ||
$input-border-radius-lg: $border-radius-lg !default; | ||
$input-border-radius-sm: $border-radius-sm !default; | ||
|
||
$input-border-focus: #66afe9 !default; | ||
$input-border-focus: $color-txt-hover-brd !default; |
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.
dito
This makes our forms (inputs and buttons) match those using bootstrap classes (
.btn
and.form-control
). This should allow us to progressively change our current forms markup to bootstrap.Similar to the changes in #1780, bootstrap variables are set to the legacy styles' values.
Buttons are styled as bootstrap buttons using
@extend
.@extend
isn't an ideal tool to use, but I looked at the CSS products and it was okay here.This necessitated one change: buttons hover color is now dark blue as it's hardcoded in bootstrap to be 10% darker than the non-hovered BG. I hope this is okay. The new style is nicer. It currently disagrees with the select2 colours, but that will be fixed by #1797
I tried using
@extend
for the form inputs, but the CSS produced was ridiculous. We also don't want some of the styles that would imply (likewidth: 100%
). Instead I've just used the bootstrap variables here and pulled in theirplaceholder
pseudo-element styling.