Navigation

    MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord

    adapt css to a module with content

    Custom CSS
    2
    5
    61
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • C
      chassain 0 last edited by

      Hello,

      i’m working with MMM-PublicTransportHafas. This module is compatible with french stations.
      I’m trying to modifie css with my parameters. For Germany here a example

      .rb, .re {
        background-color: #F01414;
        border: 0.5px white solid;
        color: black;
      }
      
      .rbWithProductName:before {
        content: "RB ";
      }
      

      the name of train in Germany is like RB 1232 but in France it’s more like TER1232…There is no space between name and number. How adapt the content to define TER associed all numbers after

      .ter {
      background-color: #F01414;
        border: 0.5px white solid;
        color: black;
      
      .terWithProductName:before { //////?????
        content: "TER~p ";/////????
      

      thanks for a help

      S 1 Reply Last reply Reply Quote 0
      • S
        sdetweil @chassain 0 last edited by

        @chassain-0 open the developers window, ctrl-shift-i on the keyboard, select the elements tab,

        click the arrow on the top left of the elements tab and then navigate where the content is,
        while navigating it will highlight the elements
        and click on the one you want…

        now you can examine the classes and styles

        once u have the name u can then set your custom.css to match

        C 2 Replies Last reply Reply Quote 0
        • C
          chassain 0 @sdetweil last edited by

          @sdetweil thanks.

          1 Reply Last reply Reply Quote 0
          • C
            chassain 0 @sdetweil last edited by

            @sdetweil

            No parameter on this…
            the table displays with name of trains…some TERXXX and TGVXXXX…i wanted to have a difference between both for the fun in css…

            S 1 Reply Last reply Reply Quote 0
            • S
              sdetweil @chassain 0 last edited by

              @chassain-0 see this

              https://support.awesome-table.com/hc/en-us/articles/115001399529-Use-CSS-to-change-the-style-of-each-row-depending-on-the-content

              1. Display and style elements depending on their value
              1 Reply Last reply Reply Quote 1
              • 1 / 1
              • First post
                Last post
              Enjoying MagicMirror? Please consider a donation!
              MagicMirror created by Michael Teeuw.
              Forum managed by Paul-Vincent Roll and Rodrigo Ramírez Norambuena.
              This forum is using NodeBB as its core | Contributors
              Contact | Privacy Policy