I
I
Islam Ibakaev2017-02-16 13:58:12
css
Islam Ibakaev, 2017-02-16 13:58:12

Do you use fluid typography in website layout?

I drew up an example where three paragraphs change font-size at 480px and 600px.
.title1 is the easiest way when you refer directly to the element in a media query
.title2 is a more advanced way when you make the element dependent on html or body (defining element styles in em and rem) and just change the font in the media query -size html(body) and everything adjusts.
.title3 - smoothly changes font-size, have a look here
I know that the second way is quite popular, but what about the third one?
do you use it in layout?
are there any downsides to using the third way?
if you use it, then in order to set a smooth change only font-size or are there other "use cases"?
ps in the console monitors font-size changes of elements

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Goncharov, 2017-02-16
@devellopah

@media screen and (min-width: 25em){
    html { font-size: calc( 16px + (24 - 16) * (100vw - 400px) / (800 - 400) ); }
  }

You should not complicate life so much, I think)) This is from the proposed article. Exaggerated of course. There are good ideas in the article.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question