Need more ability to style tables with custom CSS

Options
Morten Proschowsky
Morten Proschowsky Member Posts: 8
edited July 2016 in
Are there any easy ways to style tables inside Jama? I do not like style and readability of the default table format.

I found an article on your site https://community.jamasoftware.com/jama/topics/how-to-get-table-consistency-use-word-table-styles where it is recommended to use MS Word, but we would prefer not to depend on Word.

I can see that it is possible to specify CSS classes for a table, but can we add custom CSS to our hosted Jama solution?

Comments

  • Scott Holland
    Scott Holland Member Posts: 43
    edited January 2016
    Options
    +1 for this. It would be good if we could apply a style for all new tables

    Also, I can't get cell padding to work. Does anyone else have this issue?
  • [Deleted User]
    [Deleted User] Posts: 911
    edited June 2016
    Options
    Hi Morton,

    At this point there is no way to way to add custom CSS to a hosted environment. On a per-table basis you may have limited success editing the source HTML of the table (but the rich text editor does some cleansing of HTML, so it might not be a permanent change). I'm going to switch this to an Idea to reflect that it's something that you (and Scott) would like to see happen.

    Scott, at first try I'm not able to successfully update the cell padding on a table, either. I'm going to look into that and get back to you. I'd love to hear if someone else has run into that, though, and found a way to make it work!
  • Morten Proschowsky
    Morten Proschowsky Member Posts: 8
    edited January 2016
    Options
    Thanks. We use lot of tables in our specification work, so it is crucial for us that it gets improved. 

    Being able to use custom CSS would solve most of our problems.
  • Morten Proschowsky
    Morten Proschowsky Member Posts: 8
    edited June 2016
    Options
    I discovered that there are already some default table styles defined in the css.

    Adding "table table-bordered table-striped" in Table properties > Advanced > Stylesheet classes will increase the readability of tables a lot. I still not perfect, but a lot better than the default look.

    It would be great to have this feature documented, so it is easy to know which classes that are defined.
  • [Deleted User]
    [Deleted User] Posts: 911
    edited June 2016
    Options
    Morten, I talked with our UX Director and he peeked in the code to see what is allowed using the Advanced settings in the table editor. The rules are as follows.
    • <TABLE>: You can add any style (i.e. table table-bordered table-striped)  or attribute (i.e. Cellpadding="1")
    • <TR> You can add any style but no attributes 
    • <TD> You can add any style but no attributes 
    • Classes are stripped out. This is a security function of the rich text editor. Essentially any custom CSS class you add via Source or via the Stylesheet Classes box in the table editor will be stripped upon save.
  • [Deleted User]
    [Deleted User] Posts: 49
    edited March 2020
    Options
    In cloud this doesn't seem to be true anymore.
    If I add "table table-bordered table-striped" in Advanced > Stylesheet classes it shows up as expected. However upcon save the stylesheet classes are stipped away.

    Is there any way to get consistent table layout with improved readability? I don't like copy pasting tables from an Office app.