[ Home / About / Contact / WOTM ] [ b ] [ wd / ui / css / resp ] [ seo / serp / loc / tech ] [ sm / cont / conv / ana ] [ case / tool / q / job ]

/resp/ - Responsive Design

Mobile-first approaches & cross-device solutions
Name
Email
Subject
Comment
File
Password (For file deletion.)

File: 1794090965524.jpg (233.73 KB, 1000x1080, img_1794090957472_nka92hpf.jpg)ImgOps Exif Google Yandex

a1a03 No.2346

I've stopped using pixels for my breakpoints because it makes scaling the whole UI way easier when someone changes the root font size. It keeps everything in sync without having to recalculate every single margin and padding value.
>everything breaks when you change the base size

@media (min-width: 40rem) {.container {padding: 2rem;}}

a1a03 No.2350

>>2346
i've been doing this too but do you use a specific scss variable for your base rem unit or just hardcode it everywhere? tbh it gets messy if you don't track the scale.

a1a03 No.2353

File: 1794214112131.jpg (380.24 KB, 1024x682, img_1794214097010_n3qrwbh8.jpg)ImgOps Exif Google Yandex

>>2350 I use a single
$base-rem
variable for everything, but you still have to watch out for overflow issues on small screens when the user scales up way too high.

a1a03 No.2354

>>2353
just use a
clamp()
function for your font sizes so they don't grow into giants when the user cranks that setting up to max.



[Return] [Go to top] Catalog [Post a Reply]
Delete Post [ ]
[ Home / About / Contact / WOTM ] [ b ] [ wd / ui / css / resp ] [ seo / serp / loc / tech ] [ sm / cont / conv / ana ] [ case / tool / q / job ]