Skip to content

Commit

Permalink
Update formatting of the @if and @else rules
Browse files Browse the repository at this point in the history
  • Loading branch information
jsnajdr committed Jan 2, 2019
1 parent 4a4a8be commit 3fa79b6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
9 changes: 3 additions & 6 deletions assets/stylesheets/shared/mixins/_breakpoints.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,13 @@ $breakpoints: 480px, 660px, 800px, 960px, 1040px, 1280px, 1400px; // Think very
@media ( max-width: $breakpoint ) {
@content;
}
}
@else {
} @else {
@if $size == $and-larger {
$approved-value: 2;
@media ( min-width: $breakpoint + 1 ) {
@content;
}
}
@else {
} @else {
@each $breakpoint-end in $breakpoints {
$range: $breakpoint + '-' + $breakpoint-end;
@if $size == $range {
Expand All @@ -48,8 +46,7 @@ $breakpoints: 480px, 660px, 800px, 960px, 1040px, 1280px, 1400px; // Think very
// TODO - change this to use @error, when it is supported by node-sass
@warn 'ERROR in breakpoint( #{ $size } ): You can only use these sizes[ #{$sizes} ] using the following syntax [ <#{ nth( $breakpoints, 1 ) } >#{ nth( $breakpoints, 1 ) } #{ nth( $breakpoints, 1 ) }-#{ nth( $breakpoints, 2 ) } ]';
}
}
@else {
} @else {
$sizes: '';
@each $breakpoint in $breakpoints {
$sizes: $sizes + ' ' + $breakpoint;
Expand Down
9 changes: 3 additions & 6 deletions client/components/popover/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,15 @@
$opposite-side: 'bottom';
$cross-side: 'left';
$cross-opposite-side: 'right';
}
@else if $side == 'bottom' {
} @else if $side == 'bottom' {
$opposite-side: 'top';
$cross-side: 'left';
$cross-opposite-side: 'right';
}
@else if $side == 'left' {
} @else if $side == 'left' {
$opposite-side: 'right';
$cross-side: 'top';
$cross-opposite-side: 'bottom';
}
@else if $side == 'right' {
} @else if $side == 'right' {
$opposite-side: 'left';
$cross-side: 'top';
$cross-opposite-side: 'bottom';
Expand Down

0 comments on commit 3fa79b6

Please sign in to comment.