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

Easy Center Resizing?

Scheduled Pinned Locked Moved Unsolved Troubleshooting
6 Posts 4 Posters 1.2k Views 4 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.
  • S Offline
    sdetweil @amarand
    last edited by sdetweil May 7, 2023, 7:26 PM May 7, 2023, 7:25 PM

    @amarand sadly there is no ‘easy’ way

    the default section/position/regions layout is like this
    https://forum.magicmirror.builders/topic/286/regions?_=1683231109633

    no two authors do styling the same way. every thing u tweak makes trouble somewhere else…

    using the developers console is one good tool, but its all still hard work.
    https://forum.magicmirror.builders/topic/14862/help-with-a-couple-css-issues?_=1683231109642

    Sam

    How to add modules

    learning how to use browser developers window for css changes

    1 Reply Last reply Reply Quote 0
    • S Offline
      sdetweil @amarand
      last edited by May 11, 2023, 11:20 PM

      @amarand ps. I’ve been here since 2017, and do a lot of css, and modules… but I couldn’t tell you how to do it, cause I can’t myself.

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      B 1 Reply Last reply May 12, 2023, 5:12 AM Reply Quote 0
      • B Offline
        BKeyport Module Developer @sdetweil
        last edited by May 12, 2023, 5:12 AM

        @amarand I’d do it like this:

        .region.right {
        	min-width: 450px;
        }
        
        .region.left {
        	min-width: 450px;
        }
        
        

        there’s also max-width if you want to lock it solid.

        Easy.

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

        1 Reply Last reply Reply Quote 0
        • M Offline
          MMRIZE
          last edited by MMRIZE May 12, 2023, 6:41 AM May 12, 2023, 6:40 AM

          The center position is the weirdest thing of MM. The width of center is decided by this code;

          .region.top.center,
          .region.bottom.center {
            left: 50%;
            transform: translateX(-50%);
          }
          

          This code looks so intuitive, but not so really. It is calculated and applied after rendering, so that makes some issues;

          Anyway, this code would be a help for what you want;

          .region.left {
            width: 50%;
            background-color: rgba(255,0,0, 0.2); /* to check how it shows visibly; remove this line later. */
          }
          
          .region.right {
            width: 50%;
            background-color: rgba(0,255,0, 0.2); /* to check how it shows visibly; remove this line later. */
          }
          
          .region.center {
            display:none;
          }
          

          By the way, current structure of MM’s positioning becomes a bit old and stubborn legacy.(almost 7 or 8 years old) Maybe we need to progress with more modern techs.

          B 1 Reply Last reply May 12, 2023, 7:17 PM Reply Quote 1
          • B Offline
            BKeyport Module Developer @MMRIZE
            last edited by BKeyport May 12, 2023, 7:22 PM May 12, 2023, 7:17 PM

            @MMRIZE I would love to see it reworked, mostly to add the missing 2 positions. (middle left, middle right)

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

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