Skip to content
This repository has been archived by the owner on Jul 14, 2023. It is now read-only.

Commit

Permalink
Simplify the gradient style of grid-visual
Browse files Browse the repository at this point in the history
Currently quite a few browsers have issues with the complexity of the gradient.

#539
  • Loading branch information
whmii committed Feb 15, 2017
1 parent f2f3db6 commit 48e0456
Showing 1 changed file with 6 additions and 25 deletions.
31 changes: 6 additions & 25 deletions core/neat/mixins/_grid-visual.scss
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,8 @@
$_grid-visual-object: () !default;
$_grid-visual:
$color,
$color 1px,
transparent 1px,
$color $_grid-gutter,
transparent $_grid-gutter,
$color calc(#{$_grid-gutter} + 1px),
transparent calc(#{$_grid-gutter} + 2px),
;

@for $i from 1 to $_grid-columns {
Expand All @@ -51,36 +48,20 @@
$_grid-visual-loop-list:
transparent calc(#{$location}),
$color calc(#{$location}),
$color calc(#{$location} + 1px),
transparent calc(#{$location} + 1px),
transparent calc(#{$location} + #{$_grid-gutter}),
$color calc(#{$location} + #{$_grid-gutter}),
$color calc(#{$location} + #{$_grid-gutter} + 1px),
transparent calc(#{$location} + #{$_grid-gutter} + 1px),
transparent calc(#{$location} + #{$_grid-gutter}),
;

$_grid-visual: _neat-append-grid-visual($_grid-visual, $_grid-visual-loop-list);
}

$_grid-visual-loop-list:
transparent calc(100% - #{$_grid-gutter}),
$color calc(100% - #{$_grid-gutter}),
$color calc(100% - #{$_grid-gutter} + 1px),
transparent calc(100% - #{$_grid-gutter} + 1px),
transparent calc(100% - 1px),
$color calc(100% - 1px),
transparent calc(100% - #{$_grid-gutter}),
$color calc(100% - #{$_grid-gutter}),
$color calc(100%),
;

$_grid-visual: _neat-append-grid-visual($_grid-visual, $_grid-visual-loop-list);

background-image:
linear-gradient(to right, $_grid-visual),
linear-gradient(to bottom,
$color,
$color 1px,
transparent 1px,
transparent calc(100% - 1px),
$color calc(100% - 1px),
$color
);
background-image: linear-gradient(to right, $_grid-visual);
}

0 comments on commit 48e0456

Please sign in to comment.