Skip to content

Conversation

@drewbourne
Copy link
Contributor

Fixes #4 by skipping any color functions that contain a var

@MoOx
Copy link
Contributor

MoOx commented Jan 12, 2017

I should be something more generic that just send a message using postcss message api, not just related to var. If a resolution fail, we should throw a warning not just throw a fatal.

@drewbourne
Copy link
Contributor Author

Ok, so instead of just skipping var, it should attempt to parse & convert the value, and if that fails then log a warning to the postcss result and leave the declaration unmodified?

@MoOx
Copy link
Contributor

MoOx commented Jan 12, 2017

I guess :)

Exceptions are thrown by `css-color-function` when processing an invalid value.
This change catches those exceptions and turns them into postcss warnings.

---

Add postcss message when color function contains a var()

Custom properties cannot be resolved by `css-color-function`.
This change skips color functions that contain `var(` and adds
a message to the postcss `result.messages`
with type 'skipped-color-function-with-custom-property'.
@drewbourne drewbourne force-pushed the ignore-custom-properties branch from dceb8bd to 717a9f2 Compare January 12, 2017 19:53
@drewbourne
Copy link
Contributor Author

Closing this PR in favor of #35 and #36 to address the separate needs for turning errors into postcss warnings, and the need to skip color functions with custom properties.

@drewbourne drewbourne closed this Jan 12, 2017
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.

2 participants