mirror of
https://github.com/danog/sass-site.git
synced 2025-01-05 20:48:47 +01:00
557788d2f9
* Bump prettier from 2.8.8 to 3.0.0 Bumps [prettier](https://github.com/prettier/prettier) from 2.8.8 to 3.0.0. - [Release notes](https://github.com/prettier/prettier/releases) - [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md) - [Commits](https://github.com/prettier/prettier/compare/2.8.8...3.0.0) --- updated-dependencies: - dependency-name: prettier dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * install eslint-plugin-prettier and @typescript-eslint/eslint-plugin at @5.0.0 --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Carlos Israel Ortiz García <goodwine@google.com>
44 lines
1.1 KiB
SCSS
44 lines
1.1 KiB
SCSS
@use 'sass:math';
|
|
@use 'sass:list';
|
|
@use 'sass:meta';
|
|
@use 'sass:map';
|
|
@use '../config';
|
|
@use '../config/color/brand';
|
|
|
|
$sl-colors: ();
|
|
|
|
// loop over the variable names in config/color/brand.scss
|
|
@each $color-name in map.keys(meta.module-variables('brand')) {
|
|
// turn each sass variable name into a css var() function
|
|
$var: var(--#{$color-name});
|
|
|
|
// add each var() function to the space-separated list
|
|
$sl-colors: list.append($sl-colors, $var, space);
|
|
}
|
|
|
|
@function stripes($position, $sl-colors) {
|
|
$sl-colors: if(
|
|
meta.type-of($sl-colors) != 'list',
|
|
compact($sl-colors),
|
|
$sl-colors
|
|
);
|
|
$gradient: ();
|
|
$width: math.div(100%, list.length($sl-colors));
|
|
|
|
@for $i from 1 through list.length($sl-colors) {
|
|
$pop: list.nth($sl-colors, $i);
|
|
$new:
|
|
$pop ($width * ($i - 1)),
|
|
$pop ($width * $i);
|
|
$gradient: list.join($gradient, $new, comma);
|
|
}
|
|
|
|
@return linear-gradient($position, $gradient);
|
|
}
|
|
|
|
.sl-c-pop-stripe {
|
|
height: config.sl-px-to-rem(4px);
|
|
background-image: stripes((to right), ($sl-colors));
|
|
background-size: 100%;
|
|
}
|