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.

    Module Regions - Tutorial Requested

    Scheduled Pinned Locked Moved Development
    9 Posts 4 Posters 6.2k 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.
    • V Offline
      valid8r
      last edited by

      Can someone explain in basic conceptual terms how the module regions (‘.top., .third., … etc.’) are designed to work? I am trying to understand so I can enlarge or shrink the 4 boundaries for a given region but don’t understand how the .css works in this case.

      I suspect that others might find this useful as well and appreciate the time anyone takes to put something together.

      Many thanks in advance.

      1 Reply Last reply Reply Quote 0
      • mochmanM Offline
        mochman Module Developer
        last edited by mochman

        You can find information about them here.

        V 1 Reply Last reply Reply Quote 0
        • V Offline
          valid8r @mochman
          last edited by

          @mochman Thanks, I had/have that link and it is useful. I am trying to understand the way in which main.css defines the regions and how that structure actually works. I’m new to .css and find the code hard to understand. How for example are the horizontal dimensions set for a given region?

          Thanks

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

            @valid8r a couple of regions as you can see on the picture have full width and the others are generic

            they are placed with top, left, right and bottom properties and position: absolute on the screen

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

            V 1 Reply Last reply Reply Quote 0
            • V Offline
              valid8r @strawberry 3.141
              last edited by

              @strawberry-3.141 If my questions get to be too frustrating, please feel free to say so and I will stop. So from this thread, how would I know what the right hand border size of a .top.left region was (in other words, how wide is the region)? The code I think from main.css for this is I believe the followingn, but it only defines the top for these regions is 100% of top, what are the width or border dimensions…?

              .region.top.right,
              .region.top.left,
              .region.top.center {
              top: 100%;
              }

              1 Reply Last reply Reply Quote 0
              • brobergB Offline
                broberg Project Sponsor
                last edited by

                They have no defined size per say,

                add
                outline: #fff solid;
                to all .regions, that will give you a sense of how they look.

                V 1 Reply Last reply Reply Quote 1
                • V Offline
                  valid8r @broberg
                  last edited by

                  @broberg Thanks, will do so, but I don’t understand how they can not have a defined size??? how does that work? For example, I have calendar (.top.left), Advent (.top.center) and Weather (.top.right)… however, the default sizes of each region/module are not equal thirds… trying to understand this.

                  brobergB 1 Reply Last reply Reply Quote 0
                  • brobergB Offline
                    broberg Project Sponsor @valid8r
                    last edited by broberg

                    @valid8r they expand, adapting to the content of the


                    They only need positioning and orientation.

                    all

                    without size constrains will adapt to it’s content and the
                    or body it’s placed in.
                    You can certainly add width and height constrains to the regions if you feel like it.

                    The thing with

                    is you can basically place them anywhere you want to, make them any size, make them lay over or under other
                    and so on and so on.

                    V 1 Reply Last reply Reply Quote 1
                    • V Offline
                      valid8r @broberg
                      last edited by

                      @broberg Interesting… I didn’t know about

                      and am now reading up on it. Thanks for pointing me in the right direction that explains a lot. I’ll try to read up on this before asking any more questions!

                      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