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

added class and classAlt options #264

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

cristianvogel
Copy link

@cristianvogel cristianvogel commented Feb 8, 2022

Additional properties for adding class name attribute to the HTML tag names generated by .to-html formatter Optionally, a classAlt key can be used for tying a different class to every other tag rendered. Perhaps this method could replace the inline style properties.

Example with different Bulma class name alternating per row:

        table(data)
            .toHTML({
                class: { tr: "has-background-white-bis", td: "p-1"},
                classAlt: {tr:"has-background-light" },
                limit: 10
            })

I haven't tested the function passing, although I used the same logic as the style tag , so should work the same way.

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

Successfully merging this pull request may close these issues.

1 participant