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

<main> tag missing #68

Closed
donvargax opened this issue Jan 18, 2018 · 4 comments
Closed

<main> tag missing #68

donvargax opened this issue Jan 18, 2018 · 4 comments

Comments

@donvargax
Copy link

I'm trying to do something like

body { main { p { +"Hello" } } }

But main doesn't exist.

@cy6erGn0m
Copy link
Contributor

@rupert-madden-abbott
Copy link

rupert-madden-abbott commented Mar 24, 2018

Following the ARTICLE tag as an example, I believe this what you need to define a custom MAIN tag:

open class MAIN(initialAttributes: Map<String, String>, override val consumer: TagConsumer<*>) :
    HTMLTag("main", consumer, initialAttributes, null, false, false),
    CommonAttributeGroupFacadeFlowSectioningContent

fun SectioningOrFlowContent.main(classes: String? = null, block: MAIN.() -> Unit = {}): Unit = MAIN(
    attributesMapOf("class", classes), consumer).visit(block)

val MAIN.asFlowContent: FlowContent
  get() = this

val MAIN.asSectioningContent: SectioningContent
  get() = this

@IRus
Copy link

IRus commented Apr 21, 2018

Why not include it in core?

hcf pushed a commit to hcf/kotlinx.html that referenced this issue Apr 25, 2018
hcf pushed a commit to hcf/kotlinx.html that referenced this issue Apr 25, 2018
cy6erGn0m pushed a commit that referenced this issue May 4, 2018
cy6erGn0m pushed a commit that referenced this issue May 4, 2018
@cy6erGn0m
Copy link
Contributor

Fixed in 0.6.10

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

4 participants