-
Notifications
You must be signed in to change notification settings - Fork 133
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
type safe inline css #31
Comments
I would suggest looking at the jsxstyle project for inspiration. |
most likely we need to integrate one of existing css libraries |
For the short term, IntelliJ has a built in "Inject Language or Reference" feature (https://www.jetbrains.com/help/idea/using-language-injections.html) that is helpful in this situation. In short, Press ALT-ENTER, select "Inject language or reference" then select CSS. |
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. |
Also, GWT had this. Might be worth looking into that. |
Perhaps I can annotate all |
I'm using https://github.com/olegcherr/Aza-Kotlin-CSS (via an |
Having this would dramatically increase the usability of kotlinx.html |
I tried several alternatives, including the above suggestion of a secondary css library, but I found all of the approaches lacking - primarily that I wanted to use an html library to keep my html code maintainable, but all my html code was ugly and difficult to read. Over the past several weeks, I've created an alternative library, kotlin-html to add css, provide first-class support for ids, classes, and styles, and provide a simpler architecture so it was easier for people to contribute. |
|
|
When 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?
The text was updated successfully, but these errors were encountered: