Mercurial > nebulaweb3
diff default/assets/scss/vendors/bourbon/library/_tint.scss @ 0:1d038bc9b3d2 default tip
Up:default
author | Liny <dev@neowd.com> |
---|---|
date | Sat, 31 May 2025 09:21:51 +0800 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/default/assets/scss/vendors/bourbon/library/_tint.scss Sat May 31 09:21:51 2025 +0800 @@ -0,0 +1,33 @@ +@charset "UTF-8"; + +/// Mixes a color with white. +/// +/// @argument {color} $color +/// +/// @argument {number (percentage)} $percent +/// The amount of white to be mixed in. +/// +/// @return {color} +/// +/// @example scss +/// .element { +/// background-color: tint(#6ecaa6, 40%); +/// } +/// +/// // CSS Output +/// .element { +/// background-color: #a8dfc9; +/// } + +@function tint( + $color, + $percent + ) { + + @if not _is-color($color) { + @error "`#{$color}` is not a valid color for the `$color` argument in " + + "the `tint` mixin."; + } @else { + @return mix(#fff, $color, $percent); + } +}