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

CSS for small fullscreen display

Scheduled Pinned Locked Moved Development
7 Posts 3 Posters 2.0k 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.
  • S Offline
    sdetweil @cweinhofer
    last edited by Jul 4, 2020, 2:35 PM

    @cweinhofer I have a css that is view size vs pixel size.

    don’t know if it will work as is

    https://www.dropbox.com/s/o07lc85wnn1hcsm/mainvh.css?dl=0

    replace main.css w this
    save old main
    css of course

    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 @cweinhofer
      last edited by Jul 4, 2020, 2:37 PM

      @cweinhofer you could also try zoom in on the browser, not sure how to do that
      on phone/tablet

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      S 1 Reply Last reply Jul 4, 2020, 2:40 PM Reply Quote 0
      • S Offline
        sdetweil @sdetweil
        last edited by sdetweil Jul 4, 2020, 2:41 PM Jul 4, 2020, 2:40 PM

        @cweinhofer had to enable zoom in the settings/accessibility setting on chromium. slider there to adjust

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        C 1 Reply Last reply Jul 4, 2020, 9:47 PM Reply Quote 0
        • C Offline
          cweinhofer @sdetweil
          last edited by Jul 4, 2020, 9:47 PM

          @sdetweil Thanks for the suggestions. The browser options didn’t seem to work for me, but the viewport CSS did. I couldn’t use your file as-is, but was able to borrow from it to add to my custom CSS.

          I ended up adding custom sizes for each element – one of the things I was trying to avoid – but it was the only workable solution I could come up with for now.

          I was wondering if the CSS transform: scale(x); might be a solution for scaling the whole layout, but I’m not sure what element to apply it to. Maybe someone who is more knowledgeable can comment.

          I know that the body margin, height, and width all need to be adjusted, not just the font size, so it would need to accommodate for that.

          Here’s my custom CSS if anyone’s interested:

          body {
          	margin: 6vw;
          	height: calc(100% - 12vw);
          	width: calc(100% - 12vw);
          	font-size: 9vw;
          	line-height: 9vw;
          }
          
          .small {
          	font-size: 9vw;
          	line-height: 9.5vw;
          }
          
          .medium {
          	font-size: 6vw;
          	line-height: 6.5vw;
          }
          
          .large {
          	font-size: 36vw;
          	line-height: 36vw;
          }
          
          header {
            font-size: 6vw;
            line-height: 6vw;
            padding-bottom: 2vw;
            margin-bottom: 3vw;
          }
          
          .module {
            margin-bottom: 12vw;
          }
          
          S 1 Reply Last reply Jul 4, 2020, 11:06 PM Reply Quote 0
          • P Offline
            Piranha1605
            last edited by Piranha1605 Jul 4, 2020, 10:46 PM Jul 4, 2020, 10:29 PM

            What you mean is called responsive web design. for example, you could use the tablet in portrait or landscape format and thus adjust the position of the modules.You have to change the index.html for this with the meta name viewport, but with an update the index.html will probably be overwritten.

            https://www.w3schools.com/css/css_rwd_intro.asp

            1 Reply Last reply Reply Quote 0
            • S Offline
              sdetweil @cweinhofer
              last edited by Jul 4, 2020, 11:06 PM

              @cweinhofer I am glad it helped

              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
                6/7
                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