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

Is h('div#id.class1.class2', ...) needed ? #8

Open
Swizz opened this issue Apr 19, 2017 · 2 comments
Open

Is h('div#id.class1.class2', ...) needed ? #8

Swizz opened this issue Apr 19, 2017 · 2 comments
Labels

Comments

@Swizz
Copy link
Owner

Swizz commented Apr 19, 2017

ATM, the sel property in Snabbdom-pragma is only related to the html element.

Snabbdom-JSX use something like the following code, to handle something they call Id and static classes (sel attribute)

<div selector="#id.class1.class2" />

Today, you can use the following code to achieve this

<div id="id" class={{ 'class1': true, 'class2': true }} />

So, Is this feature requested ?

@Swizz Swizz added the Poll label Apr 19, 2017
@Swizz Swizz changed the title Is h('div#id.class1.class2', ...) needed Is h('div#id.class1.class2', ...) needed ? Apr 19, 2017
@Swizz
Copy link
Owner Author

Swizz commented Apr 19, 2017

The following code is also working as intended

<div id="id" attrs-class="class1 class2" />

We can also aim to use

<div id="id" class={['class1', 'class2']} />

@Swizz
Copy link
Owner Author

Swizz commented May 13, 2017

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

No branches or pull requests

1 participant