Closed HughxDev closed 6 years ago
Hi @hguiney, I was able to reproduce this issue in Gatsby v1. However, this has been fixed in the v2 release which is still in beta.
@hguiney Could you try upgrading to v2? This issue is fixed there.
Going to close this as fixed!
Please check out Gatsby v2 (yarn upgrade-interactive
is really helpful here!) and let us know if we can assist further.
Best of luck, and thanks for opening an issue!
Description
During CSS compilation, HSL color values with negative hue values are clipped to 0 instead of wrapped.
Not using PostCSS, as far as I can tell. Just built on top of the blog starter kit.
Steps to reproduce
Specify a blue text color using a negative hue value.
style.css:
index.js:
This renders correctly with
gatsby develop
, as the color value is unchanged.Expected result
On
gatsby build
, the CSS should have an unchanged color valuehsl(-150, 100%, 40%)
, or an equivalent blue hex value#06c
. (I actually don’t understand why it compiles to hex; is it for backwards compatibility with old browsers? Is this configurable?)Actual result
Compiled CSS has a red hex value
#c00
, equivalent tohsl(0, 100%, 40%)
.Environment
gatsby-config.js:
For a full example you can clone the relevant commit from my project, run
gatsby build
, and look at one of the many pages with code on it. The angle brackets will be rendered red instead of blue.