2025-10-25 08:59:09 +02:00
|
|
|
@use "sass:color";
|
2019-11-12 20:18:02 +01:00
|
|
|
|
|
|
|
|
// Mixes a color with white.
|
|
|
|
|
//
|
|
|
|
|
// @param {Color} $color
|
|
|
|
|
//
|
|
|
|
|
// @param {Number (Percentage)} $percent
|
|
|
|
|
// The amount of white to be mixed in.
|
|
|
|
|
//
|
|
|
|
|
// @example scss - Usage
|
|
|
|
|
// .element {
|
|
|
|
|
// background-color: tint(#0c85ff, 40%);
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// @example css - CSS Output
|
|
|
|
|
// .element {
|
|
|
|
|
// background-color: #9dceff;
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// @return {Color}
|
|
|
|
|
|
|
|
|
|
@function tint($color, $percent) {
|
2025-10-25 08:59:09 +02:00
|
|
|
@return color.mix(#fff, $color, $percent);
|
2019-11-12 20:18:02 +01:00
|
|
|
}
|