Use CSS to change the style of each row depending on the content

Follow

Comments

2 comments

  • Avatar
    Charles Riebeling

    How would this code look if I want to change formatting using the table formatting. For example, if I wanted to change the value in column B red depending on the corresponding value in column A.

    Thanks!

    Charlie

  • Avatar
    Awesome Table

    Hello Charles,

    If you have two columns, "Content" and "Color". You could set up a template on the "Content" column that would look like that:

    <p data-color="{{Color}}" class="content">{{Content}}</p>
    .content[data-color="red"] {
    color : red
    }


    .content[data-color="green"] {
    color : green
    }

    If you need any further assistance, please  create a ticket so I can give you more help.

    Nicolas

     

     

Please sign in to leave a comment.