Menu

Custom CSS

2024-06-28
2024-07-19
  • Xavier Prieur

    Xavier Prieur - 2024-06-28

    I can't find a simple method to add css to my module. Do you have a clear guide?
    My goal is simple, invert the colors of a progress bar (red for 0 and green for 100%)

     
  • Guillaume Lajarige

    Hello Xavier,

    As your are talking about the percentage attribute, I'm guessing you want to add your stylesheet in the backoffice, not the end-user portal.

    If you are running iTop 3.0+, you can use the \iBackofficeLinkedStylesheetsExtension interface. You can find an example here.

    If you are running iTop 2.7, then there is no dedicated API, but you can proceed like in this example.

    Hope it helps :)
    Guillaume

     
    👍
    1

    Last edit: Guillaume Lajarige 2024-06-29
  • Xavier Prieur

    Xavier Prieur - 2024-07-19

    Hello Guillaume,
    Yes it's on backoffice and iTop 3.1.1-1-12561.
    I managed to load my css, but cannot add the class to the element.
    The following setting does not seem to work:
    <style><br> <css_class>compliance-percentage</css_class><br> </style>

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.