-
Notifications
You must be signed in to change notification settings - Fork 163
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
Add suru component #4849
Add suru component #4849
Conversation
Demo starting at https://vanilla-framework-4849.demos.haus |
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.
LGTM, just some comments
scss/_patterns_suru.scss
Outdated
.p-suru { | ||
aspect-ratio: 5.1775700934579; // exact aspect ration of the image | ||
background-image: url('#{$assets-path}7f34ade9-website_suru_25.jpg'); | ||
background-size: contain; | ||
display: none; // only show suru on large screens | ||
margin: 0 auto; | ||
max-width: $grid-max-width; | ||
|
||
@media (min-width: $breakpoint-large) { | ||
display: block; | ||
} |
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.
.p-suru { | |
aspect-ratio: 5.1775700934579; // exact aspect ration of the image | |
background-image: url('#{$assets-path}7f34ade9-website_suru_25.jpg'); | |
background-size: contain; | |
display: none; // only show suru on large screens | |
margin: 0 auto; | |
max-width: $grid-max-width; | |
@media (min-width: $breakpoint-large) { | |
display: block; | |
} | |
.p-suru { | |
display: none; | |
@media (min-width: $breakpoint-large) { | |
display: block; | |
aspect-ratio: 5.1775700934579; // exact aspect ration of the image | |
background-image: url('#{$assets-path}7f34ade9-website_suru_25.jpg'); | |
background-size: contain; | |
margin: 0 auto; | |
max-width: $grid-max-width; | |
} |
I would personally move all the display rules in the media query like so
But idk if it's a pattern we use elsewhere
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 find it a bit cleaner this way, and in the end I don't think it really matters too much.
Good that Lyubo is on holidays or you would give him a heart attack! |
Co-authored-by: ClementChaumel <clement.chaumel@gmail.com>
Done
Adds new suru component, for the new style of suru.
Deprecates the use of old suru strip.
Fixes WD-5196
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
[if relevant, include a screenshot or screen capture]