Snacks icon indicating copy to clipboard operation
Snacks copied to clipboard

Remove tinycolor and add a shadeColor utility

Open wfro opened this issue 7 years ago • 1 comments

Themes define colors for hover states, but not focus states. To get focus colors we take the hover color and darken it by 20%. Previously we used tinycolor to do that, but it has a bunch of functionality we don't need. This replaces it with a single shadeColor function which gets us the same end result and shaves ~16k (not huge, but still nice) from the final bundle (uncompressed).

wfro avatar Jun 22 '18 23:06 wfro

@wfro - Can you pick this one back up when you get some time? Looks like we should also add tests for these utils :)

dcocchia avatar Sep 24 '18 20:09 dcocchia