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
Allowing number values in CSSResults #471
Comments
CSS environment variables is supposed to handle this: https://drafts.csswg.org/css-env-1/#env-function But it isn't specced yet how to add custom environment variables from either CSS or JS. Maybe @justinfagnani can push internally for moving that forward instead of the above idea |
We've decided to add an |
nice 💪 makes it definitely more useful 👍 especially for import.meta.url 🤗 I'm still unsure why such a wrapper would be needed for a value of type number?
feels kinda strange... |
* Adds `unsafeCss` for composing values into `css` Fixes #451 and #471. Non-literal values can now be included in styling with `css` by using the `unsafeCss` function. This is named "unsafe" so users know this they must use this carefully to avoid security issues. * Address review feedback * add docs * refine error message
Fixed via #474. |
hey,
we have some default number values for our styling.
Reason:
css
via a build stepLive Demo
https://stackblitz.com/edit/ems7at?file=custom-greeting.js
Steps to Reproduce
Use a number
Expected Results
Renders with padding of 10px.
imho Numbers should be allowed as they "are save" and can not be used for any form of css attack right?
Actual Results
Error thrown
Browsers Affected
Versions
The text was updated successfully, but these errors were encountered: