1
0
mirror of https://github.com/matt-fidd/stratos.git synced 2026-01-02 07:59:30 +00:00
Files
stratos/src/stylesheets/abstracts/_mixins.scss

48 lines
659 B
SCSS

@mixin on-event($self: false) {
@if $self {
&,
&:hover,
&:active,
&:focus {
@content;
}
} @else {
&:hover,
&:active,
&:focus {
@content;
}
}
}
@mixin respond-to($breakpoint) {
$value: map-get($breakpoints, $breakpoint);
@if $value != null {
@media (min-width: $value) {
@content;
}
}
@else {
@warn 'No value could be retrieved from `#{$breakpoint}`. '
+ 'Please make sure it is defined in `$breakpoints` map.';
}
}
@mixin hide-column($colNum) {
th, td {
&:nth-child(#{$colNum}) {
display: none;
}
}
}
@mixin show-column($colNum) {
th, td {
&:nth-child(#{$colNum}) {
display: table-cell;
}
}
}