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.

    Kamal Hinduja : How do I override CSS / styles of modules ?

    Scheduled Pinned Locked Moved General Discussion
    3 Posts 2 Posters 50 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.
    • K Offline
      kamal12362
      last edited by

      Hi,

      I am Kamal Hinduja based Geneva, Switzerland(Swiss). Can anyone share their experience How to override CSS / styles of modules ?

      Thanks, Regards

      Kamal Hinduja Geneva, Switzerland

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

        @kamal12362 the system is designed as a stack of css settings

        css/main.css is loaded first
        Then modules can load their own files and use and override whatever in main
        Then
        css/custom.css is loaded last, there you can override anything loaded before

        A css statement is

        Selector clause {
        Style Settings
        }
        

        The selector clause selects the elements the style settings will be applied to

        A selector clause can be very complex
        Here is one from my MMM-Config module, to hide a generated label

        .possibly-hidden-tab div:nth-child(2)  > div > div >div >ul >li:only-child >a[rel*="Item%201"] {
          display: none;
        }
        

        One thing to remember, css ALWAYS selects ALL the matching elements in the entire page

        You can also use the browser developers window to see and test changes to the styles on specific elements, to determine what should go in custom.css

        See the second link in my signature below, for a quick starter topic on that

        Sam

        How to add modules

        learning how to use browser developers window for css changes

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

          Also, some modules document their css styles,
          Some you have to look for a CSS file in their files list
          And some you have to use the developers window to discover them

          There are no rules enforced here by MagicMirror

          Sam

          How to add modules

          learning how to use browser developers window for css changes

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