mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-04-28 02:50:29 -04:00
15 lines
639 B
SCSS
15 lines
639 B
SCSS
@use "sass:color";
|
|
|
|
@use "settings";
|
|
|
|
// Figure out the color of the "transparent" link underlines:
|
|
@function underline-hack($color, $background: #ffffff) {
|
|
// Calculate underline color by mix()'ing it with a given background to give the impression of opacity but with much
|
|
// better efficiency and compatibility.
|
|
$color-transparentized: color.mix($color, $background, settings.$link-underline-opacity);
|
|
|
|
// Return a "gradient" as a hack to get the fancy underline to wrap:
|
|
// https://www.dannyguo.com/blog/animated-multiline-link-underlines-with-css/
|
|
@return linear-gradient($color-transparentized, $color-transparentized);
|
|
}
|