p0c-website

Proof of concepts for fun and profit
git clone https://git.in0rdr.ch/p0c-website.git
Log | Files | Refs | Pull requests |Archive | README | LICENSE

_shade.scss (465B)


      1 @charset "UTF-8";
      2 
      3 /// Mixes a color with black.
      4 ///
      5 /// @param {Color} $color
      6 ///
      7 /// @param {Number (Percentage)} $percent
      8 ///   The amount of black to be mixed in.
      9 ///
     10 /// @example scss - Usage
     11 ///   .element {
     12 ///     background-color: shade(#ffbb52, 60%);
     13 ///   }
     14 ///
     15 /// @example css - CSS Output
     16 ///   .element {
     17 ///     background-color: #664a20;
     18 ///   }
     19 ///
     20 /// @return {Color}
     21 
     22 @function shade($color, $percent) {
     23   @return mix(#000, $color, $percent);
     24 }