MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    adapt css to a module with content

    Scheduled Pinned Locked Moved Custom CSS
    5 Posts 2 Posters 820 Views 2 Watching
    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 Offline
      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 Offline
        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

        Sam

        How to add modules

        learning how to use browser developers window for css changes

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

          @sdetweil thanks.

          1 Reply Last reply Reply Quote 0
          • C Offline
            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 Offline
              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

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              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 Sam, technical setup by Karsten.
              This forum is using NodeBB as its core | Contributors
              Contact | Privacy Policy