Skip to content
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

Improve the documentation on custom tags #244

Open
reubenfirmin opened this issue Oct 26, 2023 · 0 comments
Open

Improve the documentation on custom tags #244

reubenfirmin opened this issue Oct 26, 2023 · 0 comments

Comments

@reubenfirmin
Copy link

reubenfirmin commented Oct 26, 2023

It's pretty barebones: https://github.com/Kotlin/kotlinx.html/wiki/Micro-templating-and-DSL-customizing

How do we add custom attributes? StringAttribute exists and seems to be the thing, but there are no examples of how to use it, and no javadoc.

Let's take the following example as something we want to be able to do based on the docs. SVG is incomplete, so we want to be able to extend it in order to support the following:

                    svg("w-6 h-6") {
                        fill = "currentColor"
                        viewbox = "0 0 20 20"
                        xmlns = "http://www.w3.org/2000/svg"
                        path {
                             fillRule = "evenodd"
                             d =
                                 "M3 5a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 10a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 15a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1z"
                             clipRule = "evenodd"
                         }
                     }

How do we even start? The docs should give us enough information to understand how to proceed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant