Skip to content

Commit

Permalink
Add pretty pictures and link to a tweet
Browse files Browse the repository at this point in the history
  • Loading branch information
meduzen committed Aug 15, 2019
1 parent 36a1125 commit 0d39a51
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@

# hsl.scss

[HSL colors](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value#HSL_colors) [are awesome](https://www.sarasoueidan.com/blog/hex-rgb-to-hsl/). Unfortunately, the [SASS `hsl()` and `hsla()` functions](https://sass-lang.com/documentation/functions/color#hsl) converts the colors to RGB/RGBA format.

_hsl.scss_ replaces the two SASS functions by two others, preserving HSL(A) color declarations.

[Demo](https://codepen.io/meduzen/pen/BaBKdBb?editors=0100#0)
- [Demo](https://codepen.io/meduzen/pen/BaBKdBb?editors=0100#0)
- [Tweet](https://twitter.com/meduzen/status/1161948600219459584) with screenshots.

## Installation

Expand Down Expand Up @@ -39,4 +39,12 @@ Write regular CSS, the syntax is exactly the same:
}
```

## Before / after hsl.scss

![Before: lot of issues. Now: no issues anymore.](https://pbs.twimg.com/media/ECASFaIWkAAHdni?format=jpg&name=large)

![Before: boring interpolation. Now: standard CSS.](https://pbs.twimg.com/media/ECASFaQXoAAjNqe?format=jpg&name=large)

## Note

There’s currently no test enforcing the validity of what is passed to `hsl()` and `hsla()`, like in CSS. They are _passthrough_ function.

0 comments on commit 0d39a51

Please sign in to comment.