-
Notifications
You must be signed in to change notification settings - Fork 1
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
Introduce Style
element
#167
Conversation
@nilmerg I'd like to discuss API and namespace. |
13e1ac1
to
bac4e7f
Compare
63778d5
to
1d17e2e
Compare
b55aa00
to
40c8ba9
Compare
5bb0a3b
to
dc21847
Compare
Thinking about using |
381092d
to
236fe67
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since it doesn't depend on Icinga Web anymore, the namespace should be fine as it is now.
## Blocked by - Icinga/ipl-web#167 - Icinga/icingaweb2#5059
This PR introduces a new
Style
element to provide strict CSP compliant dynamic CSS when necessary.Note that it is still a work in progress, so it is not in the right namespace, is not documented, API is subject to change, and lacks unit tests.
Example of creating style with some rulesets:
Output:
Now we wrap the rules in a selector:
Output:
We can also use LESS variables and nested rulesets:
Output:
Style can be automatically wrapped in a module scope:
Output:
And for conformance with strict CSP, a nonce can be set:
Output: