Polymer / shop

The Shop app
https://shop.polymer-project.org/
986 stars 494 forks source link

4K support #186

Closed quetzalsly closed 6 years ago

quetzalsly commented 6 years ago

On my 4K monitor without any DPI scaling enabled the site looks tiny, the font is very hard to read. It looks great with chrome zoomed in to 150%. So I tried to replicate that with:

@media only screen and (min-width : 3823px)
  {
    body
    {
      transform:                 scale(1.5);
      -webkit-transform:         scale(1.5);
      -moz-transform:            scale(1.5);
      -o-transform:              scale(1.5);
      transform-origin:          top;
      -webkit-transform-origin:  top;
      -moz-transform-origin:     top;
      -o-transform-origin:       top;
     }
  }

It looks nice now, however the cart icon is now gone and the tabs underline behaves weirdly.

Is there any easy way to make the site scalable? Going through each font-size css could work but then it might not work because of the line heights and other stuff.

merlinnot commented 6 years ago

Hm... transform on body might not be the best idea. You can try replacing all px units with relative ones like em, rem, vh, vw, it shouldn't be too hard. vh and vw does not scale with zoom tho, so don't use it unless you have to.

For simplicity, go with rem and assume 1 rem = 16px.