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.

    Changing Text Size and Color

    Scheduled Pinned Locked Moved Custom CSS
    11 Posts 3 Posters 2.1k Views 3 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.
    • G Offline
      Grizz952 @BKeyport
      last edited by

      @BKeyport OK. I can see the Developer’s Window, and can navigate to the desired module element. But, my head is spinning from the display of information. It is not clear (to me) how to translate this into a ‘custom.css’ statement. Is there a ‘gentle’ (e.g., novice) guide to using this information?

      S 1 Reply Last reply Reply Quote 0
      • S Do not disturb
        sdetweil @Grizz952
        last edited by

        @Grizz952 you can use the top right window to enter styles on the selected element

        you can copy/paste that into the braces of the selector clause in custom.css

        you can use the info from the elements view to build the selector clause…

        THAT is NOT copied… (wish is was)

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        BKeyportB 1 Reply Last reply Reply Quote 0
        • BKeyportB Offline
          BKeyport Module Developer @sdetweil
          last edited by

          what @sdetweil said - here’s the thing - try looking at the raw css before it gets generated in the files I indicated - you can match that up to what you’re seeing in the developer window.

          Some other tips - if you’re using chrome or edge to view your mirror for dev mode:

          The Elements Tab shows the raw HTML generated by MM. If you click on the icon in the upper left of the elements window as shown below, you can then click on an item you want to change and see how it’s done.

          Chrome: 043fc2cd-0dca-46e3-a333-2fed25b75137-image.png Edge: 5533d5b8-b937-4b1d-93f6-4212a3a1c9c3-image.png

          you’ll see something like: 017d17e9-7c9a-4c80-b79c-d3bb686c0cd1-image.png

          You can then either use those to find the classes in their respective css files (In my case MMM-EmbedURL.css in the MMM-EmbedURL directory, or main.css in the css directory, and adjust in custom.css if you don’t mind reloading frequently to see what happens.

          Alternatively, there’s a Styles tab, usually located below the elements tab, that you can pull up, and follow Sam’s direction. Generally, the options flow from top to bottom in this screen, and crossed out items are overridden (even with the same items) with something above it - it’ll show what and where it got it, by line number too.

          652d5fd9-45c4-4bbb-8537-0421dd53e2ce-image.png

          Variables are declared like var(–aVariable) – if you see that, the setting is elsewhere, go lower in the styles, you’ll find it without the var() wrapper, that’s the declaration. Again, the location of the original CSS is listed in the upper right hand corner for you to grab and modify.

          9f1e8bd8-e619-4af2-af7f-b06def7ff8cb-image.png
          (my root declarations are in custom.css starting at line 12)

          848df200-c245-41bc-9f47-5b745bccdb5a-image.png
          (Their root declarations are in main.css starting at line 1)

          When I make changes, I copy the entire text from the original CSS file and paste it into the custom.css - you can just enter the changes, but there was some change I made that didn’t want to work unless I replaced the whole thing, so I got into that habit.

          As you’re wanting to work with the clock, there’s one other change you might need to do. Clock is a fast updater on the screen, every second. Once the mirror is loaded completely in your browser of choice, in the developer window, right click on the div that includes the region the clock is in (Top bar contains all the top elements, bottom bar includes all the bottom elements) and use the “Break On” menu to break on “Subtree Modifications” - this will pause the mirror ASAP and let you work on it without it resetting mid-work.

          Most important, relax - the worse you can do if you don’t modify the system files is break it temporarily. If that happens, back out your changes and try different.

          The "E" in "Javascript" stands for "Easy"

          S 1 Reply Last reply Reply Quote 0
          • S Do not disturb
            sdetweil @BKeyport
            last edited by

            @BKeyport Screenshot at 2023-12-01 15-21-12.png

            and here is those views tied together. the class module… MMM-EmbedURL

            to the start of the css selector clause

            . (means class)MMM-EmbedURL

            the original in EmbedURL.css
            which is overridden (because of the strike thrus

            and the overriding will be higher up in the right pane as the higher will override the lower… its a stack… top-most wins

            this css entry applies to elements that have the (selector of)
            module classname
            .MMM-EmbedURL
            AND the .embed class
            AND the .embededSubWrapper0 class
            (because there is space between them neans nested is supported
            if there was NO space, it would me an element that has ALL these attributes(classes in this case) AT THE SAME TIME.

            Sam

            How to add modules

            learning how to use browser developers window for css changes

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

              @sdetweil Thanks Gents. The more I look at this, the brighter my ‘bulb’ gets. Not there yet, but coming along. Thanks for the great instruction.

              S 1 Reply Last reply Reply Quote 0
              • S Do not disturb
                sdetweil @Grizz952
                last edited by

                @Grizz952 you should set some styles in the top right empty element window to see the effects

                Sam

                How to add modules

                learning how to use browser developers window for css changes

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