Skip to content
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

Closed
wants to merge 7 commits into from
Closed
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions ui/utilities/visibility/flavors/responsive/_index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,26 @@
@include visibility(small, $mq-small, $mq-medium);
@include visibility(medium, $mq-medium, $mq-large);
@include visibility(large, $mq-large);

// Generates responsive visibility tags
@each $key, $value in (
x-small: $mq-x-small,
Copy link
Contributor

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'...

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

small: $mq-small,
medium: $mq-medium,
large: $mq-large,
x-large: $mq-x-large,
) {
@media(min-width: $value) {
// [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; }

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

}

@media(max-width: $value - 1px) {
// [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; }

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

}
}