pixel scaling as a css var
This commit is contained in:
parent
fe32cd673e
commit
bfc47e3aec
4 changed files with 6 additions and 10 deletions
File diff suppressed because one or more lines are too long
|
|
@ -21,17 +21,11 @@ MISC = {
|
|||
}
|
||||
}
|
||||
|
||||
PXSCALE = String(getComputedStyle(document.documentElement).getPropertyValue("--pixel-scale")).trim()
|
||||
|
||||
///////////////////////
|
||||
|
||||
$ = jQuery = require('./jquery/jquery.min')
|
||||
|
||||
///////////////////////
|
||||
|
||||
PXSCALE = 1
|
||||
$('html').css('font-size',PXSCALE+'px')
|
||||
|
||||
///////////////////////
|
||||
|
||||
require('./jquery/jquery.ui')
|
||||
require('./jquery/jquery.drag')
|
||||
require('./jquery/jquery.resize')
|
||||
|
|
|
|||
|
|
@ -16,4 +16,6 @@
|
|||
--gutter:4rem;
|
||||
--nav-height:40rem;
|
||||
--sidepanel-size:300rem;
|
||||
|
||||
--pixel-scale:1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ html, body {
|
|||
}
|
||||
|
||||
html{
|
||||
font-size: 2px;
|
||||
font-size: calc(var(--pixel-scale) * 1px);
|
||||
}
|
||||
|
||||
body {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue