MagicMirror Forum

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

    MMM-Traffic - make text lighter ?

    Troubleshooting
    4
    10
    3393
    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.
    • I
      ironman_DK last edited by

      how can I make the highlighted text lighter (and only this text, not the text above )

      0_1490378440181_2017-03-24 18.56.32.jpg

      strawberry 3.141 1 Reply Last reply Reply Quote 0
      • strawberry 3.141
        strawberry 3.141 Project Sponsor Module Developer @ironman_DK last edited by

        @ironman_DK should be

        .MMM-Traffic div.small.dimmed {
          //your magic
        }
        

        but couldn’t test it

        Please create a github issue if you need help, so I can keep track

        I 1 Reply Last reply Reply Quote 0
        • I
          ironman_DK @strawberry 3.141 last edited by

          @strawberry-3.141 what do you mean do I have to delete it or … I guess that the text regarding the text is here :

          //routeName
          if (this.config.route_name) {
          routeName.className = ‘dimmed small’;
          if (this.summary.length > 0 && this.config.show_summary){
          routeName.innerHTML = this.config.route_name + ’ ’ + this.config.summaryText + ’ ’ + this.summary;
          } else {
          routeName.innerHTML = this.config.route_name;
          }
          }

          Mykle1 1 Reply Last reply Reply Quote 0
          • Mykle1
            Mykle1 Project Sponsor Module Developer @ironman_DK last edited by

            @ironman_DK said in MMM-Traffic - make text lighter ?:

            what do you mean do I have to delete it or … I guess that the text regarding the text is here :

            I think he means make a custon.css entry with the info he gave you rather than change the module files

            Create a working config
            How to add modules

            I 1 Reply Last reply Reply Quote 0
            • I
              ironman_DK @Mykle1 last edited by

              @Mykle1 I have solved the problem, I had to add bright in the text :

              //routeName
              if (this.config.route_name) {
              routeName.className = ‘bright small’;
              if (this.summary.length > 0 && this.config.show_summary){
              routeName.innerHTML = this.config.route_name + ’ ’ + this.config.summaryText + ’ ’ + this.summary + ’ ’ + this.config.arriveByText + ’ ’ + this.config.arrival_time.substring(0,2) + “:” + this.config.arrival_time.substring(2,4);
              } else {
              console.log(typeof this.config.arrival_time );
              routeName.innerHTML = this.config.route_name + ’ ’ + this.config.arriveByText + ’ ’ + this.config.arrival_time.substring(0,2) + “:” + this.config.arrival_time.substring(2,4);
              }
              }
              }

              Mykle1 pjkoeleman 2 Replies Last reply Reply Quote 0
              • Mykle1
                Mykle1 Project Sponsor Module Developer @ironman_DK last edited by

                @ironman_DK said in MMM-Traffic - make text lighter ?:

                I have solved the problem, I had to add bright in the text :

                That’s one way of doing it but they never recommend changing the module file. That is why he gave you a custom.css entry. If that module gets updated you will lose your changes. If you had made the change in the custom.css file then you would not lose your changes if the module gets updated.

                Peace

                Create a working config
                How to add modules

                pjkoeleman 1 Reply Last reply Reply Quote 1
                • pjkoeleman
                  pjkoeleman @ironman_DK last edited by

                  @ironman_DK Thats not the way to do this.

                  Do it this way:

                  • When you don’t have a custom.css create one in /MagicMirror/css
                  • Add the following code to custom.css
                  .MMM-Traffic div.small.dimmed {
                  color: #00FF00;
                  }
                  

                  Now you have the text in green but you can change that as you like.

                  I 1 Reply Last reply Reply Quote 1
                  • pjkoeleman
                    pjkoeleman @Mykle1 last edited by

                    @Mykle1
                    I’am not that fast in typing and testing it …

                    Mykle1 1 Reply Last reply Reply Quote 0
                    • Mykle1
                      Mykle1 Project Sponsor Module Developer @pjkoeleman last edited by Mykle1

                      @pjkoeleman
                      I beat you by 1ms 😉

                      Create a working config
                      How to add modules

                      1 Reply Last reply Reply Quote 1
                      • I
                        ironman_DK @pjkoeleman last edited by

                        @pjkoeleman ahh off course,I have done it, Thnak you for your help 🙂

                        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