This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@mixin gridAdvanced($cols...) { | |
@supports(grid-area: auto) { | |
grid-template-columns: repeat($grid-columns, 1fr); | |
$i: 1; | |
@each $col in $cols { | |
> :nth-of-type(#{$i}) { | |
grid-column-start: nth($col,1); | |
grid-column-end: nth($col,2); | |
grid-row-start: nth($col,3); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@mixin gridAdvanced($cols...) { | |
$i: 1; | |
$span: 0; | |
@each $col in $cols { | |
> :nth-of-type(#{$i}) { | |
@if nth($col,2) == -1 { | |
$span: $grid-columns - nth($col,2) - nth($col,1); | |
} @else { | |
$span: nth($col,2) - nth($col,1); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ul class="flex-grid"> | |
<li class="col col--9">1</li> | |
<li class="col col--3">2</li> | |
</ul> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.gallery-grid { | |
@include grid; | |
@include gridAuto(260px); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<body> | |
{% include "icons.svg" %} | |
<svg class="icon"><use href="#icon-rugby" xlink:href="#icon-rugby"/></svg> | |
</body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.icon { | |
display: inline-block; | |
color: var(--color-icon-primary); | |
height: 1em; | |
width: 1em; | |
line-height: 1; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* reset - used to enable icon color customizations */ | |
.icon { | |
fill: currentColor; | |
stroke: none; | |
&.icon--outline { | |
stroke: currentColor; | |
} | |
use { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.icon { | |
color: var(--color-icon-primary); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@supports(--css: variables) { | |
.theme--dark { | |
--component-background: var(--black); | |
--color-text: var(--gray-4); | |
--color-icon-primary: #fff; | |
//..other relevant css variables | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:root { | |
--icon-xs: 16px; | |
--icon-sm: 24px; | |
--icon-md: 32px; | |
--icon-lg: 48px; | |
--icon-xl: 64px; | |
} | |
/* icon size */ | |
.icon--xs { |