Skip to content

Instantly share code, notes, and snippets.

@jvmccarthy
Last active October 16, 2017 13:04
Show Gist options
  • Save jvmccarthy/020ada71d0da10c3bdc9 to your computer and use it in GitHub Desktop.
Save jvmccarthy/020ada71d0da10c3bdc9 to your computer and use it in GitHub Desktop.
Extension of angular-material#5317 workaround to including the extra small (xs) layout adding in angular-material 1.0
// Updated workaround from https://github.com/angular/material/issues/5317#issuecomment-150917005
// See https://github.com/angular/material/blob/v1.0.5/src/core/style/variables.scss#L30
// for $layout-* variable definitions.
@media (max-width: $layout-breakpoint-xs - 1) {
.show, .show-xs {
&.hide {
display: block !important;
}
}
}
@media (max-width: $layout-breakpoint-xs) and (max-width: $layout-breakpoint-sm - 1) {
.show, .show-sm, .show-gt-xs {
&.hide {
display: block !important;
}
}
}
@media (min-width: $layout-breakpoint-sm) and (max-width: $layout-breakpoint-md - 1) {
.show, .show-md, .show-gt-xs, .show-gt-sm {
&.hide {
display: block !important;
}
}
}
@media (min-width: $layout-breakpoint-md) and (max-width: $layout-breakpoint-lg - 1) {
.show, .show-lg, .show-gt-xs, .show-gt-sm, .show-gt-md {
&.hide {
display: block !important;
}
}
}
@media (min-width: $layout-breakpoint-lg) {
.show, .show-gt-xs, .show-gt-sm, .show-gt-md, .show-gt-lg {
&.hide {
display: block !important;
}
}
}
@rbournissent
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment