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

More complex cases fail #1

Open
7studio opened this issue Feb 21, 2017 · 1 comment
Open

More complex cases fail #1

7studio opened this issue Feb 21, 2017 · 1 comment

Comments

@7studio
Copy link

7studio commented Feb 21, 2017

Hi David,

First of all, I want to apologise for the confusion about my tweet announcing a duplicate postcss-color-rgb plugin 😔

I didn't find your plugin on postcss.part and I didn't know the official plugin list
I should have looked if the npm package already existed but I am still not used to it.

Thanks to @ben-eb and @ai, I discovered your work.

However some of my tests don't pass with your plugin 😥

It seems to me really difficult to handle these kinds of cases with RegExp:

:root {
  --is-red: 0;
}

.foo {
  background-color: rgb( calc(255*var(--is-red) + 0*(1 - var(--is-red))) calc(0*var(--is-red) + 255*(1 - var(--is-red))) 0 / 1 );
}

this example comes from Conditions for CSS Variables.

or

.foo {
  color: rgb(255 0 51 / attr(data-alpha %, 100%));
}

The approach in my plugin may help you enhance the official plugin.

Xavier.

@davidwebca
Copy link

I just had this issue. Granted it's going to be less and less relevant over time since these browsers are dying, but yeah, it doesn't convert values with css properties.

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

No branches or pull requests

2 participants