Dynamic/flexible font sizing: is it possible to make the font size relative to the zoom setting of chrome? how to make the font size relative to the zoom?

Dynamic/flexible font sizing: is it possible to make the font size relative to the zoom setting of chrome? how to make the font size relative to the zoom?
0

#1

font-size: 20pt;

this seems to be something that changes the size of the font

say the zoom for chrome is 100%

say the font size is 20

say the zoom is 80%

then the font size would be 80% of 20

and so on

the font size is relative to the zoom

the font size is proportional to the zoom

zoom-based fonts

font size dependent on zoom

zoom-dependent font sizing

dynamic fonts

flexible fonts


#2

That’s literally what zoom does, you’re describing zoom.

Edit: however you’re specifying font size in print units (1pt == 1/72 of an inch), so although modern browsers should zoom regardless, they might not in that case. The solution in that case is don’t use units designed for printed documents.


#3

oh yea that is what zoom does

i gave the wrong example, what i mean is:

the font size is based on the zoom

…do what did i mean actually

so what i want is the font being a percentage size, not a ‘fixed number’

so the font size is a % of the zoom size

so if zoom is 100%

and font % is 10%

then it’s 10% o f the zoom % always


#4

You can use this or this:

`
#test{

zoom: 20%;
font-size: 20vw;
}
`


#6

also want

relative fonts

that means the text is 60% of the title size

the text size is relative to something else

relative fonts


#7

zoom is a non standard CSS property that…zooms, it just applies zoom. It was for old Internet Explorer, is non-standard, and shouldn’t be used (and doesn’t really make any sense here)

vw is a percentage of the viewport width, so 1vw is 1% of the width of the viewport. Not sure how it interacts with zoom: as it’s based on the size of the viewport, I don’t see how zoom will affect it at all.

1rem would be the base text size (by default, 16px). So

h1 {
  font-size: 1.6rem;
}

Go up from the base size, not down from the largest size, it’s much easier.


#9

CSS is fine, they’re just different ways of measuring size. There have to be multiple ways because there are different ways of sizing things.

rem is specific to CSS, as are the viewport units mentioned above (vw, and vh which is the height of the viewport). All the rest are just standard units

em is the width of the “m” character. In CSS it is simplified to the font size of the current element.

Because that changes depending on how different parts of the text are sized, rem was introduced which is the base size, and is generally simpler to use. Rather than being the font size of the current element, it is the font size of the root element. So if you don’t set any size, 1rem will be 16px. If you set a font-size of 100px on the html element, then 1rem will be 100px.

% is percent and doesn’t work well for fonts.

px is the size in pixels, but that can change depending on device resolution.

cm, mm, in are self-explanatory.

pt is a point,1/72 of an inch, pc is a pics, 12 points, they are standard typographic units for print media. Not used in CSS very much at all.

And it supports ch (width of a “0” character) and ex (height of an “x” character) but they are not really used. Again, these are typographic units.

Title is 100.
Other text is 60.
60 is the base size.
100 ÷ 60 = 1.66666…
60 × (100 ÷ 60) = 100
1 × (100 ÷ 60) = 1.666666…

Well it’s just easier, it’s nothing to do with code. Start from a common size, then size relative to that, rather than starting with an uncommon size and trying to figure out the maths from there.


#10

so this thing is doing what is asked? ‘1.666666…’ ?

h1 {
font-size: 1.6rem;
}

what’s this ‘rem’ thing doing exactly?


that’s the lsit, that’s not very long at all

and most of them arent used

i guess it didnt matter


nothing to do with code. Start from a common size, then size relative to that, rather than starting with an uncommon size and trying to figure out the maths from there.

its everything to do with code, or laugnage or w/e is talked about, cos its the tool being used

if someone that it’s ‘math’ then its still the same its stil the code, the code is restricted by math

so maht is part of the code

so we get to the point that’s its still about the code the tool used

its always like that for eveyr single thing in this universe

until i see an exception


but we still end on the only point that matters:

but none of this has anything to do with zoom and that was the main question