Skip to content

Conversation

fgiuba
Copy link

@fgiuba fgiuba commented Mar 11, 2019

Hi everyone,

I need to apply pure CSS conditional formatting to rendered tables, something like you can see here.

The result must look like the following table:
css-conditional-formatting

To get this working we need an attribute on the <td> elements on which apply the CSS attribute selector rules.

This PR add to Table.render() the value_attribute option. If set to True, each <td> element value will be replicated into a new value attribute added to the <td> element itself. If set to False, the table will be rendered as usual.

fgiuba added 3 commits March 11, 2019 14:13
Table.render() now accepts the `value_attribute` parameter.

If set to True, each <td> element will be created with the `value`
attribute that mirror the content of the element itself. This can be
used to apply CSS conditional formatting rules with the CSS selector
functions.
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