• 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.

Usage of "classes" Parameter

Scheduled Pinned Locked Moved Custom CSS
2 Posts 2 Posters 813 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.
  • T Offline
    tylerj714
    last edited by Feb 8, 2021, 7:31 PM

    The module configuration documentation says that you can set a custom “classes” parameter and specify css classes for a module. I am displaying several modules on multiple pages where the main page has a small “snapshot” bit of information, and then on another page I have more in-depth information (calendars, weather forecasts, etc.). I’d like to adjust the font size for the module on only one of the pages. What is the format of using the “classes” parameter then? I’ve tried this for the config:

    ...
    module: 'module-name',
    classes: 'myclass',
    ...
    

    and then something like this in the custom.css:

    .module-name .myclass {
    font-size: 50px;
    }
    

    but it doesn’t seem to be taking, so I’m assuming I’m doing it wrong and haven’t been able to find any examples. Any help would be great. Thanks!

    S 1 Reply Last reply Feb 8, 2021, 9:04 PM Reply Quote 0
    • S Offline
      sdetweil @tylerj714
      last edited by sdetweil Feb 8, 2021, 9:05 PM Feb 8, 2021, 9:04 PM

      @tylerj714 i think these classes are without the module prefix

      you should be able to see the classes assigned in the developers window elements tab

      Sam

      How to add modules

      learning how to use browser developers window for css changes

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