-
Notifications
You must be signed in to change notification settings - Fork 827
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
[FEATURE] Improved Visibility styles for responsive design #429
Conversation
@3den, thanks for your PR! By analyzing the history of the files in this pull request, we identified @aputinski and @kaelig to be potential reviewers. |
Thanks for the contribution! Before we can merge this, we need @3den to sign the Salesforce Contributor License Agreement. |
// [EXAMPLE] slds-show--medium: | ||
// HIDES the element when window is SMALLER than medium. | ||
// element will be displayed normaly when window is bigger. | ||
.slds-show--#{$key} { display: 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.
Property 'display' should be placed on separate line from selector
// [EXAMPLE] slds-hide--medium: | ||
// HIDES the element when window is BIGGER than medium. | ||
// element will be displayed normaly when window is smaller. | ||
.slds-hide--#{$key} { display: 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.
Property 'display' should be placed on separate line from selector
This will make the responsiveness of slds a lot more usable and easier to understand. |
@kaelig any update here? |
I think this is a great idea, I'll let @ishakasliwal communicate it to the team! |
|
||
// Generates responsive visibility tags | ||
@each $key, $value in ( | ||
x-small: $mq-x-small, |
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.
Can you wrap all the keys in single quote? 'x-small'
...
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.
👍
This is fantastic update @3den! Can I get you to update the documentation inside of Documentation will allow us to deprecate our current approach in favor of this. Thank you again for you contribution! |
// element will be displayed normaly when window is bigger. | ||
.slds-show--#{$key} { | ||
// !important is required to increase specificity | ||
display: none!important; |
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.
! should be preceded by a space, and should not be followed by a space
!important should not be used
// element will be displayed normaly when window is smaller. | ||
.slds-hide--#{$key} { | ||
// !important is required to increase specificity | ||
display: none!important; |
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.
! should be preceded by a space, and should not be followed by a space
!important should not be used
@brandonferrua documentation updated 💃 |
</tr> | ||
|
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.
@brandonferrua done :) |
im not sure why travis build broke... |
@3den I restarted it and it worked – that happens sometimes. |
@3den Thanks again for this contribution! We're currently updating our release process, so we'll keep you updated on the status of this merge. |
@ishakasliwal @kaelig when is the new version of SLDS going to be released with this feature? Thanks for the support guys :) |
This PR has been approved on our internal design systems repo and attributed to @3den . The work will be made publicly available upon our next release. Thanks for the contribution! |
This PR adds visibility classes that:
slds-show--medium
slds-hide--medium
.Issues: #427, #263, #292, #48
Example
Reviewer, please refer to this "definition of done" checklist:
Merge branch 'winter-17' into spring-17
Merge branch 'spring-17' into summer-17