this post was submitted on 26 Dec 2024
200 points (94.6% liked)

Programmer Humor

32745 readers
242 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] Ephera@lemmy.ml 1 points 17 hours ago

Well, the situation you describe, is probably best handled by CSS media queries.

In case you're not familiar, you can write:

@media (width < 800px) {
  h1 {
    font-size: 110%;
  }
}

...to get smaller headings on mobile, for example.

But yeah, reality may be more ugly. Especially, if you're using a bulky JS framework, it may be easier to do the JS dance.