type safe inline css
See original GitHub issueWhen I use inline css in an html or jsp file, IntelliJ gives me nice syntax coloring and autocompletion:
Is there a type safe way to do inline css using kotlinx.html other than using a string? Or at least a way to get autocompletion and syntax coloring?
body {
div {
style = "background: yellow;border: solid thin blue"
}
}
Issue Analytics
- State:
- Created 7 years ago
- Reactions:4
- Comments:11 (2 by maintainers)
Top Results From Across the Web
6. Type Safe CSS · TornadoFX Guide - edvin
Type -Safe CSS · Inline CSS · Applying Style Classes with Stylesheets · Multi-Value CSS Properties · Nesting Styles.
Read more >Type Safe CSS · edvin/tornadofx Wiki - GitHub
TornadoFX has a type safe DSL for generating CSS, including type safe ... You can even use type safe styles for inline style...
Read more >CSP Allow Inline Styles - Content Security Policy
When you have a Content-Security-Policy header defined, the browser will automatically block inline style (unless you implement one of the workarounds ...
Read more >CSP: style-src - HTTP - MDN Web Docs - Mozilla
To allow inline styles, 'unsafe-inline' , a nonce-source or a hash-source that matches the inline block can be specified. Content-Security- ...
Read more >CSS Web Safe Fonts - W3Schools
Best Web Safe Fonts for HTML and CSS · Arial (sans-serif) · Verdana (sans-serif) · Tahoma (sans-serif) · Trebuchet MS (sans-serif) · Times...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It would be cool for CSS classes to be real things on the level of Kotlin language, so unused classes will be grey in IDE and may be stripped, and used classes may be automatically renamed to have names consisting of 1-2 chars. I mean, DSL should not just repeat CSS itself, but add some extra safety, performance, etc.
I’m using https://github.com/olegcherr/Aza-Kotlin-CSS (via an
unsafe
block) and it works fine for me so far.