Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

This login session: $13.99


devel / comp.lang.javascript / CSS scale transform using javascript?

SubjectAuthor
* CSS scale transform using javascript?Jonas Thörnvall
`* Re: CSS scale transform using javascript?Jonas Thörnvall
 `* Re: CSS scale transform using javascript?Jonas Thörnvall
  `* Re: CSS scale transform using javascript?Jonas Thörnvall
   `* Re: CSS scale transform using javascript?Jonas Thörnvall
    `* Re: CSS scale transform using javascript?Jonas Thörnvall
     `* Re: CSS scale transform using javascript?The Natural Philosopher
      `* Re: CSS scale transform using javascript?Jonas Thörnvall
       `* Re: CSS scale transform using javascript?The Natural Philosopher
        +* Re: CSS scale transform using javascript?Jonas Thörnvall
        |`- Re: CSS scale transform using javascript?The Natural Philosopher
        `* Re: CSS scale transform using javascript?Jonas Thörnvall
         `* Re: CSS scale transform using javascript?The Natural Philosopher
          +- Re: CSS scale transform using javascript?Jonas Thörnvall
          +* Re: CSS scale transform using javascript?Jonas Thörnvall
          |+- Re: CSS scale transform using javascript?Jonas Thörnvall
          |`* Re: CSS scale transform using javascript?The Natural Philosopher
          | `* Re: CSS scale transform using javascript?Jonas Thörnvall
          |  `* Re: CSS scale transform using javascript?The Natural Philosopher
          |   +- Re: CSS scale transform using javascript?Jonas Thörnvall
          |   +* Re: CSS scale transform using javascript?Jonas Thörnvall
          |   |`- Re: CSS scale transform using javascript?Jonas Thörnvall
          |   +- Re: CSS scale transform using javascript?Jonas Thörnvall
          |   `* Re: CSS scale transform using javascript?Jonas Thörnvall
          |    `* Re: CSS scale transform using javascript?Jonas Thörnvall
          |     `* Re: CSS scale transform using javascript?The Natural Philosopher
          |      `* Re: CSS scale transform using javascript?Jonas Thörnvall
          |       +- Re: CSS scale transform using javascript?Jonas Thörnvall
          |       `- Re: CSS scale transform using javascript?The Natural Philosopher
          `* Re: CSS scale transform using javascript?Jonas Thörnvall
           +- Re: CSS scale transform using javascript?Jonas Thörnvall
           `* Re: CSS scale transform using javascript?Jonas Thörnvall
            +- Re: CSS scale transform using javascript?Jonas Thörnvall
            `- Re: CSS scale transform using javascript?Jonas Thörnvall

Pages:12
CSS scale transform using javascript?

<89003e2b-ee41-478b-b44b-4b8235d8564dn@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17286&group=comp.lang.javascript#17286

  copy link   Newsgroups: comp.lang.javascript
X-Received: by 2002:ac8:66d3:: with SMTP id m19mr4736500qtp.287.1632405199843;
Thu, 23 Sep 2021 06:53:19 -0700 (PDT)
X-Received: by 2002:a4a:e8c5:: with SMTP id h5mr3796167ooe.71.1632405199535;
Thu, 23 Sep 2021 06:53:19 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.javascript
Date: Thu, 23 Sep 2021 06:53:19 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=84.217.164.86; posting-account=kxPkPAoAAACjJi8w0gL9bnyznPzdw9HW
NNTP-Posting-Host: 84.217.164.86
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <89003e2b-ee41-478b-b44b-4b8235d8564dn@googlegroups.com>
Subject: CSS scale transform using javascript?
From: jonas.thornvall@gmail.com (Jonas Thörnvall)
Injection-Date: Thu, 23 Sep 2021 13:53:19 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 17
 by: Jonas Thörnvall - Thu, 23 Sep 2021 13:53 UTC

One can't use javascript variables in CSS, but i read one can reach scale from javascript how would i do that?

<script>
function getResolution() {
dispWidth=screen.width;
dispHeight=screen.height;
}
getResolution();
resizedWidth=screenWidth/1920;
resizedHeight=screenHeight/1080;
</script>

<???style>
html {
transform: scale(resizedWidth,resizedHeight);

}
</style>

Re: CSS scale transform using javascript?

<6489e84a-404f-43a9-a7ed-ae97b000f86dn@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17287&group=comp.lang.javascript#17287

  copy link   Newsgroups: comp.lang.javascript
X-Received: by 2002:a37:a095:: with SMTP id j143mr4864134qke.277.1632405630429;
Thu, 23 Sep 2021 07:00:30 -0700 (PDT)
X-Received: by 2002:a05:6808:613:: with SMTP id y19mr3674961oih.176.1632405630171;
Thu, 23 Sep 2021 07:00:30 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.javascript
Date: Thu, 23 Sep 2021 07:00:29 -0700 (PDT)
In-Reply-To: <89003e2b-ee41-478b-b44b-4b8235d8564dn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=84.217.164.86; posting-account=kxPkPAoAAACjJi8w0gL9bnyznPzdw9HW
NNTP-Posting-Host: 84.217.164.86
References: <89003e2b-ee41-478b-b44b-4b8235d8564dn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <6489e84a-404f-43a9-a7ed-ae97b000f86dn@googlegroups.com>
Subject: Re: CSS scale transform using javascript?
From: jonas.thornvall@gmail.com (Jonas Thörnvall)
Injection-Date: Thu, 23 Sep 2021 14:00:30 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 20
 by: Jonas Thörnvall - Thu, 23 Sep 2021 14:00 UTC

torsdag 23 september 2021 kl. 15:53:24 UTC+2 skrev Jonas Thörnvall:
> One can't use javascript variables in CSS, but i read one can reach scale from javascript how would i do that?
>
> <script>
> function getResolution() {
> dispWidth=screen.width;
> dispHeight=screen.height;
> }
> getResolution();
> resizedWidth=screenWidth/1920;
> resizedHeight=screenHeight/1080;
> </script>
>
> <???style>
> html {
> transform: scale(resizedWidth,resizedHeight);
>
> }
> </style>
Maybe i should just create strings dynamically and run?

Re: CSS scale transform using javascript?

<0445a89c-ccad-4689-8d7c-35d9278adfc3n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17288&group=comp.lang.javascript#17288

  copy link   Newsgroups: comp.lang.javascript
X-Received: by 2002:ac8:5788:: with SMTP id v8mr4920047qta.372.1632405688320;
Thu, 23 Sep 2021 07:01:28 -0700 (PDT)
X-Received: by 2002:a05:6808:1a11:: with SMTP id bk17mr3885357oib.0.1632405688059;
Thu, 23 Sep 2021 07:01:28 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.javascript
Date: Thu, 23 Sep 2021 07:01:27 -0700 (PDT)
In-Reply-To: <6489e84a-404f-43a9-a7ed-ae97b000f86dn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=84.217.164.86; posting-account=kxPkPAoAAACjJi8w0gL9bnyznPzdw9HW
NNTP-Posting-Host: 84.217.164.86
References: <89003e2b-ee41-478b-b44b-4b8235d8564dn@googlegroups.com> <6489e84a-404f-43a9-a7ed-ae97b000f86dn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <0445a89c-ccad-4689-8d7c-35d9278adfc3n@googlegroups.com>
Subject: Re: CSS scale transform using javascript?
From: jonas.thornvall@gmail.com (Jonas Thörnvall)
Injection-Date: Thu, 23 Sep 2021 14:01:28 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 23
 by: Jonas Thörnvall - Thu, 23 Sep 2021 14:01 UTC

torsdag 23 september 2021 kl. 16:00:35 UTC+2 skrev Jonas Thörnvall:
> torsdag 23 september 2021 kl. 15:53:24 UTC+2 skrev Jonas Thörnvall:
> > One can't use javascript variables in CSS, but i read one can reach scale from javascript how would i do that?
> >
> > <script>
> > function getResolution() {
> > dispWidth=screen.width;
> > dispHeight=screen.height;
> > }
> > getResolution();
> > resizedWidth=screenWidth/1920;
> > resizedHeight=screenHeight/1080;
> > </script>
> >
> > <???style>
> > html {
> > transform: scale(resizedWidth,resizedHeight);
> >
> > }
> > </style>
> Maybe i should just create strings dynamically and run?
That work for javascript, but probably not for CSS?

Re: CSS scale transform using javascript?

<f4d10a40-8f9d-4669-9440-97407335f855n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17289&group=comp.lang.javascript#17289

  copy link   Newsgroups: comp.lang.javascript
X-Received: by 2002:a37:a20a:: with SMTP id l10mr5058033qke.273.1632407838011; Thu, 23 Sep 2021 07:37:18 -0700 (PDT)
X-Received: by 2002:aca:af8e:: with SMTP id y136mr3978738oie.119.1632407837761; Thu, 23 Sep 2021 07:37:17 -0700 (PDT)
Path: i2pn2.org!i2pn.org!aioe.org!news.uzoreto.com!tr3.eu1.usenetexpress.com!feeder.usenetexpress.com!tr2.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.javascript
Date: Thu, 23 Sep 2021 07:37:17 -0700 (PDT)
In-Reply-To: <0445a89c-ccad-4689-8d7c-35d9278adfc3n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=84.217.164.86; posting-account=kxPkPAoAAACjJi8w0gL9bnyznPzdw9HW
NNTP-Posting-Host: 84.217.164.86
References: <89003e2b-ee41-478b-b44b-4b8235d8564dn@googlegroups.com> <6489e84a-404f-43a9-a7ed-ae97b000f86dn@googlegroups.com> <0445a89c-ccad-4689-8d7c-35d9278adfc3n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <f4d10a40-8f9d-4669-9440-97407335f855n@googlegroups.com>
Subject: Re: CSS scale transform using javascript?
From: jonas.thornvall@gmail.com (Jonas Thörnvall)
Injection-Date: Thu, 23 Sep 2021 14:37:18 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 40
 by: Jonas Thörnvall - Thu, 23 Sep 2021 14:37 UTC

torsdag 23 september 2021 kl. 16:01:34 UTC+2 skrev Jonas Thörnvall:
> torsdag 23 september 2021 kl. 16:00:35 UTC+2 skrev Jonas Thörnvall:
> > torsdag 23 september 2021 kl. 15:53:24 UTC+2 skrev Jonas Thörnvall:
> > > One can't use javascript variables in CSS, but i read one can reach scale from javascript how would i do that?
> > >
> > > <script>
> > > function getResolution() {
> > > dispWidth=screen.width;
> > > dispHeight=screen.height;
> > > }
> > > getResolution();
> > > resizedWidth=screenWidth/1920;
> > > resizedHeight=screenHeight/1080;
> > > </script>
> > >
> > > <???style>
> > > html {
> > > transform: scale(resizedWidth,resizedHeight);
> > >
> > > }
> > > </style>
> > Maybe i should just create strings dynamically and run?
> That work for javascript, but probably not for CSS?
<script>
//function getResolution() {
// dispWidth=screen.width;
// dispHeight=screen.height;
// }
// getResolution();
// resizedWidth=dispWidth/1920;
// resizedHeight=dispHeight/1080;
var bodyStyles = document.body.style;
bodyStyles.setProperty('--scale', '0.5');
</script>

Is there a way to set scale of body like this?

Re: CSS scale transform using javascript?

<d2d234d7-4322-46c8-889b-30d08e1f4f7en@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17290&group=comp.lang.javascript#17290

  copy link   Newsgroups: comp.lang.javascript
X-Received: by 2002:ad4:5591:: with SMTP id e17mr5270706qvx.50.1632412213475;
Thu, 23 Sep 2021 08:50:13 -0700 (PDT)
X-Received: by 2002:a4a:e9e4:: with SMTP id w4mr4325685ooc.13.1632412213199;
Thu, 23 Sep 2021 08:50:13 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.javascript
Date: Thu, 23 Sep 2021 08:50:12 -0700 (PDT)
In-Reply-To: <f4d10a40-8f9d-4669-9440-97407335f855n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=84.217.164.86; posting-account=kxPkPAoAAACjJi8w0gL9bnyznPzdw9HW
NNTP-Posting-Host: 84.217.164.86
References: <89003e2b-ee41-478b-b44b-4b8235d8564dn@googlegroups.com>
<6489e84a-404f-43a9-a7ed-ae97b000f86dn@googlegroups.com> <0445a89c-ccad-4689-8d7c-35d9278adfc3n@googlegroups.com>
<f4d10a40-8f9d-4669-9440-97407335f855n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <d2d234d7-4322-46c8-889b-30d08e1f4f7en@googlegroups.com>
Subject: Re: CSS scale transform using javascript?
From: jonas.thornvall@gmail.com (Jonas Thörnvall)
Injection-Date: Thu, 23 Sep 2021 15:50:13 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 65
 by: Jonas Thörnvall - Thu, 23 Sep 2021 15:50 UTC

torsdag 23 september 2021 kl. 16:37:22 UTC+2 skrev Jonas Thörnvall:
> torsdag 23 september 2021 kl. 16:01:34 UTC+2 skrev Jonas Thörnvall:
> > torsdag 23 september 2021 kl. 16:00:35 UTC+2 skrev Jonas Thörnvall:
> > > torsdag 23 september 2021 kl. 15:53:24 UTC+2 skrev Jonas Thörnvall:
> > > > One can't use javascript variables in CSS, but i read one can reach scale from javascript how would i do that?
> > > >
> > > > <script>
> > > > function getResolution() {
> > > > dispWidth=screen.width;
> > > > dispHeight=screen.height;
> > > > }
> > > > getResolution();
> > > > resizedWidth=screenWidth/1920;
> > > > resizedHeight=screenHeight/1080;
> > > > </script>
> > > >
> > > > <???style>
> > > > html {
> > > > transform: scale(resizedWidth,resizedHeight);
> > > >
> > > > }
> > > > </style>
> > > Maybe i should just create strings dynamically and run?
> > That work for javascript, but probably not for CSS?
> <script>
> //function getResolution() {
> // dispWidth=screen.width;
> // dispHeight=screen.height;
> // }
> // getResolution();
> // resizedWidth=dispWidth/1920;
> // resizedHeight=dispHeight/1080;
>
> var bodyStyles = document.body.style;
> bodyStyles.setProperty('--scale', '0.5');
>
> </script>
>
> Is there a way to set scale of body like this?

Should not something like this work?

<style>
html {
background: white;
height: 100%;
width: 100%;
} </style>

<script>
function getResolution() {
dispWidth=screen.width;
dispHeight=screen.height;
}

getResolution();
resizedWidth=300/1920;
resizedHeight=dispHeight/1080;
var htmlStyles = document.html.style;
htmlStyles.setProperty('--scale',resizedWidth);
</script>

Re: CSS scale transform using javascript?

<9f5ef984-0a89-4bc3-97d0-7a53a67bf3f7n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17293&group=comp.lang.javascript#17293

  copy link   Newsgroups: comp.lang.javascript
X-Received: by 2002:a37:6215:: with SMTP id w21mr6520396qkb.354.1632424357196; Thu, 23 Sep 2021 12:12:37 -0700 (PDT)
X-Received: by 2002:a05:6808:150c:: with SMTP id u12mr4966285oiw.136.1632424356805; Thu, 23 Sep 2021 12:12:36 -0700 (PDT)
Path: i2pn2.org!i2pn.org!aioe.org!feeder1.feed.usenet.farm!feed.usenet.farm!tr3.eu1.usenetexpress.com!feeder.usenetexpress.com!tr2.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.javascript
Date: Thu, 23 Sep 2021 12:12:36 -0700 (PDT)
In-Reply-To: <d2d234d7-4322-46c8-889b-30d08e1f4f7en@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=84.217.164.86; posting-account=kxPkPAoAAACjJi8w0gL9bnyznPzdw9HW
NNTP-Posting-Host: 84.217.164.86
References: <89003e2b-ee41-478b-b44b-4b8235d8564dn@googlegroups.com> <6489e84a-404f-43a9-a7ed-ae97b000f86dn@googlegroups.com> <0445a89c-ccad-4689-8d7c-35d9278adfc3n@googlegroups.com> <f4d10a40-8f9d-4669-9440-97407335f855n@googlegroups.com> <d2d234d7-4322-46c8-889b-30d08e1f4f7en@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <9f5ef984-0a89-4bc3-97d0-7a53a67bf3f7n@googlegroups.com>
Subject: Re: CSS scale transform using javascript?
From: jonas.thornvall@gmail.com (Jonas Thörnvall)
Injection-Date: Thu, 23 Sep 2021 19:12:37 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 73
 by: Jonas Thörnvall - Thu, 23 Sep 2021 19:12 UTC

torsdag 23 september 2021 kl. 17:50:17 UTC+2 skrev Jonas Thörnvall:
> torsdag 23 september 2021 kl. 16:37:22 UTC+2 skrev Jonas Thörnvall:
> > torsdag 23 september 2021 kl. 16:01:34 UTC+2 skrev Jonas Thörnvall:
> > > torsdag 23 september 2021 kl. 16:00:35 UTC+2 skrev Jonas Thörnvall:
> > > > torsdag 23 september 2021 kl. 15:53:24 UTC+2 skrev Jonas Thörnvall:
> > > > > One can't use javascript variables in CSS, but i read one can reach scale from javascript how would i do that?
> > > > >
> > > > > <script>
> > > > > function getResolution() {
> > > > > dispWidth=screen.width;
> > > > > dispHeight=screen.height;
> > > > > }
> > > > > getResolution();
> > > > > resizedWidth=screenWidth/1920;
> > > > > resizedHeight=screenHeight/1080;
> > > > > </script>
> > > > >
> > > > > <???style>
> > > > > html {
> > > > > transform: scale(resizedWidth,resizedHeight);
> > > > >
> > > > > }
> > > > > </style>
> > > > Maybe i should just create strings dynamically and run?
> > > That work for javascript, but probably not for CSS?
> > <script>
> > //function getResolution() {
> > // dispWidth=screen.width;
> > // dispHeight=screen.height;
> > // }
> > // getResolution();
> > // resizedWidth=dispWidth/1920;
> > // resizedHeight=dispHeight/1080;
> >
> > var bodyStyles = document.body.style;
> > bodyStyles.setProperty('--scale', '0.5');
> >
> > </script>
> >
> > Is there a way to set scale of body like this?
> Should not something like this work?
>
> <style>
> html {
> background: white;
> height: 100%;
> width: 100%;
> }
> </style>
> <script>
> function getResolution() {
> dispWidth=screen.width;
> dispHeight=screen.height;
> }
>
> getResolution();
> resizedWidth=300/1920;
> resizedHeight=dispHeight/1080;
> var htmlStyles = document.html.style;
> htmlStyles.setProperty('--scale',resizedWidth);
> </script>
Or something building on this?
<script>
var sheet = document.createElement('style')
sheet.innerHTML = "<style>html { background: white; height: "+resizedWidth+" width: "+resizedHeight+";}</style>";
document.body.appendChild(sheet);
</script>
Unfortunately it does not work?

Re: CSS scale transform using javascript?

<sikj3h$9ks$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17294&group=comp.lang.javascript#17294

  copy link   Newsgroups: comp.lang.javascript
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: tnp@invalid.invalid (The Natural Philosopher)
Newsgroups: comp.lang.javascript
Subject: Re: CSS scale transform using javascript?
Date: Fri, 24 Sep 2021 14:16:33 +0100
Organization: A little, after lunch
Lines: 156
Message-ID: <sikj3h$9ks$1@dont-email.me>
References: <89003e2b-ee41-478b-b44b-4b8235d8564dn@googlegroups.com>
<6489e84a-404f-43a9-a7ed-ae97b000f86dn@googlegroups.com>
<0445a89c-ccad-4689-8d7c-35d9278adfc3n@googlegroups.com>
<f4d10a40-8f9d-4669-9440-97407335f855n@googlegroups.com>
<d2d234d7-4322-46c8-889b-30d08e1f4f7en@googlegroups.com>
<9f5ef984-0a89-4bc3-97d0-7a53a67bf3f7n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 24 Sep 2021 13:16:34 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="839eb4e91607863ad48bffc510666bdf";
logging-data="9884"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/TOnom14f+v614F/zDWv4Je61mX+dIbo0="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101
Thunderbird/60.6.1
Cancel-Lock: sha1:aB049fgiftwThTSISUcOOyDdOMU=
In-Reply-To: <9f5ef984-0a89-4bc3-97d0-7a53a67bf3f7n@googlegroups.com>
Content-Language: en-GB
 by: The Natural Philosop - Fri, 24 Sep 2021 13:16 UTC

On 23/09/2021 20:12, Jonas Thörnvall wrote:
> torsdag 23 september 2021 kl. 17:50:17 UTC+2 skrev Jonas Thörnvall:
>> torsdag 23 september 2021 kl. 16:37:22 UTC+2 skrev Jonas Thörnvall:
>>> torsdag 23 september 2021 kl. 16:01:34 UTC+2 skrev Jonas Thörnvall:
>>>> torsdag 23 september 2021 kl. 16:00:35 UTC+2 skrev Jonas Thörnvall:
>>>>> torsdag 23 september 2021 kl. 15:53:24 UTC+2 skrev Jonas Thörnvall:
>>>>>> One can't use javascript variables in CSS, but i read one can reach scale from javascript how would i do that?
>>>>>>
>>>>>> <script>
>>>>>> function getResolution() {
>>>>>> dispWidth=screen.width;
>>>>>> dispHeight=screen.height;
>>>>>> }
>>>>>> getResolution();
>>>>>> resizedWidth=screenWidth/1920;
>>>>>> resizedHeight=screenHeight/1080;
>>>>>> </script>
>>>>>>
>>>>>> <???style>
>>>>>> html {
>>>>>> transform: scale(resizedWidth,resizedHeight);
>>>>>>
>>>>>> }
>>>>>> </style>
>>>>> Maybe i should just create strings dynamically and run?
>>>> That work for javascript, but probably not for CSS?
>>> <script>
>>> //function getResolution() {
>>> // dispWidth=screen.width;
>>> // dispHeight=screen.height;
>>> // }
>>> // getResolution();
>>> // resizedWidth=dispWidth/1920;
>>> // resizedHeight=dispHeight/1080;
>>>
>>> var bodyStyles = document.body.style;
>>> bodyStyles.setProperty('--scale', '0.5');
>>>
>>> </script>
>>>
>>> Is there a way to set scale of body like this?
>> Should not something like this work?
>>
>> <style>
>> html {
>> background: white;
>> height: 100%;
>> width: 100%;
>> }
>> </style>
>> <script>
>> function getResolution() {
>> dispWidth=screen.width;
>> dispHeight=screen.height;
>> }
>>
>> getResolution();
>> resizedWidth=300/1920;
>> resizedHeight=dispHeight/1080;
>> var htmlStyles = document.html.style;
>> htmlStyles.setProperty('--scale',resizedWidth);
>> </script>
> Or something building on this?
> <script>
> var sheet = document.createElement('style')
> sheet.innerHTML = "<style>html { background: white; height: "+resizedWidth+" width: "+resizedHeight+";}</style>";
> document.body.appendChild(sheet);
> </script>
> Unfortunately it does not work?
>

Apologies for cutting and pasting but this is what I wrote to change
video aspect ratios from 16:19 to 4:3

Perhaps it helps?

<script>
var mux="";
var streamID=0;
var aspectRatio=1.77;
var pip=false;
var paused=false;

const video = document.getElementById("videoplayer");

const element = document.getElementById("videoframe");
// add fullscreen event listener to resize the video window back to what
it should be
// add event listenet to videoframe.
element.addEventListener('fullscreenchange', (event) => {
// document.fullscreenElement will point to the element that
// is in fullscreen mode if there is one. If there isn't one,
// the value of the property is null.
if (!document.fullscreenElement)
{
video.style.height=508; // reset video height
video.style.top=42; // and top
video.style.left=(aspectRatio==1.77? 1:110); // and offset
}
});

function fullScreen()
{
var width;
var height;
var aspect;
var edge;
var top;
if (element.mozRequestFullScreen)
{
element.mozRequestFullScreen();
}
else if (element.webkitRequestFullScreen)
{
element.webkitRequestFullScreen();
}
width=window.screen.width;
height=window.screen.height;
aspect=width/height;
top=0;
// if aspect ratio is less than actual one, then we need to reduce the
height, otherwise set it to full screen height
if (aspect < aspectRatio)
{
height=width/aspectRatio;
top=(window.screen.height-height)/2;
}
// now set the video element height...
video.style.height=height;
video.style.top=top;
//now center the picture...
edge=(width-height*aspectRatio)/2;
if (edge>0)
video.style.left=edge;
}
function changeAspectRatio()
{
aspectRatio=aspectRatio==1.77 ? 1.33:1.77;
document.getElementById('aspect-ratio').innerHTML=(aspectRatio==1.77
?"4:3":"16:9");
video.className=(aspectRatio==1.77 ? "tv":"tvold");
// sigh, we need to set offset too
video.style.left=(aspectRatio==1.77 ?1:110);
}

--
Religion is regarded by the common people as true, by the wise as
foolish, and by the rulers as useful.

(Seneca the Younger, 65 AD)

Re: CSS scale transform using javascript?

<15c3cc53-d0bb-4da7-9fc8-e4bd551a1f50n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17296&group=comp.lang.javascript#17296

  copy link   Newsgroups: comp.lang.javascript
X-Received: by 2002:a0c:816b:: with SMTP id 98mr10396552qvc.37.1632491930851;
Fri, 24 Sep 2021 06:58:50 -0700 (PDT)
X-Received: by 2002:a9d:710c:: with SMTP id n12mr4203692otj.125.1632491930667;
Fri, 24 Sep 2021 06:58:50 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.javascript
Date: Fri, 24 Sep 2021 06:58:50 -0700 (PDT)
In-Reply-To: <sikj3h$9ks$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=84.217.164.86; posting-account=kxPkPAoAAACjJi8w0gL9bnyznPzdw9HW
NNTP-Posting-Host: 84.217.164.86
References: <89003e2b-ee41-478b-b44b-4b8235d8564dn@googlegroups.com>
<6489e84a-404f-43a9-a7ed-ae97b000f86dn@googlegroups.com> <0445a89c-ccad-4689-8d7c-35d9278adfc3n@googlegroups.com>
<f4d10a40-8f9d-4669-9440-97407335f855n@googlegroups.com> <d2d234d7-4322-46c8-889b-30d08e1f4f7en@googlegroups.com>
<9f5ef984-0a89-4bc3-97d0-7a53a67bf3f7n@googlegroups.com> <sikj3h$9ks$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <15c3cc53-d0bb-4da7-9fc8-e4bd551a1f50n@googlegroups.com>
Subject: Re: CSS scale transform using javascript?
From: jonas.thornvall@gmail.com (Jonas Thörnvall)
Injection-Date: Fri, 24 Sep 2021 13:58:50 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 185
 by: Jonas Thörnvall - Fri, 24 Sep 2021 13:58 UTC

fredag 24 september 2021 kl. 15:16:39 UTC+2 skrev The Natural Philosopher:
> On 23/09/2021 20:12, Jonas Thörnvall wrote:
> > torsdag 23 september 2021 kl. 17:50:17 UTC+2 skrev Jonas Thörnvall:
> >> torsdag 23 september 2021 kl. 16:37:22 UTC+2 skrev Jonas Thörnvall:
> >>> torsdag 23 september 2021 kl. 16:01:34 UTC+2 skrev Jonas Thörnvall:
> >>>> torsdag 23 september 2021 kl. 16:00:35 UTC+2 skrev Jonas Thörnvall:
> >>>>> torsdag 23 september 2021 kl. 15:53:24 UTC+2 skrev Jonas Thörnvall:
> >>>>>> One can't use javascript variables in CSS, but i read one can reach scale from javascript how would i do that?
> >>>>>>
> >>>>>> <script>
> >>>>>> function getResolution() {
> >>>>>> dispWidth=screen.width;
> >>>>>> dispHeight=screen.height;
> >>>>>> }
> >>>>>> getResolution();
> >>>>>> resizedWidth=screenWidth/1920;
> >>>>>> resizedHeight=screenHeight/1080;
> >>>>>> </script>
> >>>>>>
> >>>>>> <???style>
> >>>>>> html {
> >>>>>> transform: scale(resizedWidth,resizedHeight);
> >>>>>>
> >>>>>> }
> >>>>>> </style>
> >>>>> Maybe i should just create strings dynamically and run?
> >>>> That work for javascript, but probably not for CSS?
> >>> <script>
> >>> //function getResolution() {
> >>> // dispWidth=screen.width;
> >>> // dispHeight=screen.height;
> >>> // }
> >>> // getResolution();
> >>> // resizedWidth=dispWidth/1920;
> >>> // resizedHeight=dispHeight/1080;
> >>>
> >>> var bodyStyles = document.body.style;
> >>> bodyStyles.setProperty('--scale', '0.5');
> >>>
> >>> </script>
> >>>
> >>> Is there a way to set scale of body like this?
> >> Should not something like this work?
> >>
> >> <style>
> >> html {
> >> background: white;
> >> height: 100%;
> >> width: 100%;
> >> }
> >> </style>
> >> <script>
> >> function getResolution() {
> >> dispWidth=screen.width;
> >> dispHeight=screen.height;
> >> }
> >>
> >> getResolution();
> >> resizedWidth=300/1920;
> >> resizedHeight=dispHeight/1080;
> >> var htmlStyles = document.html.style;
> >> htmlStyles.setProperty('--scale',resizedWidth);
> >> </script>
> > Or something building on this?
> > <script>
> > var sheet = document.createElement('style')
> > sheet.innerHTML = "<style>html { background: white; height: "+resizedWidth+" width: "+resizedHeight+";}</style>";
> > document.body.appendChild(sheet);
> > </script>
> > Unfortunately it does not work?
> >
> Apologies for cutting and pasting but this is what I wrote to change
> video aspect ratios from 16:19 to 4:3
>
>
> Perhaps it helps?
>
> <script>
> var mux="";
> var streamID=0;
> var aspectRatio=1.77;
> var pip=false;
> var paused=false;
>
> const video = document.getElementById("videoplayer");
>
> const element = document.getElementById("videoframe");
> // add fullscreen event listener to resize the video window back to what
> it should be
> // add event listenet to videoframe.
> element.addEventListener('fullscreenchange', (event) => {
> // document.fullscreenElement will point to the element that
> // is in fullscreen mode if there is one. If there isn't one,
> // the value of the property is null.
> if (!document.fullscreenElement)
> {
> video.style.height=508; // reset video height
> video.style.top=42; // and top
> video.style.left=(aspectRatio==1.77? 1:110); // and offset
> }
> });
>
> function fullScreen()
> {
> var width;
> var height;
> var aspect;
> var edge;
> var top;
> if (element.mozRequestFullScreen)
> {
> element.mozRequestFullScreen();
> }
> else if (element.webkitRequestFullScreen)
> {
> element.webkitRequestFullScreen();
> }
>
> width=window.screen.width;
> height=window.screen.height;
> aspect=width/height;
> top=0;
> // if aspect ratio is less than actual one, then we need to reduce the
> height, otherwise set it to full screen height
> if (aspect < aspectRatio)
> {
> height=width/aspectRatio;
> top=(window.screen.height-height)/2;
> }
> // now set the video element height...
> video.style.height=height;
> video.style.top=top;
> //now center the picture...
> edge=(width-height*aspectRatio)/2;
> if (edge>0)
> video.style.left=edge;
> }
>
> function changeAspectRatio()
> {
> aspectRatio=aspectRatio==1.77 ? 1.33:1.77;
> document.getElementById('aspect-ratio').innerHTML=(aspectRatio==1.77
> ?"4:3":"16:9");
> video.className=(aspectRatio==1.77 ? "tv":"tvold");
> // sigh, we need to set offset too
> video.style.left=(aspectRatio==1.77 ?1:110);
> }
>
>
> --
> Religion is regarded by the common people as true, by the wise as
> foolish, and by the rulers as useful.
>
> (Seneca the Younger, 65 AD)

I was hoping for something more compact, i know the native resolution i did go for so basicly i just need the "screen resolution" easily get by.
function getResolution() {
dispWidth=screen.width;
dispHeight=screen.height;
} getResolution();

And then we calculate new scale using.

resizedWidth=screenWidth/1920;
resizedHeight=screenHeight/1080;

So i have the scales wanted for screen, in resizedWidth and resizedHeight but how do i set the "CSS html?" scale using javascript.
This is what i try to accomplish "but dynamic" and its "work great" but how do i "set" the scale for the html "object?" using javascript.
html {
transform: scale(0.5,0.7);
}

Re: CSS scale transform using javascript?

<sikq1q$617$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17302&group=comp.lang.javascript#17302

  copy link   Newsgroups: comp.lang.javascript
Path: i2pn2.org!rocksolid2!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: tnp@invalid.invalid (The Natural Philosopher)
Newsgroups: comp.lang.javascript
Subject: Re: CSS scale transform using javascript?
Date: Fri, 24 Sep 2021 16:15:05 +0100
Organization: A little, after lunch
Lines: 49
Message-ID: <sikq1q$617$1@dont-email.me>
References: <89003e2b-ee41-478b-b44b-4b8235d8564dn@googlegroups.com>
<6489e84a-404f-43a9-a7ed-ae97b000f86dn@googlegroups.com>
<0445a89c-ccad-4689-8d7c-35d9278adfc3n@googlegroups.com>
<f4d10a40-8f9d-4669-9440-97407335f855n@googlegroups.com>
<d2d234d7-4322-46c8-889b-30d08e1f4f7en@googlegroups.com>
<9f5ef984-0a89-4bc3-97d0-7a53a67bf3f7n@googlegroups.com>
<sikj3h$9ks$1@dont-email.me>
<15c3cc53-d0bb-4da7-9fc8-e4bd551a1f50n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 24 Sep 2021 15:15:06 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="839eb4e91607863ad48bffc510666bdf";
logging-data="6183"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18GRyquVGA4qI7hqjs7LmI+YUQXY1D/WdE="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101
Thunderbird/60.6.1
Cancel-Lock: sha1:Eh96TTGnO6sNQ6/Q7DzUA34cYiI=
In-Reply-To: <15c3cc53-d0bb-4da7-9fc8-e4bd551a1f50n@googlegroups.com>
Content-Language: en-GB
 by: The Natural Philosop - Fri, 24 Sep 2021 15:15 UTC

On 24/09/2021 14:58, Jonas Thörnvall wrote:
> So i have the scales wanted for screen, in resizedWidth and resizedHeight but how do i set the "CSS html?" scale using javascript.

I showed you in my example

you find the element in the dom and set its width and height

as in
const element = document.getElementById("videoframe");
element.style.width=newWidth;
element.style.height=newheight;

and so on.
That sets the elements size. If you want to e.g. scale a video to fit
it, you need the element to have the CSS attribute 'object-fill' set to fill

e.g.

CSS
..tv
{
position: absolute;
left:1px;
top: 42px;
height: 508;
aspect-ratio:1.77;
object-fit:fill;
}

Or you could probably do that with JavasScript as

element.style.object-fit="fill";

As usual with CSS, browsers and JavaShite™ no two browsers respond to
mixtures of 'aspect-ratio', 'height' and 'width' the same way, so it's
wise to set them *all* up.

--
Those who want slavery should have the grace to name it by its proper
name. They must face the full meaning of that which they are advocating
or condoning; the full, exact, specific meaning of collectivism, of its
logical implications, of the principles upon which it is based, and of
the ultimate consequences to which these principles will lead. They must
face it, then decide whether this is what they want or not.

Ayn Rand.

Re: CSS scale transform using javascript?

<50e87a22-5815-4993-9e88-7d5c50d1177bn@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17307&group=comp.lang.javascript#17307

  copy link   Newsgroups: comp.lang.javascript
X-Received: by 2002:a05:620a:430c:: with SMTP id u12mr12202523qko.439.1632508446516;
Fri, 24 Sep 2021 11:34:06 -0700 (PDT)
X-Received: by 2002:a9d:3e5e:: with SMTP id h30mr5403083otg.255.1632508446118;
Fri, 24 Sep 2021 11:34:06 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.javascript
Date: Fri, 24 Sep 2021 11:34:05 -0700 (PDT)
In-Reply-To: <sikq1q$617$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=84.217.164.86; posting-account=kxPkPAoAAACjJi8w0gL9bnyznPzdw9HW
NNTP-Posting-Host: 84.217.164.86
References: <89003e2b-ee41-478b-b44b-4b8235d8564dn@googlegroups.com>
<6489e84a-404f-43a9-a7ed-ae97b000f86dn@googlegroups.com> <0445a89c-ccad-4689-8d7c-35d9278adfc3n@googlegroups.com>
<f4d10a40-8f9d-4669-9440-97407335f855n@googlegroups.com> <d2d234d7-4322-46c8-889b-30d08e1f4f7en@googlegroups.com>
<9f5ef984-0a89-4bc3-97d0-7a53a67bf3f7n@googlegroups.com> <sikj3h$9ks$1@dont-email.me>
<15c3cc53-d0bb-4da7-9fc8-e4bd551a1f50n@googlegroups.com> <sikq1q$617$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <50e87a22-5815-4993-9e88-7d5c50d1177bn@googlegroups.com>
Subject: Re: CSS scale transform using javascript?
From: jonas.thornvall@gmail.com (Jonas Thörnvall)
Injection-Date: Fri, 24 Sep 2021 18:34:06 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 75
 by: Jonas Thörnvall - Fri, 24 Sep 2021 18:34 UTC

fredag 24 september 2021 kl. 17:15:10 UTC+2 skrev The Natural Philosopher:
> On 24/09/2021 14:58, Jonas Thörnvall wrote:
> > So i have the scales wanted for screen, in resizedWidth and resizedHeight but how do i set the "CSS html?" scale using javascript.
> I showed you in my example
>
> you find the element in the dom and set its width and height
>
> as in
> const element = document.getElementById("videoframe");
> element.style.width=newWidth;
> element.style.height=newheight;
>
> and so on.
> That sets the elements size. If you want to e.g. scale a video to fit
> it, you need the element to have the CSS attribute 'object-fill' set to fill
>
> e.g.
>
> CSS
> .tv
> {
> position: absolute;
> left:1px;
> top: 42px;
> height: 508;
> aspect-ratio:1.77;
> object-fit:fill;
> }
>
> Or you could probably do that with JavasScript as
>
> element.style.object-fit="fill";
>
> As usual with CSS, browsers and JavaShite™ no two browsers respond to
> mixtures of 'aspect-ratio', 'height' and 'width' the same way, so it's
> wise to set them *all* up.
>
>
>
>
> --
> Those who want slavery should have the grace to name it by its proper
> name. They must face the full meaning of that which they are advocating
> or condoning; the full, exact, specific meaning of collectivism, of its
> logical implications, of the principles upon which it is based, and of
> the ultimate consequences to which these principles will lead. They must
> face it, then decide whether this is what they want or not.
>
> Ayn Rand.

I don't know what is the element .tv you seem to refer to?
And there isn't exactly aspect ratios applied to displays/monitors, so why use it?
It is a simple matter of divide the source implementation size to the correct scales of width and height to the display.

Make a simple example using javascript, so i can see your approach work.
Because i really can't see how your .tv differ from my Arnolds <styles> html{scale....} </styles> that really do work.
But just as your in no viable via javascript, at least i have not found any examples of it.

I just have a feeling that many of you make things more complex then they really are, Arnolds solution was great however it was not dynamical and maybe there is no dynamical solutions.

You see i understand "html" and "body" as known style elements but where did you get .tv from?
Is that part of CSS standard and defined as some sort of default object?

Re: CSS scale transform using javascript?

<33ba3132-9442-4cc3-9e3d-7b1fced6172fn@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17308&group=comp.lang.javascript#17308

  copy link   Newsgroups: comp.lang.javascript
X-Received: by 2002:a05:622a:1111:: with SMTP id e17mr5714294qty.185.1632508685873;
Fri, 24 Sep 2021 11:38:05 -0700 (PDT)
X-Received: by 2002:aca:4b8d:: with SMTP id y135mr2638251oia.177.1632508685613;
Fri, 24 Sep 2021 11:38:05 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.javascript
Date: Fri, 24 Sep 2021 11:38:05 -0700 (PDT)
In-Reply-To: <sikq1q$617$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=84.217.164.86; posting-account=kxPkPAoAAACjJi8w0gL9bnyznPzdw9HW
NNTP-Posting-Host: 84.217.164.86
References: <89003e2b-ee41-478b-b44b-4b8235d8564dn@googlegroups.com>
<6489e84a-404f-43a9-a7ed-ae97b000f86dn@googlegroups.com> <0445a89c-ccad-4689-8d7c-35d9278adfc3n@googlegroups.com>
<f4d10a40-8f9d-4669-9440-97407335f855n@googlegroups.com> <d2d234d7-4322-46c8-889b-30d08e1f4f7en@googlegroups.com>
<9f5ef984-0a89-4bc3-97d0-7a53a67bf3f7n@googlegroups.com> <sikj3h$9ks$1@dont-email.me>
<15c3cc53-d0bb-4da7-9fc8-e4bd551a1f50n@googlegroups.com> <sikq1q$617$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <33ba3132-9442-4cc3-9e3d-7b1fced6172fn@googlegroups.com>
Subject: Re: CSS scale transform using javascript?
From: jonas.thornvall@gmail.com (Jonas Thörnvall)
Injection-Date: Fri, 24 Sep 2021 18:38:05 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 61
 by: Jonas Thörnvall - Fri, 24 Sep 2021 18:38 UTC

fredag 24 september 2021 kl. 17:15:10 UTC+2 skrev The Natural Philosopher:
> On 24/09/2021 14:58, Jonas Thörnvall wrote:
> > So i have the scales wanted for screen, in resizedWidth and resizedHeight but how do i set the "CSS html?" scale using javascript.
> I showed you in my example
>
> you find the element in the dom and set its width and height
>
> as in
> const element = document.getElementById("videoframe");
> element.style.width=newWidth;
> element.style.height=newheight;
>
> and so on.
> That sets the elements size. If you want to e.g. scale a video to fit
> it, you need the element to have the CSS attribute 'object-fill' set to fill
>
> e.g.
>
> CSS
> .tv
> {
> position: absolute;
> left:1px;
> top: 42px;
> height: 508;
> aspect-ratio:1.77;
> object-fit:fill;
> }
>
> Or you could probably do that with JavasScript as
>
> element.style.object-fit="fill";
>
> As usual with CSS, browsers and JavaShite™ no two browsers respond to
> mixtures of 'aspect-ratio', 'height' and 'width' the same way, so it's
> wise to set them *all* up.
>
>
>
>
> --
> Those who want slavery should have the grace to name it by its proper
> name. They must face the full meaning of that which they are advocating
> or condoning; the full, exact, specific meaning of collectivism, of its
> logical implications, of the principles upon which it is based, and of
> the ultimate consequences to which these principles will lead. They must
> face it, then decide whether this is what they want or not.
>
> Ayn Rand.
By the way what the fuck have
const video = document.getElementById("videoplayer");

const element = document.getElementById("videoframe");

To do with it, you people just so convoluted in drivel to swallow any shit you learned.

Re: CSS scale transform using javascript?

<simnqc$22n$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17309&group=comp.lang.javascript#17309

  copy link   Newsgroups: comp.lang.javascript
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: tnp@invalid.invalid (The Natural Philosopher)
Newsgroups: comp.lang.javascript
Subject: Re: CSS scale transform using javascript?
Date: Sat, 25 Sep 2021 09:49:16 +0100
Organization: A little, after lunch
Lines: 117
Message-ID: <simnqc$22n$1@dont-email.me>
References: <89003e2b-ee41-478b-b44b-4b8235d8564dn@googlegroups.com>
<6489e84a-404f-43a9-a7ed-ae97b000f86dn@googlegroups.com>
<0445a89c-ccad-4689-8d7c-35d9278adfc3n@googlegroups.com>
<f4d10a40-8f9d-4669-9440-97407335f855n@googlegroups.com>
<d2d234d7-4322-46c8-889b-30d08e1f4f7en@googlegroups.com>
<9f5ef984-0a89-4bc3-97d0-7a53a67bf3f7n@googlegroups.com>
<sikj3h$9ks$1@dont-email.me>
<15c3cc53-d0bb-4da7-9fc8-e4bd551a1f50n@googlegroups.com>
<sikq1q$617$1@dont-email.me>
<50e87a22-5815-4993-9e88-7d5c50d1177bn@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 25 Sep 2021 08:49:16 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="9d1d5f990809ea0bf49fa583650cbe9a";
logging-data="2135"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+EMMcg8k8hUFnHkvWyDRcbc3gWRILZNkY="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101
Thunderbird/60.6.1
Cancel-Lock: sha1:NqtYRzfHVA8rOnqINdPYnRxX72Y=
In-Reply-To: <50e87a22-5815-4993-9e88-7d5c50d1177bn@googlegroups.com>
Content-Language: en-GB
 by: The Natural Philosop - Sat, 25 Sep 2021 08:49 UTC

On 24/09/2021 19:34, Jonas Thörnvall wrote:
> fredag 24 september 2021 kl. 17:15:10 UTC+2 skrev The Natural Philosopher:
>> On 24/09/2021 14:58, Jonas Thörnvall wrote:
>>> So i have the scales wanted for screen, in resizedWidth and resizedHeight but how do i set the "CSS html?" scale using javascript.
>> I showed you in my example
>>
>> you find the element in the dom and set its width and height
>>
>> as in
>> const element = document.getElementById("videoframe");
>> element.style.width=newWidth;
>> element.style.height=newheight;
>>
>> and so on.
>> That sets the elements size. If you want to e.g. scale a video to fit
>> it, you need the element to have the CSS attribute 'object-fill' set to fill
>>
>> e.g.
>>
>> CSS
>> .tv
>> {
>> position: absolute;
>> left:1px;
>> top: 42px;
>> height: 508;
>> aspect-ratio:1.77;
>> object-fit:fill;
>> }
>>
>> Or you could probably do that with JavasScript as
>>
>> element.style.object-fit="fill";
>>
>> As usual with CSS, browsers and JavaShite™ no two browsers respond to
>> mixtures of 'aspect-ratio', 'height' and 'width' the same way, so it's
>> wise to set them *all* up.
>>
>>
>>
>>
>> --
>> Those who want slavery should have the grace to name it by its proper
>> name. They must face the full meaning of that which they are advocating
>> or condoning; the full, exact, specific meaning of collectivism, of its
>> logical implications, of the principles upon which it is based, and of
>> the ultimate consequences to which these principles will lead. They must
>> face it, then decide whether this is what they want or not.
>>
>> Ayn Rand.
>
> I don't know what is the element .tv you seem to refer to?

you seem to not understand CSS classes.

It is a CSS class definition so you can apply it to a HTML element

> And there isn't exactly aspect ratios applied to displays/monitors, so why use it?

because aspect ratios apply to video content

> It is a simple matter of divide the source implementatio size to the correct scales of width and height to the display.
well if all you want to do is fill the available space use
"style=object-fit: fill;"
>
> Make a simple example using javascript, so i can see your approach work.
I did

> Because i really can't see how your .tv differ from my Arnolds <styles> html{scale....} </styles> that really do work.
> But just as your in no viable via javascript, at least i have not found any examples of it.
>
> I just have a feeling that many of you make things more complex then they really are, Arnolds solution was great however it was not dynamical and maybe there is no dynamical solutions.

I have you that yiu set height and width dymamically using the object
properties style.height and style.,width

>
> You see i understand "html" and "body" as known style elements but where did you get .tv from?
> Is that part of CSS standard and defined as some sort of default object?

I defined it

Do you know any HTML or CSS or javascript at all?

..tv in a style sheet allows me to declare an object like

<div class="tv" id="mytv"> </div>

then
<script>
tv1=getElementById("mytv");

tv1.style.height=newHeight;
tv1.style.width=newWidth;
</script>

will set the height and width of the element.
If it contains a video, object-fit:fill means the video will be
stretched to fit the element.

>

--
“it should be clear by now to everyone that activist environmentalism
(or environmental activism) is becoming a general ideology about humans,
about their freedom, about the relationship between the individual and
the state, and about the manipulation of people under the guise of a
'noble' idea. It is not an honest pursuit of 'sustainable development,'
a matter of elementary environmental protection, or a search for
rational mechanisms designed to achieve a healthy environment. Yet
things do occur that make you shake your head and remind yourself that
you live neither in Joseph Stalin’s Communist era, nor in the Orwellian
utopia of 1984.”

Vaclav Klaus

Re: CSS scale transform using javascript?

<simnt8$22n$2@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17310&group=comp.lang.javascript#17310

  copy link   Newsgroups: comp.lang.javascript
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: tnp@invalid.invalid (The Natural Philosopher)
Newsgroups: comp.lang.javascript
Subject: Re: CSS scale transform using javascript?
Date: Sat, 25 Sep 2021 09:50:48 +0100
Organization: A little, after lunch
Lines: 19
Message-ID: <simnt8$22n$2@dont-email.me>
References: <89003e2b-ee41-478b-b44b-4b8235d8564dn@googlegroups.com>
<6489e84a-404f-43a9-a7ed-ae97b000f86dn@googlegroups.com>
<0445a89c-ccad-4689-8d7c-35d9278adfc3n@googlegroups.com>
<f4d10a40-8f9d-4669-9440-97407335f855n@googlegroups.com>
<d2d234d7-4322-46c8-889b-30d08e1f4f7en@googlegroups.com>
<9f5ef984-0a89-4bc3-97d0-7a53a67bf3f7n@googlegroups.com>
<sikj3h$9ks$1@dont-email.me>
<15c3cc53-d0bb-4da7-9fc8-e4bd551a1f50n@googlegroups.com>
<sikq1q$617$1@dont-email.me>
<33ba3132-9442-4cc3-9e3d-7b1fced6172fn@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 25 Sep 2021 08:50:48 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="9d1d5f990809ea0bf49fa583650cbe9a";
logging-data="2135"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/PLc1Sr0yZfeuScucfihec7AnPkAn+AN8="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101
Thunderbird/60.6.1
Cancel-Lock: sha1:45QAiKHTG/vHjoM1J8F47LN0T7k=
In-Reply-To: <33ba3132-9442-4cc3-9e3d-7b1fced6172fn@googlegroups.com>
Content-Language: en-GB
 by: The Natural Philosop - Sat, 25 Sep 2021 08:50 UTC

On 24/09/2021 19:38, Jonas Thörnvall wrote:
> By the way what the fuck have
> const video = document.getElementById("videoplayer");
>
> const element = document.getElementById("videoframe");
>
> To do with it, you people just so convoluted in drivel to swallow any shit you learned.

No, they are references to bits of code that I didn't post up. I assumed
you would understand that.

In fact I assumed you understood basic CSS HTML and javascript.
It seems I was wrong, I apologise.,

--
How fortunate for governments that the people they administer don't think.

Adolf Hitler

Re: CSS scale transform using javascript?

<eac8a639-aecd-4b21-9ce1-e0d59994709an@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17311&group=comp.lang.javascript#17311

  copy link   Newsgroups: comp.lang.javascript
X-Received: by 2002:ac8:7d46:: with SMTP id h6mr9485648qtb.162.1632569261582;
Sat, 25 Sep 2021 04:27:41 -0700 (PDT)
X-Received: by 2002:a4a:b6c2:: with SMTP id w2mr12723554ooo.59.1632569261324;
Sat, 25 Sep 2021 04:27:41 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.javascript
Date: Sat, 25 Sep 2021 04:27:41 -0700 (PDT)
In-Reply-To: <simnt8$22n$2@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=84.217.164.86; posting-account=kxPkPAoAAACjJi8w0gL9bnyznPzdw9HW
NNTP-Posting-Host: 84.217.164.86
References: <89003e2b-ee41-478b-b44b-4b8235d8564dn@googlegroups.com>
<6489e84a-404f-43a9-a7ed-ae97b000f86dn@googlegroups.com> <0445a89c-ccad-4689-8d7c-35d9278adfc3n@googlegroups.com>
<f4d10a40-8f9d-4669-9440-97407335f855n@googlegroups.com> <d2d234d7-4322-46c8-889b-30d08e1f4f7en@googlegroups.com>
<9f5ef984-0a89-4bc3-97d0-7a53a67bf3f7n@googlegroups.com> <sikj3h$9ks$1@dont-email.me>
<15c3cc53-d0bb-4da7-9fc8-e4bd551a1f50n@googlegroups.com> <sikq1q$617$1@dont-email.me>
<33ba3132-9442-4cc3-9e3d-7b1fced6172fn@googlegroups.com> <simnt8$22n$2@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <eac8a639-aecd-4b21-9ce1-e0d59994709an@googlegroups.com>
Subject: Re: CSS scale transform using javascript?
From: jonas.thornvall@gmail.com (Jonas Thörnvall)
Injection-Date: Sat, 25 Sep 2021 11:27:41 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 40
 by: Jonas Thörnvall - Sat, 25 Sep 2021 11:27 UTC

lördag 25 september 2021 kl. 10:50:52 UTC+2 skrev The Natural Philosopher:
> On 24/09/2021 19:38, Jonas Thörnvall wrote:
> > By the way what the fuck have
> > const video = document.getElementById("videoplayer");
> >
> > const element = document.getElementById("videoframe");
> >
> > To do with it, you people just so convoluted in drivel to swallow any shit you learned.
> No, they are references to bits of code that I didn't post up. I assumed
> you would understand that.
>
> In fact I assumed you understood basic CSS HTML and javascript.
> It seems I was wrong, I apologise.,
>
> --
> How fortunate for governments that the people they administer don't think..
>
> Adolf Hitler
What you posted is from "what i can get" just assign a value to a variable you call tv1, that will not change anything to the myTv element?
Unless something like this would actually work.

html.style.height=newHeight;
html.style.width=newWidth;

And i "guess" it will not but i will try it.
I have no idea what your tv element is about, i need to scale "every element" within html page.
I understand that your myTV may refer to a div.

That you may try to put around it all "inside? outside?" body.
But i don't think it will work anyhow but i will test that too.
I tested yesterday and it did nothing but i will try again.

Re: CSS scale transform using javascript?

<b9d0fdb0-7b53-45ef-ba69-6963690f9654n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17312&group=comp.lang.javascript#17312

  copy link   Newsgroups: comp.lang.javascript
X-Received: by 2002:ac8:57d0:: with SMTP id w16mr9281097qta.96.1632570593436;
Sat, 25 Sep 2021 04:49:53 -0700 (PDT)
X-Received: by 2002:aca:4542:: with SMTP id s63mr542317oia.0.1632570593119;
Sat, 25 Sep 2021 04:49:53 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.javascript
Date: Sat, 25 Sep 2021 04:49:52 -0700 (PDT)
In-Reply-To: <simnt8$22n$2@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=84.217.164.86; posting-account=kxPkPAoAAACjJi8w0gL9bnyznPzdw9HW
NNTP-Posting-Host: 84.217.164.86
References: <89003e2b-ee41-478b-b44b-4b8235d8564dn@googlegroups.com>
<6489e84a-404f-43a9-a7ed-ae97b000f86dn@googlegroups.com> <0445a89c-ccad-4689-8d7c-35d9278adfc3n@googlegroups.com>
<f4d10a40-8f9d-4669-9440-97407335f855n@googlegroups.com> <d2d234d7-4322-46c8-889b-30d08e1f4f7en@googlegroups.com>
<9f5ef984-0a89-4bc3-97d0-7a53a67bf3f7n@googlegroups.com> <sikj3h$9ks$1@dont-email.me>
<15c3cc53-d0bb-4da7-9fc8-e4bd551a1f50n@googlegroups.com> <sikq1q$617$1@dont-email.me>
<33ba3132-9442-4cc3-9e3d-7b1fced6172fn@googlegroups.com> <simnt8$22n$2@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <b9d0fdb0-7b53-45ef-ba69-6963690f9654n@googlegroups.com>
Subject: Re: CSS scale transform using javascript?
From: jonas.thornvall@gmail.com (Jonas Thörnvall)
Injection-Date: Sat, 25 Sep 2021 11:49:53 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 34
 by: Jonas Thörnvall - Sat, 25 Sep 2021 11:49 UTC

lördag 25 september 2021 kl. 10:50:52 UTC+2 skrev The Natural Philosopher:
> On 24/09/2021 19:38, Jonas Thörnvall wrote:
> > By the way what the fuck have
> > const video = document.getElementById("videoplayer");
> >
> > const element = document.getElementById("videoframe");
> >
> > To do with it, you people just so convoluted in drivel to swallow any shit you learned.
> No, they are references to bits of code that I didn't post up. I assumed
> you would understand that.
>
> In fact I assumed you understood basic CSS HTML and javascript.
> It seems I was wrong, I apologise.,
>
> --
> How fortunate for governments that the people they administer don't think..
>
> Adolf Hitler
Ok i tested now your idea, just do not work it will not change the content witin a div to the hight and width.
(between there is alot of divs canvas e t c witin the body)

So far the only thing that will scale it uniformly is.

html {
transform: scale(0.5,0.7);
}

So maybe one should have a script that invoke different CSS files deipendent on resolution.
It seem idiotic to me, but....

Re: CSS scale transform using javascript?

<47d34ca5-7913-4bd1-8b51-8078205b8df5n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17313&group=comp.lang.javascript#17313

  copy link   Newsgroups: comp.lang.javascript
X-Received: by 2002:a37:9181:: with SMTP id t123mr15146210qkd.45.1632570993260;
Sat, 25 Sep 2021 04:56:33 -0700 (PDT)
X-Received: by 2002:a9d:7002:: with SMTP id k2mr8953625otj.206.1632570993046;
Sat, 25 Sep 2021 04:56:33 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.javascript
Date: Sat, 25 Sep 2021 04:56:32 -0700 (PDT)
In-Reply-To: <b9d0fdb0-7b53-45ef-ba69-6963690f9654n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=84.217.164.86; posting-account=kxPkPAoAAACjJi8w0gL9bnyznPzdw9HW
NNTP-Posting-Host: 84.217.164.86
References: <89003e2b-ee41-478b-b44b-4b8235d8564dn@googlegroups.com>
<6489e84a-404f-43a9-a7ed-ae97b000f86dn@googlegroups.com> <0445a89c-ccad-4689-8d7c-35d9278adfc3n@googlegroups.com>
<f4d10a40-8f9d-4669-9440-97407335f855n@googlegroups.com> <d2d234d7-4322-46c8-889b-30d08e1f4f7en@googlegroups.com>
<9f5ef984-0a89-4bc3-97d0-7a53a67bf3f7n@googlegroups.com> <sikj3h$9ks$1@dont-email.me>
<15c3cc53-d0bb-4da7-9fc8-e4bd551a1f50n@googlegroups.com> <sikq1q$617$1@dont-email.me>
<33ba3132-9442-4cc3-9e3d-7b1fced6172fn@googlegroups.com> <simnt8$22n$2@dont-email.me>
<b9d0fdb0-7b53-45ef-ba69-6963690f9654n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <47d34ca5-7913-4bd1-8b51-8078205b8df5n@googlegroups.com>
Subject: Re: CSS scale transform using javascript?
From: jonas.thornvall@gmail.com (Jonas Thörnvall)
Injection-Date: Sat, 25 Sep 2021 11:56:33 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 42
 by: Jonas Thörnvall - Sat, 25 Sep 2021 11:56 UTC

lördag 25 september 2021 kl. 13:49:57 UTC+2 skrev Jonas Thörnvall:
> lördag 25 september 2021 kl. 10:50:52 UTC+2 skrev The Natural Philosopher:
> > On 24/09/2021 19:38, Jonas Thörnvall wrote:
> > > By the way what the fuck have
> > > const video = document.getElementById("videoplayer");
> > >
> > > const element = document.getElementById("videoframe");
> > >
> > > To do with it, you people just so convoluted in drivel to swallow any shit you learned.
> > No, they are references to bits of code that I didn't post up. I assumed
> > you would understand that.
> >
> > In fact I assumed you understood basic CSS HTML and javascript.
> > It seems I was wrong, I apologise.,
> >
> > --
> > How fortunate for governments that the people they administer don't think.
> >
> > Adolf Hitler
> Ok i tested now your idea, just do not work it will not change the content witin a div to the hight and width.
> (between there is alot of divs canvas e t c witin the body)
>
> So far the only thing that will scale it uniformly is.
>
> html {
> transform: scale(0.5,0.7);
> }
>
> So maybe one should have a script that invoke different CSS files deipendent on resolution.
> It seem idiotic to me, but....
Maybe just maybe i can make a innerHTML using a dynamic created string with the <style> html{transform: scale(x,y); }</style> and load it last in body..
I think that is the only way, so a bit of string building, i have done it before so it will probably be allright although it is a style element.
document.getElementById("PAD0").innerHTML=bigString[0];

Re: CSS scale transform using javascript?

<fa2634f9-4992-416c-aead-01b88efc08a7n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17314&group=comp.lang.javascript#17314

  copy link   Newsgroups: comp.lang.javascript
X-Received: by 2002:ad4:4651:: with SMTP id y17mr464911qvv.62.1632571994970;
Sat, 25 Sep 2021 05:13:14 -0700 (PDT)
X-Received: by 2002:a9d:6156:: with SMTP id c22mr8390880otk.383.1632571994558;
Sat, 25 Sep 2021 05:13:14 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.javascript
Date: Sat, 25 Sep 2021 05:13:14 -0700 (PDT)
In-Reply-To: <simnt8$22n$2@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=84.217.164.86; posting-account=kxPkPAoAAACjJi8w0gL9bnyznPzdw9HW
NNTP-Posting-Host: 84.217.164.86
References: <89003e2b-ee41-478b-b44b-4b8235d8564dn@googlegroups.com>
<6489e84a-404f-43a9-a7ed-ae97b000f86dn@googlegroups.com> <0445a89c-ccad-4689-8d7c-35d9278adfc3n@googlegroups.com>
<f4d10a40-8f9d-4669-9440-97407335f855n@googlegroups.com> <d2d234d7-4322-46c8-889b-30d08e1f4f7en@googlegroups.com>
<9f5ef984-0a89-4bc3-97d0-7a53a67bf3f7n@googlegroups.com> <sikj3h$9ks$1@dont-email.me>
<15c3cc53-d0bb-4da7-9fc8-e4bd551a1f50n@googlegroups.com> <sikq1q$617$1@dont-email.me>
<33ba3132-9442-4cc3-9e3d-7b1fced6172fn@googlegroups.com> <simnt8$22n$2@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <fa2634f9-4992-416c-aead-01b88efc08a7n@googlegroups.com>
Subject: Re: CSS scale transform using javascript?
From: jonas.thornvall@gmail.com (Jonas Thörnvall)
Injection-Date: Sat, 25 Sep 2021 12:13:14 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 36
 by: Jonas Thörnvall - Sat, 25 Sep 2021 12:13 UTC

lördag 25 september 2021 kl. 10:50:52 UTC+2 skrev The Natural Philosopher:
> On 24/09/2021 19:38, Jonas Thörnvall wrote:
> > By the way what the fuck have
> > const video = document.getElementById("videoplayer");
> >
> > const element = document.getElementById("videoframe");
> >
> > To do with it, you people just so convoluted in drivel to swallow any shit you learned.
> No, they are references to bits of code that I didn't post up. I assumed
> you would understand that.
>
> In fact I assumed you understood basic CSS HTML and javascript.
> It seems I was wrong, I apologise.,
>
> --
> How fortunate for governments that the people they administer don't think..
>
> Adolf Hitler
This is how you solve things "clear, concise and compact" watch and learn ;)
Convoluted shit gone.
<script>
function getResolution() {
dispWidth=screen.width;
dispHeight=screen.height;
}
getResolution();
xScale=dispWidth/1920;
yScale=dispHeight/1080;
resString="<style>html {transform: scale("+xScale+","+yScale");}</style>";
document.getElementById("resolution").innerHTML=resString;
</script>

Re: CSS scale transform using javascript?

<9256767a-be62-42f2-baf1-7766b5982073n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17315&group=comp.lang.javascript#17315

  copy link   Newsgroups: comp.lang.javascript
X-Received: by 2002:a37:9181:: with SMTP id t123mr15227987qkd.45.1632572310225;
Sat, 25 Sep 2021 05:18:30 -0700 (PDT)
X-Received: by 2002:a9d:7e8c:: with SMTP id m12mr8169452otp.227.1632572309988;
Sat, 25 Sep 2021 05:18:29 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.javascript
Date: Sat, 25 Sep 2021 05:18:29 -0700 (PDT)
In-Reply-To: <fa2634f9-4992-416c-aead-01b88efc08a7n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=84.217.164.86; posting-account=kxPkPAoAAACjJi8w0gL9bnyznPzdw9HW
NNTP-Posting-Host: 84.217.164.86
References: <89003e2b-ee41-478b-b44b-4b8235d8564dn@googlegroups.com>
<6489e84a-404f-43a9-a7ed-ae97b000f86dn@googlegroups.com> <0445a89c-ccad-4689-8d7c-35d9278adfc3n@googlegroups.com>
<f4d10a40-8f9d-4669-9440-97407335f855n@googlegroups.com> <d2d234d7-4322-46c8-889b-30d08e1f4f7en@googlegroups.com>
<9f5ef984-0a89-4bc3-97d0-7a53a67bf3f7n@googlegroups.com> <sikj3h$9ks$1@dont-email.me>
<15c3cc53-d0bb-4da7-9fc8-e4bd551a1f50n@googlegroups.com> <sikq1q$617$1@dont-email.me>
<33ba3132-9442-4cc3-9e3d-7b1fced6172fn@googlegroups.com> <simnt8$22n$2@dont-email.me>
<fa2634f9-4992-416c-aead-01b88efc08a7n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <9256767a-be62-42f2-baf1-7766b5982073n@googlegroups.com>
Subject: Re: CSS scale transform using javascript?
From: jonas.thornvall@gmail.com (Jonas Thörnvall)
Injection-Date: Sat, 25 Sep 2021 12:18:30 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 39
 by: Jonas Thörnvall - Sat, 25 Sep 2021 12:18 UTC

lördag 25 september 2021 kl. 14:13:19 UTC+2 skrev Jonas Thörnvall:
> lördag 25 september 2021 kl. 10:50:52 UTC+2 skrev The Natural Philosopher:
> > On 24/09/2021 19:38, Jonas Thörnvall wrote:
> > > By the way what the fuck have
> > > const video = document.getElementById("videoplayer");
> > >
> > > const element = document.getElementById("videoframe");
> > >
> > > To do with it, you people just so convoluted in drivel to swallow any shit you learned.
> > No, they are references to bits of code that I didn't post up. I assumed
> > you would understand that.
> >
> > In fact I assumed you understood basic CSS HTML and javascript.
> > It seems I was wrong, I apologise.,
> >
> > --
> > How fortunate for governments that the people they administer don't think.
> >
> > Adolf Hitler
> This is how you solve things "clear, concise and compact" watch and learn ;)
> Convoluted shit gone.
> <script>
> function getResolution() {
> dispWidth=screen.width;
> dispHeight=screen.height;
> }
> getResolution();
> xScale=dispWidth/1920;
> yScale=dispHeight/1080;
> resString="<style>html {transform: scale("+xScale+","+yScale");}</style>";
> document.getElementById("resolution").innerHTML=resString;
> </script>
Honestly i think i am border genius LoL

Re: CSS scale transform using javascript?

<e550e6c7-692d-4817-a933-0c2fa34f5753n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17316&group=comp.lang.javascript#17316

  copy link   Newsgroups: comp.lang.javascript
X-Received: by 2002:ac8:410e:: with SMTP id q14mr8976621qtl.377.1632572361739;
Sat, 25 Sep 2021 05:19:21 -0700 (PDT)
X-Received: by 2002:a9d:710c:: with SMTP id n12mr8575950otj.125.1632572361514;
Sat, 25 Sep 2021 05:19:21 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.javascript
Date: Sat, 25 Sep 2021 05:19:21 -0700 (PDT)
In-Reply-To: <fa2634f9-4992-416c-aead-01b88efc08a7n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=84.217.164.86; posting-account=kxPkPAoAAACjJi8w0gL9bnyznPzdw9HW
NNTP-Posting-Host: 84.217.164.86
References: <89003e2b-ee41-478b-b44b-4b8235d8564dn@googlegroups.com>
<6489e84a-404f-43a9-a7ed-ae97b000f86dn@googlegroups.com> <0445a89c-ccad-4689-8d7c-35d9278adfc3n@googlegroups.com>
<f4d10a40-8f9d-4669-9440-97407335f855n@googlegroups.com> <d2d234d7-4322-46c8-889b-30d08e1f4f7en@googlegroups.com>
<9f5ef984-0a89-4bc3-97d0-7a53a67bf3f7n@googlegroups.com> <sikj3h$9ks$1@dont-email.me>
<15c3cc53-d0bb-4da7-9fc8-e4bd551a1f50n@googlegroups.com> <sikq1q$617$1@dont-email.me>
<33ba3132-9442-4cc3-9e3d-7b1fced6172fn@googlegroups.com> <simnt8$22n$2@dont-email.me>
<fa2634f9-4992-416c-aead-01b88efc08a7n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <e550e6c7-692d-4817-a933-0c2fa34f5753n@googlegroups.com>
Subject: Re: CSS scale transform using javascript?
From: jonas.thornvall@gmail.com (Jonas Thörnvall)
Injection-Date: Sat, 25 Sep 2021 12:19:21 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 39
 by: Jonas Thörnvall - Sat, 25 Sep 2021 12:19 UTC

lördag 25 september 2021 kl. 14:13:19 UTC+2 skrev Jonas Thörnvall:
> lördag 25 september 2021 kl. 10:50:52 UTC+2 skrev The Natural Philosopher:
> > On 24/09/2021 19:38, Jonas Thörnvall wrote:
> > > By the way what the fuck have
> > > const video = document.getElementById("videoplayer");
> > >
> > > const element = document.getElementById("videoframe");
> > >
> > > To do with it, you people just so convoluted in drivel to swallow any shit you learned.
> > No, they are references to bits of code that I didn't post up. I assumed
> > you would understand that.
> >
> > In fact I assumed you understood basic CSS HTML and javascript.
> > It seems I was wrong, I apologise.,
> >
> > --
> > How fortunate for governments that the people they administer don't think.
> >
> > Adolf Hitler
> This is how you solve things "clear, concise and compact" watch and learn ;)
> Convoluted shit gone.
> <script>
> function getResolution() {
> dispWidth=screen.width;
> dispHeight=screen.height;
> }
> getResolution();
> xScale=dispWidth/1920;
> yScale=dispHeight/1080;
> resString="<style>html {transform: scale("+xScale+","+yScale");}</style>";
> document.getElementById("resolution").innerHTML=resString;
> </script>
And it works ;)

Re: CSS scale transform using javascript?

<b01b4016-9d82-4225-afe6-61edf889c665n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17317&group=comp.lang.javascript#17317

  copy link   Newsgroups: comp.lang.javascript
X-Received: by 2002:ad4:4a01:: with SMTP id m1mr14955146qvz.29.1632572487741;
Sat, 25 Sep 2021 05:21:27 -0700 (PDT)
X-Received: by 2002:a05:6808:150c:: with SMTP id u12mr5247260oiw.136.1632572487464;
Sat, 25 Sep 2021 05:21:27 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.javascript
Date: Sat, 25 Sep 2021 05:21:27 -0700 (PDT)
In-Reply-To: <e550e6c7-692d-4817-a933-0c2fa34f5753n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=84.217.164.86; posting-account=kxPkPAoAAACjJi8w0gL9bnyznPzdw9HW
NNTP-Posting-Host: 84.217.164.86
References: <89003e2b-ee41-478b-b44b-4b8235d8564dn@googlegroups.com>
<6489e84a-404f-43a9-a7ed-ae97b000f86dn@googlegroups.com> <0445a89c-ccad-4689-8d7c-35d9278adfc3n@googlegroups.com>
<f4d10a40-8f9d-4669-9440-97407335f855n@googlegroups.com> <d2d234d7-4322-46c8-889b-30d08e1f4f7en@googlegroups.com>
<9f5ef984-0a89-4bc3-97d0-7a53a67bf3f7n@googlegroups.com> <sikj3h$9ks$1@dont-email.me>
<15c3cc53-d0bb-4da7-9fc8-e4bd551a1f50n@googlegroups.com> <sikq1q$617$1@dont-email.me>
<33ba3132-9442-4cc3-9e3d-7b1fced6172fn@googlegroups.com> <simnt8$22n$2@dont-email.me>
<fa2634f9-4992-416c-aead-01b88efc08a7n@googlegroups.com> <e550e6c7-692d-4817-a933-0c2fa34f5753n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <b01b4016-9d82-4225-afe6-61edf889c665n@googlegroups.com>
Subject: Re: CSS scale transform using javascript?
From: jonas.thornvall@gmail.com (Jonas Thörnvall)
Injection-Date: Sat, 25 Sep 2021 12:21:27 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 42
 by: Jonas Thörnvall - Sat, 25 Sep 2021 12:21 UTC

lördag 25 september 2021 kl. 14:19:26 UTC+2 skrev Jonas Thörnvall:
> lördag 25 september 2021 kl. 14:13:19 UTC+2 skrev Jonas Thörnvall:
> > lördag 25 september 2021 kl. 10:50:52 UTC+2 skrev The Natural Philosopher:
> > > On 24/09/2021 19:38, Jonas Thörnvall wrote:
> > > > By the way what the fuck have
> > > > const video = document.getElementById("videoplayer");
> > > >
> > > > const element = document.getElementById("videoframe");
> > > >
> > > > To do with it, you people just so convoluted in drivel to swallow any shit you learned.
> > > No, they are references to bits of code that I didn't post up. I assumed
> > > you would understand that.
> > >
> > > In fact I assumed you understood basic CSS HTML and javascript.
> > > It seems I was wrong, I apologise.,
> > >
> > > --
> > > How fortunate for governments that the people they administer don't think.
> > >
> > > Adolf Hitler
> > This is how you solve things "clear, concise and compact" watch and learn ;)
> > Convoluted shit gone.
> > <script>
> > function getResolution() {
> > dispWidth=screen.width;
> > dispHeight=screen.height;
> > }
> > getResolution();
> > xScale=dispWidth/1920;
> > yScale=dispHeight/1080;
> > resString="<style>html {transform: scale("+xScale+","+yScale");}</style>";
> > document.getElementById("resolution").innerHTML=resString;
> > </script>
> And it works ;)
https://www.youtube.com/watch?v=1qNeGSJaQ9Q

Re: CSS scale transform using javascript?

<18ce9376-1b12-4756-8860-c40d32cfe78dn@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17318&group=comp.lang.javascript#17318

  copy link   Newsgroups: comp.lang.javascript
X-Received: by 2002:ac8:5492:: with SMTP id h18mr9706727qtq.152.1632572561393;
Sat, 25 Sep 2021 05:22:41 -0700 (PDT)
X-Received: by 2002:a9d:4705:: with SMTP id a5mr8542073otf.237.1632572560989;
Sat, 25 Sep 2021 05:22:40 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.javascript
Date: Sat, 25 Sep 2021 05:22:40 -0700 (PDT)
In-Reply-To: <e550e6c7-692d-4817-a933-0c2fa34f5753n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=84.217.164.86; posting-account=kxPkPAoAAACjJi8w0gL9bnyznPzdw9HW
NNTP-Posting-Host: 84.217.164.86
References: <89003e2b-ee41-478b-b44b-4b8235d8564dn@googlegroups.com>
<6489e84a-404f-43a9-a7ed-ae97b000f86dn@googlegroups.com> <0445a89c-ccad-4689-8d7c-35d9278adfc3n@googlegroups.com>
<f4d10a40-8f9d-4669-9440-97407335f855n@googlegroups.com> <d2d234d7-4322-46c8-889b-30d08e1f4f7en@googlegroups.com>
<9f5ef984-0a89-4bc3-97d0-7a53a67bf3f7n@googlegroups.com> <sikj3h$9ks$1@dont-email.me>
<15c3cc53-d0bb-4da7-9fc8-e4bd551a1f50n@googlegroups.com> <sikq1q$617$1@dont-email.me>
<33ba3132-9442-4cc3-9e3d-7b1fced6172fn@googlegroups.com> <simnt8$22n$2@dont-email.me>
<fa2634f9-4992-416c-aead-01b88efc08a7n@googlegroups.com> <e550e6c7-692d-4817-a933-0c2fa34f5753n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <18ce9376-1b12-4756-8860-c40d32cfe78dn@googlegroups.com>
Subject: Re: CSS scale transform using javascript?
From: jonas.thornvall@gmail.com (Jonas Thörnvall)
Injection-Date: Sat, 25 Sep 2021 12:22:41 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 42
 by: Jonas Thörnvall - Sat, 25 Sep 2021 12:22 UTC

lördag 25 september 2021 kl. 14:19:26 UTC+2 skrev Jonas Thörnvall:
> lördag 25 september 2021 kl. 14:13:19 UTC+2 skrev Jonas Thörnvall:
> > lördag 25 september 2021 kl. 10:50:52 UTC+2 skrev The Natural Philosopher:
> > > On 24/09/2021 19:38, Jonas Thörnvall wrote:
> > > > By the way what the fuck have
> > > > const video = document.getElementById("videoplayer");
> > > >
> > > > const element = document.getElementById("videoframe");
> > > >
> > > > To do with it, you people just so convoluted in drivel to swallow any shit you learned.
> > > No, they are references to bits of code that I didn't post up. I assumed
> > > you would understand that.
> > >
> > > In fact I assumed you understood basic CSS HTML and javascript.
> > > It seems I was wrong, I apologise.,
> > >
> > > --
> > > How fortunate for governments that the people they administer don't think.
> > >
> > > Adolf Hitler
> > This is how you solve things "clear, concise and compact" watch and learn ;)
> > Convoluted shit gone.
> > <script>
> > function getResolution() {
> > dispWidth=screen.width;
> > dispHeight=screen.height;
> > }
> > getResolution();
> > xScale=dispWidth/1920;
> > yScale=dispHeight/1080;
> > resString="<style>html {transform: scale("+xScale+","+yScale");}</style>";
> > document.getElementById("resolution").innerHTML=resString;
> > </script>
> And it works ;)
Thanks again Igor!, oh Arnold.

Re: CSS scale transform using javascript?

<sin8qe$mj2$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17319&group=comp.lang.javascript#17319

  copy link   Newsgroups: comp.lang.javascript
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: tnp@invalid.invalid (The Natural Philosopher)
Newsgroups: comp.lang.javascript
Subject: Re: CSS scale transform using javascript?
Date: Sat, 25 Sep 2021 14:39:25 +0100
Organization: A little, after lunch
Lines: 24
Message-ID: <sin8qe$mj2$1@dont-email.me>
References: <89003e2b-ee41-478b-b44b-4b8235d8564dn@googlegroups.com>
<6489e84a-404f-43a9-a7ed-ae97b000f86dn@googlegroups.com>
<0445a89c-ccad-4689-8d7c-35d9278adfc3n@googlegroups.com>
<f4d10a40-8f9d-4669-9440-97407335f855n@googlegroups.com>
<d2d234d7-4322-46c8-889b-30d08e1f4f7en@googlegroups.com>
<9f5ef984-0a89-4bc3-97d0-7a53a67bf3f7n@googlegroups.com>
<sikj3h$9ks$1@dont-email.me>
<15c3cc53-d0bb-4da7-9fc8-e4bd551a1f50n@googlegroups.com>
<sikq1q$617$1@dont-email.me>
<33ba3132-9442-4cc3-9e3d-7b1fced6172fn@googlegroups.com>
<simnt8$22n$2@dont-email.me>
<b9d0fdb0-7b53-45ef-ba69-6963690f9654n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 25 Sep 2021 13:39:26 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="9d1d5f990809ea0bf49fa583650cbe9a";
logging-data="23138"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX182pLboBWl8VOJsCr83q1mq2yGZe2odg7o="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101
Thunderbird/60.6.1
Cancel-Lock: sha1:m2wDs+tkY21bUxylIVn05rF6T5k=
In-Reply-To: <b9d0fdb0-7b53-45ef-ba69-6963690f9654n@googlegroups.com>
Content-Language: en-GB
 by: The Natural Philosop - Sat, 25 Sep 2021 13:39 UTC

On 25/09/2021 12:49, Jonas Thörnvall wrote:

>
> So far the only thing that will scale it uniformly is.
>
> html {
> transform: scale(0.5,0.7);
> }
>
> So maybe one should have a script that invoke different CSS files deipendent on resolution.
> It seem idiotic to me, but....
>
var x = document.getElementsByTagName("HTML")[0];

x.style.transform="scale(0.5,0.7)";

--
“It is hard to imagine a more stupid decision or more dangerous way of
making decisions than by putting those decisions in the hands of people
who pay no price for being wrong.”

Thomas Sowell

Re: CSS scale transform using javascript?

<8a8e44c8-c534-457d-a9bf-0360db51321en@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17320&group=comp.lang.javascript#17320

  copy link   Newsgroups: comp.lang.javascript
X-Received: by 2002:a05:622a:15d4:: with SMTP id d20mr9996146qty.34.1632577607823;
Sat, 25 Sep 2021 06:46:47 -0700 (PDT)
X-Received: by 2002:a05:6830:410b:: with SMTP id w11mr8736029ott.210.1632577607550;
Sat, 25 Sep 2021 06:46:47 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.javascript
Date: Sat, 25 Sep 2021 06:46:47 -0700 (PDT)
In-Reply-To: <sin8qe$mj2$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=84.217.164.86; posting-account=kxPkPAoAAACjJi8w0gL9bnyznPzdw9HW
NNTP-Posting-Host: 84.217.164.86
References: <89003e2b-ee41-478b-b44b-4b8235d8564dn@googlegroups.com>
<6489e84a-404f-43a9-a7ed-ae97b000f86dn@googlegroups.com> <0445a89c-ccad-4689-8d7c-35d9278adfc3n@googlegroups.com>
<f4d10a40-8f9d-4669-9440-97407335f855n@googlegroups.com> <d2d234d7-4322-46c8-889b-30d08e1f4f7en@googlegroups.com>
<9f5ef984-0a89-4bc3-97d0-7a53a67bf3f7n@googlegroups.com> <sikj3h$9ks$1@dont-email.me>
<15c3cc53-d0bb-4da7-9fc8-e4bd551a1f50n@googlegroups.com> <sikq1q$617$1@dont-email.me>
<33ba3132-9442-4cc3-9e3d-7b1fced6172fn@googlegroups.com> <simnt8$22n$2@dont-email.me>
<b9d0fdb0-7b53-45ef-ba69-6963690f9654n@googlegroups.com> <sin8qe$mj2$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <8a8e44c8-c534-457d-a9bf-0360db51321en@googlegroups.com>
Subject: Re: CSS scale transform using javascript?
From: jonas.thornvall@gmail.com (Jonas Thörnvall)
Injection-Date: Sat, 25 Sep 2021 13:46:47 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 29
 by: Jonas Thörnvall - Sat, 25 Sep 2021 13:46 UTC

lördag 25 september 2021 kl. 15:39:31 UTC+2 skrev The Natural Philosopher:
> On 25/09/2021 12:49, Jonas Thörnvall wrote:
>
> >
> > So far the only thing that will scale it uniformly is.
> >
> > html {
> > transform: scale(0.5,0.7);
> > }
> >
> > So maybe one should have a script that invoke different CSS files deipendent on resolution.
> > It seem idiotic to me, but....
> >
> var x = document.getElementsByTagName("HTML")[0];
>
> x.style.transform="scale(0.5,0.7)";
>
>
>
> --
> “It is hard to imagine a more stupid decision or more dangerous way of
> making decisions than by putting those decisions in the hands of people
> who pay no price for being wrong.”
>
> Thomas Sowell
Yeah but it doesn't work....

Re: CSS scale transform using javascript?

<sinagm$31t$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17321&group=comp.lang.javascript#17321

  copy link   Newsgroups: comp.lang.javascript
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: tnp@invalid.invalid (The Natural Philosopher)
Newsgroups: comp.lang.javascript
Subject: Re: CSS scale transform using javascript?
Date: Sat, 25 Sep 2021 15:08:21 +0100
Organization: A little, after lunch
Lines: 51
Message-ID: <sinagm$31t$1@dont-email.me>
References: <89003e2b-ee41-478b-b44b-4b8235d8564dn@googlegroups.com>
<6489e84a-404f-43a9-a7ed-ae97b000f86dn@googlegroups.com>
<0445a89c-ccad-4689-8d7c-35d9278adfc3n@googlegroups.com>
<f4d10a40-8f9d-4669-9440-97407335f855n@googlegroups.com>
<d2d234d7-4322-46c8-889b-30d08e1f4f7en@googlegroups.com>
<9f5ef984-0a89-4bc3-97d0-7a53a67bf3f7n@googlegroups.com>
<sikj3h$9ks$1@dont-email.me>
<15c3cc53-d0bb-4da7-9fc8-e4bd551a1f50n@googlegroups.com>
<sikq1q$617$1@dont-email.me>
<33ba3132-9442-4cc3-9e3d-7b1fced6172fn@googlegroups.com>
<simnt8$22n$2@dont-email.me>
<b9d0fdb0-7b53-45ef-ba69-6963690f9654n@googlegroups.com>
<sin8qe$mj2$1@dont-email.me>
<8a8e44c8-c534-457d-a9bf-0360db51321en@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 25 Sep 2021 14:08:22 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="9d1d5f990809ea0bf49fa583650cbe9a";
logging-data="3133"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19HP3mpm86xxOZkleAXnhGSHuCjU9vDe4o="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101
Thunderbird/60.6.1
Cancel-Lock: sha1:dMF/8Qw6WQfTr6wigDrVTZTA2ok=
In-Reply-To: <8a8e44c8-c534-457d-a9bf-0360db51321en@googlegroups.com>
Content-Language: en-GB
 by: The Natural Philosop - Sat, 25 Sep 2021 14:08 UTC

On 25/09/2021 14:46, Jonas Thörnvall wrote:
> lördag 25 september 2021 kl. 15:39:31 UTC+2 skrev The Natural Philosopher:
>> On 25/09/2021 12:49, Jonas Thörnvall wrote:
>>
>>>
>>> So far the only thing that will scale it uniformly is.
>>>
>>> html {
>>> transform: scale(0.5,0.7);
>>> }
>>>
>>> So maybe one should have a script that invoke different CSS files deipendent on resolution.
>>> It seem idiotic to me, but....
>>>
>> var x = document.getElementsByTagName("HTML")[0];
>>
>> x.style.transform="scale(0.5,0.7)";
>
> Yeah but it doesn't work....
>

It does, I tested it

<!DOCTYPE html>
<html>
<body>

<h3>A demonstration of how to access an HTML element</h3>

<p>Click the button to scale the document.</p>

<button onclick="myFunction()">Try it</button>

<p id="demo"></p>

<script>
function myFunction() {
var x = document.getElementsByTagName("BODY")[0];
x.style.transform = "scale(0.5,1.3)";
} </script>

</body>
</html>

--
There’s a mighty big difference between good, sound reasons and reasons
that sound good.

Burton Hillis (William Vaughn, American columnist)

Re: CSS scale transform using javascript?

<9ccbf168-aa4b-4600-b3b1-d7c242d45f09n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17322&group=comp.lang.javascript#17322

  copy link   Newsgroups: comp.lang.javascript
X-Received: by 2002:a37:a095:: with SMTP id j143mr16875390qke.277.1632594750216;
Sat, 25 Sep 2021 11:32:30 -0700 (PDT)
X-Received: by 2002:aca:abca:: with SMTP id u193mr620160oie.1.1632594749945;
Sat, 25 Sep 2021 11:32:29 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.javascript
Date: Sat, 25 Sep 2021 11:32:29 -0700 (PDT)
In-Reply-To: <sinagm$31t$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=84.217.164.86; posting-account=kxPkPAoAAACjJi8w0gL9bnyznPzdw9HW
NNTP-Posting-Host: 84.217.164.86
References: <89003e2b-ee41-478b-b44b-4b8235d8564dn@googlegroups.com>
<6489e84a-404f-43a9-a7ed-ae97b000f86dn@googlegroups.com> <0445a89c-ccad-4689-8d7c-35d9278adfc3n@googlegroups.com>
<f4d10a40-8f9d-4669-9440-97407335f855n@googlegroups.com> <d2d234d7-4322-46c8-889b-30d08e1f4f7en@googlegroups.com>
<9f5ef984-0a89-4bc3-97d0-7a53a67bf3f7n@googlegroups.com> <sikj3h$9ks$1@dont-email.me>
<15c3cc53-d0bb-4da7-9fc8-e4bd551a1f50n@googlegroups.com> <sikq1q$617$1@dont-email.me>
<33ba3132-9442-4cc3-9e3d-7b1fced6172fn@googlegroups.com> <simnt8$22n$2@dont-email.me>
<b9d0fdb0-7b53-45ef-ba69-6963690f9654n@googlegroups.com> <sin8qe$mj2$1@dont-email.me>
<8a8e44c8-c534-457d-a9bf-0360db51321en@googlegroups.com> <sinagm$31t$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <9ccbf168-aa4b-4600-b3b1-d7c242d45f09n@googlegroups.com>
Subject: Re: CSS scale transform using javascript?
From: jonas.thornvall@gmail.com (Jonas Thörnvall)
Injection-Date: Sat, 25 Sep 2021 18:32:30 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 62
 by: Jonas Thörnvall - Sat, 25 Sep 2021 18:32 UTC

lördag 25 september 2021 kl. 16:08:27 UTC+2 skrev The Natural Philosopher:
> On 25/09/2021 14:46, Jonas Thörnvall wrote:
> > lördag 25 september 2021 kl. 15:39:31 UTC+2 skrev The Natural Philosopher:
> >> On 25/09/2021 12:49, Jonas Thörnvall wrote:
> >>
> >>>
> >>> So far the only thing that will scale it uniformly is.
> >>>
> >>> html {
> >>> transform: scale(0.5,0.7);
> >>> }
> >>>
> >>> So maybe one should have a script that invoke different CSS files deipendent on resolution.
> >>> It seem idiotic to me, but....
> >>>
> >> var x = document.getElementsByTagName("HTML")[0];
> >>
> >> x.style.transform="scale(0.5,0.7)";
> >
> > Yeah but it doesn't work....
> >
> It does, I tested it
>
> <!DOCTYPE html>
> <html>
> <body>
>
> <h3>A demonstration of how to access an HTML element</h3>
>
> <p>Click the button to scale the document.</p>
>
> <button onclick="myFunction()">Try it</button>
>
> <p id="demo"></p>
>
> <script>
> function myFunction() {
> var x = document.getElementsByTagName("BODY")[0];
> x.style.transform = "scale(0.5,1.3)";
> }
> </script>
>
> </body>
> </html>
>
>
> --
> There’s a mighty big difference between good, sound reasons and reasons
> that sound good.
>
> Burton Hillis (William Vaughn, American columnist)

Yeah i tested by TagName[0] and it actually work, good!
But i try to keep it none blackbox solutions, so i think i keep my solution..

But then again i actually see a benefit with your solution, it do not need to transform the place it is viewed, so i will use it.
Thanks Philosopher.


devel / comp.lang.javascript / CSS scale transform using javascript?

Pages:12
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor