-
-
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
Upgrade to Bootstrap 4.0.0.alpha6 #1816
Conversation
Previously normalize.css set table's border-spacing to 0, bootstrap now uses reboot.css, which doesn't reset this property.
Bootstrap has removed col-xs-N in the latest alphas.
This works around a bootstrap 4.0.0.alpha6 issue resulting in Error: Tooltip is transitioning We should be able to re-enable this for the next release if desired.
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.
Found some stuff, that's partially related to these changes, but should be tackled in this PR IMO.
Feel free to grab from https://github.com/tvdeyen/solidus/commits/bootstrap-4-a6-review where you see fit.
|
||
// Forms | ||
|
||
$input-padding-x: .75rem !default; | ||
$input-padding-y: .375rem !default; | ||
$input-padding-y: .5rem !default; | ||
$input-line-height: 1.25 !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.
@@ -2,7 +2,7 @@ | |||
<fieldset class="no-border-bottom"> | |||
<legend align="center"><%= Spree.t(:add_product) %></legend> | |||
|
|||
<div class="col-xs-9"> | |||
<div class="col-9"> |
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.
@@ -2,7 +2,7 @@ | |||
<fieldset class="no-border-bottom"> | |||
<legend align="center"><%= Spree.t(:add_product) %></legend> | |||
|
|||
<div class="col-xs-9"> | |||
<div class="col-9"> | |||
<div data-hook="add_product_name" class="field"> | |||
<%= label_tag :add_line_item_variant_id, Spree.t(:name_or_sku) %> | |||
<%= text_field_tag :add_line_item_variant_id, "", class: "variant_autocomplete fullwidth" %> |
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.
Out of scope, but I couldn't find any reference to this partial. 🤔
.media-list { | ||
padding-left: 0; | ||
list-style: none; | ||
.media-body { |
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.
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.
Right. I forgot this.
Bootstrap removed the .media-left
class https://v4-alpha.getbootstrap.com/layout/media-object/ instead asking you to just specify .mr-3
.
👍 Your padding solution is a good fix.
@@ -50,7 +50,7 @@ | |||
<tr class="edit-method hidden total"> | |||
<td colspan="5"> | |||
<div class="row"> | |||
<div class="col-xs-4"> | |||
<div class="col-4"> |
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'm not quite sure why this start to break visually now, but this makes the select too small. We should change this to col-12
. We could also remove the row
and col
completely as I don't see any advantage to have this in this form, but this could break potential Deface overrides stores could have made.
Before
After
@@ -49,7 +49,7 @@ | |||
} |
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.
Probably not caused by any change made in this PR I guess, but poking around I stumbled over a wrong background colour on disabled select dropdown arrows.
Before
.select2-arrow {
...
b {
background: transparent ...;
...
}
}
I would even prefer to only make the background-image
!important
, but to keep the changeset as small as possible I just changed the background color
After
@@ -1,5 +1,10 @@ | |||
// Base | |||
//-------------------------------------------------------------- | |||
|
|||
html { | |||
font-size: $font-size-root; |
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.
Bootstrap removed this for accessibility reasons twbs/bootstrap@bd38a2a
We should follow their example.
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 would like that, but I think we should do this in a separate PR. Removing this would move us from 13px
to 16px
(maybe), which is a really significant change, which I'm sure will cause some issues. I'd rather we look at that separately.
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.
As long as we set $font-size-base
to $body-font-size
everything should be fine.
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.
That changes the size of our rem
, which I don't want to do. It's awkward that our base font size doesn't match a rem
, making rem
pretty useless if it doesn't match up with anything else on the page. If we're setting $font-size-base
to a px
value anyways we're not improving accessibility in any way.
I appreciate the argument that using the browser's default font size is a good thing. But if we aren't (and I think it's too big a change for this PR) the way bootstrap used to do it, and the way we're doing it here, by setting a size on the root element, is best.
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.
Agreed!
@@ -1,6 +1,6 @@ | |||
<div data-hook="admin_named_type_form_fields" class="row"> | |||
<div class="row"> |
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.
These nested row
s now break the layout
We should remove the nested row
and change the columns size back to 4
as this is the value it was in our skeleton based UI.
Before
After
@tvdeyen I've pulled in your changes other than changing the font size. |
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.
🚢
Previously we were on Bootstrap 4.0.0.alpha2. Changes can be seen in their Release notes
Notable to us:
col-xs-3
et al. are gone. Replaced withcol-3
.I can't be 100% sure this didn't mess up any styling, but in a quick browse through the admin I didn't spot anything off.