Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: added failing test for postcss-hexrgba plugin #100

Closed
wants to merge 1 commit into from

Conversation

Techn1x
Copy link

@Techn1x Techn1x commented May 5, 2021

Hey! I noticed for my project when postcss-simple-vars is updated from 6.0.2 to 6.0.3, the postcss-hexrgba plugin fails to convert hex color codes to the rgba values needed.

I wrote this failing test so we can see if it's something to do with this plugin, or something awry in hexrgba.

The changes between 6.0.2 and 6.0.3 didn't look that substantial so I am not sure what broke... 🤔

Screenshot from 2021-05-05 17-36-25

Comment on lines +48 to +49
'$color-red: #FF0000; .a { color: rgba($color-red,0.10); }',
'.a { color: rgba(255,0,0,0.10); }'
Copy link
Author

@Techn1x Techn1x May 5, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The second line is the expected output, but on 6.0.3 it incorrectly outputs .a { color: rgba(#FF0000,0.10); }

@sampullman
Copy link
Collaborator

@Techn1x Yes, it's a problem with postcss-hexrgba, the relevant issue is: madeleineostoja/postcss-hexrgba#31

This PR fixes the issue: madeleineostoja/postcss-hexrgba#33

Ideally it would get merged but the maintainer seems inactive. In my personal projects I'm temporarily using the above PR branch as a dependency:

"postcss-hexrgba": "github:hudochenkov/postcss-hexrgba#migrate-to-postcss-8"

@Techn1x
Copy link
Author

Techn1x commented May 5, 2021

Thanks for the quick reply! I'll give that branch a go, thanks a bunch.

@ai
Copy link
Member

ai commented May 5, 2021

I am closing this PR since postcss-hexrgba must be moved to PostCSS 8. There is no way to fix it here.

@Techn1x
Copy link
Author

Techn1x commented Jul 11, 2022

The postcss-hexrgba was just updated to postcss 8 (v2.1.0) and the issue goes away! Thanks everyone.

@Techn1x Techn1x deleted the test-hexrgba branch July 11, 2022 02:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants