• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
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.

Resize custom or main modules

Scheduled Pinned Locked Moved Development
24 Posts 6 Posters 35.4k Views 10 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.
  • B Offline
    bokifide
    last edited by Jul 12, 2016, 3:00 PM

    Hey thanks for the reply!

    I understand that part, what I was wondering is once I actually add those values in custom.css how do I link it to the specific module that I want?

    If its newsfeed lets say, do I change or add something in config.js?
    Or do I change or add something to in the newsfeed.js, that’s in the module’s folder?
    Or do I copy the custom.css file to the folder itself and then somehow make reference to it?

    Simply… what do I do after I add the above value to custom.css to tell it what I want to change

    Sorry for being a newb. 0.o I know this is an obvious answer for most of you.

    Thanks for your help :)

    1 Reply Last reply Reply Quote 0
    • K Offline
      KirAsh4 Moderator
      last edited by KirAsh4 Jul 12, 2016, 4:50 PM Jul 12, 2016, 4:13 PM

      Those CSS rules will affect all the modules, as all modules use them. If you only want to affect one single module, then you need to change the rules to point to the specific module. Let’s say you want the text smaller on the newsfeed, then you need to look at the actual HTML being created to get the class named being used:

      <div id="module_8_newsfeed" class="module newsfeed newsfeed" style="transition: opacity 1.25s; opacity: 0; position: static;">
        <div class="module-content">
          <div>
            <div class="light small dimmed">ESPN - Top News, 4 minutes ago:</div>
            <div class="bright medium light">Georgia RBs Chubb, Michel still iffy for opener</div>
          </div>
        </div>
      </div>
      

      Now you can see that the rules that affect the text, 'light small dimmed' and 'bright medium light' are all contained within the main class 'module newsfeed newsfeed' (on the very first line.)

      Using a bit of CSS juju, doing this:

      .newsfeed .medium {
        font-size: 18px;
      }
      

      … will make the text of the article headline smaller than the default '30px'. And this will only affect the newsfeed module. All the others also using the 'medium' rule will be unaffected.

      A Life? Cool! Where can I download one of those from?

      D 1 Reply Last reply Oct 9, 2016, 6:47 AM Reply Quote 0
      • B Offline
        bokifide
        last edited by Jul 12, 2016, 4:24 PM

        Awesome! Thanks for explaining that :) I’ll give it a try now.

        1 Reply Last reply Reply Quote 0
        • B Offline
          bokifide
          last edited by Jul 12, 2016, 5:26 PM

          Hey so I was testing out the custom.css values to see how it affects the magic mirror and I’m not getting any difference for some reason =/.

          Before
          alt text

          The change (changed the px values to be way lower than what was shown in the original paste above)
          alt text

          After the above change
          alt text

          I was hoping changing those values would mean that I could make it look clean enough to not change the size of specific modules, but I seem to still be missing something :( .

          Regards,
          Boki

          1 Reply Last reply Reply Quote 0
          • K Offline
            KirAsh4 Moderator
            last edited by Jul 12, 2016, 6:14 PM

            '.small' affects the calendar, weather forecast modules, and newsfeed sourceTitle
            '.medium' affects the date (only), current weather EXCEPT the temperature display, newsfeed article title
            '.large' affects the time display and temperature from current weather

            I’m sure there are others I’ve missed.

            Those are all 'master' rules, affecting all those modules. If you want to only change a specific module, you have to follow the steps I mentioned above.

            A Life? Cool! Where can I download one of those from?

            1 Reply Last reply Reply Quote 0
            • Z Offline
              zombi27
              last edited by Jul 13, 2016, 6:49 AM

              I know it!

              Tried the same yesterday, and found a “bug” :)
              You inserted your code inside the body { } section (like i did), wich is not working…
              Just erase the body { } from the custom.css and paste the code in the empty file :)

              @MichMich, @KirAsh4: Is the body { } section a leftover from an older version maybe?

              M 1 Reply Last reply Jul 13, 2016, 8:14 AM Reply Quote 0
              • M Offline
                MichMich Admin @zombi27
                last edited by Jul 13, 2016, 8:14 AM

                @zombi27 Nope, it’s an example to show where your CSS must go … ;)

                I think there is a limit in how far we should spoon feed the users. ;)

                1 Reply Last reply Reply Quote 0
                • Z Offline
                  zombi27
                  last edited by Jul 13, 2016, 10:50 AM

                  okay :D The body section confused me too, so maybe it’s better to keep it empty? just a comment “place css code here?”

                  i could send a pull request? would be my first one :D or how could this be done? totally new to github…

                  1 Reply Last reply Reply Quote 0
                  • B Offline
                    bokifide
                    last edited by bokifide Jul 13, 2016, 8:13 PM Jul 13, 2016, 8:11 PM

                    ahh… See I was thinking it was a bug as well, I don’t know much about CSS or programming in general, but I’m glad you clarified that part @zombi27 . I had just gone directly to the main.css to modify the values since I couldn’t get the dashboard to reflect the custom.css values :). I’ll give it a try once I get home.

                    Thanks for the help and direction @KirAsh4 @MichMich @zombi27

                    Boki

                    1 Reply Last reply Reply Quote 0
                    • K Offline
                      KirAsh4 Moderator
                      last edited by Jul 14, 2016, 6:39 AM

                      Yep, that body { ... } rule is just there as an example. A quick search on 'css example' on Google would’ve shown you oodles of examples on syntax, almost to a fault.

                      A Life? Cool! Where can I download one of those from?

                      1 Reply Last reply Reply Quote 0
                      • 1
                      • 2
                      • 3
                      • 1 / 3
                      1 / 3
                      • First post
                        7/24
                        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