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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix table mobile card top border #5005
Conversation
Demo starting at https://vanilla-framework-5005.demos.haus |
scss/_base_tables.scss
Outdated
@@ -45,7 +45,7 @@ | |||
} | |||
|
|||
tr { | |||
border-bottom: 1px solid $colors--theme--border-default; | |||
border-bottom: $input-border-thickness solid $colors--theme--border-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.
@lyubomir-popov Is this OK to use $input-border-thickness
for table rows, or is it reserved to other (interactive) elements?
scss/_base_tables.scss
Outdated
@@ -71,6 +71,6 @@ | |||
// stylelint-enable selector-max-type | |||
|
|||
%table-row-border { | |||
border-top: 1px solid $colors--theme--border-low-contrast; | |||
border-top: $input-border-thickness solid $colors--theme--border-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.
@britneywwc Why changing this to $input-border-thickness
?
Overall the fix works fine, but I'm worried that changing the width of the border on ALL rows may affect other things.
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 tried to match the border thickness with the table-mobile-card's border which inherits from $border
.
Would it be better to change it in p-table--mobile-card
rather than %table-row-border
so that it uses the same border thickness (1px) as the previous table rows? Just so it won't affect other things and only change within the table-mobile-card component.
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.
Yes, I think we need to treat it separate from standard table row border.
In mobile card small screen view we want those to look like card component, so the border around each card (row) should be the same as in card, so as you mentioned it should be $border
As in:
%vf-is-bordered {
border: $border;
}
a82599c
to
72fa04a
Compare
scss/_base_tables.scss
Outdated
@@ -71,6 +71,6 @@ | |||
// stylelint-enable selector-max-type | |||
|
|||
%table-row-border { | |||
border-top: 1px solid $colors--theme--border-low-contrast; | |||
border-top: 1px solid $colors--theme--border-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.
I think this needs to stay as -low-contrast
or otherwise all row borders in all columns become move visible than they are 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.
Thanks @britneywwc.
I applied some small changes to clean up the last issues (it turns out the main problem was specificity of the card styling).
Done
Fixes #5001, WD-9104
QA
Check if PR is ready for release
If this PR contains Vanilla SCSS code changes, it should contain the following changes to make sure it's ready for the release:
Feature 馃巵
,Breaking Change 馃挘
,Bug 馃悰
,Documentation 馃摑
,Maintenance 馃敤
.package.json
should be updated relative to the most recent release, following semver convention:Screenshots