/// /// Create encoded SVG grid overlay /// /// @access private /// /// @param {String} $key - breakpoint alias /// @param {Number} $breakpoint - breakpoint value /// @param {Number} $columns - breakpoint column count /// @param {Number} $gutter - gutter value /// /// @group Internal Mixins /// @mixin flint-svg-grid($key, $breakpoint, $columns, $gutter) { $svg: ""; $svg: $svg + ""; $svg: $svg + ""; $svg: $svg + ""; $svg: $svg + ""; $svg: $svg + ""; $svg: $svg + ""; @for $i from 1 through $columns { $x: flint-fluid-width(((($breakpoint / $columns) * ($i - 1)) + $gutter), $breakpoint); $span: flint-fluid-width(((($breakpoint) / $columns)) - ($gutter * 2), $breakpoint); $svg: $svg + ""; } $svg: $svg + ""; @include _($key) { max-width: $breakpoint; background: { image: url("data:image/svg+xml," + flint-html-encode($svg)); size: 100% 100%; position: 0 0; } } } /// /// Apply SVG grid overlay /// /// @access private /// /// @group Internal Mixins /// @mixin flint-overlay-grid { @at-root html { position: relative; &:after { transform: translateX(-50%); content: " "; position: absolute; display: block; top: 0; left: 50%; bottom: 0; right: 0; width: 100%; height: 100%; opacity: 0.25; z-index: 9999; pointer: { events: none; } @each $key, $settings in flint-get-value("breakpoints") { @include flint-svg-grid($key, map-get($settings, "breakpoint"), map-get($settings, "columns"), flint-get-gutter()); } } } }