Add an "escape hatch" allowing unsafe declarations. Resolves #28. #40
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This change adds a new
unsafeDeclarationfunction that can be used within a ruleset to unsafely add a declaration. Useful for vendor-prefixed properties, or those that might be too new or experimental to have been added to this library yet.Design considerations
unsafeDeclaration :: ToVal a => String -> a -> ..., allowing users to write e.g.unsafeDeclaration "--foo" 0instead ofunsafeDeclaration "--foo" "0", but I decided against this because I don't want to make the API too friendly. Its use should generally be discouraged.Future plans
Make sure to stay on top of adding new CSS properties so that folks don't lean on this too heavily.
References
Provide links to related issues, W3C specifications, MDN articles, or other supporting resources.
Code change checklist