Victor's Avatar

Victor

@vpon.me

Helping devs, founders and designers fix their UI. 100 UI/UX tips (free) ๐Ÿ‘‰ https://vpon.me/hundred

3,283
Followers
555
Following
2,036
Posts
29.10.2024
Joined
Posts Following

Latest posts by Victor @vpon.me

Agreed!

06.03.2026 12:34 ๐Ÿ‘ 1 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0
Browser compatibility chart displaying the CSS property "scroll-margin-top" with usage statistics across various browsers.

Browser compatibility chart displaying the CSS property "scroll-margin-top" with usage statistics across various browsers.

Extra tip: if your header height changes (like on mobile), use CSS variables:

scroll-margin-top: var(--header-height);

Browser support: ~96%

One line of CSS. Your anchor links finally work the way users expect.

06.03.2026 09:28 ๐Ÿ‘ 0 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0
Code snippet showing an `h2` CSS selector with a property `scroll-margin-top` set to `80px`. Dark background enhances readability.

Code snippet showing an `h2` CSS selector with a property `scroll-margin-top` set to `80px`. Dark background enhances readability.

How to use it:

If your header is 80px tall, add this to your headings:

scroll-margin-top: 80px;

Now when someone clicks an anchor link, the browser scrolls to the heading but it leaves 80px above.

The heading appears below the header.

06.03.2026 09:28 ๐Ÿ‘ 0 ๐Ÿ” 0 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 0

What it does:

Adds extra space above the heading.

Your anchor links still work, but the heading appears below the sticky header. So that the header doesn't hide part of it.

06.03.2026 09:28 ๐Ÿ‘ 0 ๐Ÿ” 0 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 0
Two website designs show a fixed header. One lacks scroll-margin-top, causing overlap; the other adjusts spacing with it, preventing overlap.

Two website designs show a fixed header. One lacks scroll-margin-top, causing overlap; the other adjusts spacing with it, preventing overlap.

Ever had such an issue when your sticky header covers anchor headings?

An easy fix is: scroll-margin-top

06.03.2026 09:28 ๐Ÿ‘ 3 ๐Ÿ” 1 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 0

Where to use it:

โ€ข Modals and dialogs
โ€ข Sidebars and navigation menus
โ€ข Fixed containers with overflow: scroll
โ€ข Mobile carousels

Browser support: 95%

One line of CSS.

Your modals still suck, but a little bit less ๐Ÿ˜„

05.03.2026 10:02 ๐Ÿ‘ 2 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0

How it works:

When a user reaches the end of a scrollable element (modals are ideal candidates), scrolling just stops. It doesn't continue (chain) to the parent.

Doesn't trigger pull-to-refresh on mobile.

05.03.2026 10:02 ๐Ÿ‘ 2 ๐Ÿ” 0 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 0

What it does:

You scroll a modal, hit the bottom of it and then keep scrolling.

Then boom, the page behind it starts scrolling as well. The modal stays open but you've lost your place on the page behind it.

That's scroll chaining. This property stops it.

05.03.2026 10:02 ๐Ÿ‘ 1 ๐Ÿ” 0 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 0
Two overlapping web page sections illustrate scrolling behaviors: default where both page and content scroll, and a contained version.

Two overlapping web page sections illustrate scrolling behaviors: default where both page and content scroll, and a contained version.

Modals suck.

Want them to suck less?

Use overscroll-behavior: contain;

05.03.2026 10:02 ๐Ÿ‘ 9 ๐Ÿ” 0 ๐Ÿ’ฌ 2 ๐Ÿ“Œ 0
Preview
Learn Modern CSS for Better User Experience A practical book with modern CSS techniques, real examples, and UX-focused solutions.

I'll compile all these tricks into a book, feel free to join the waitlist

๐Ÿ‘‰ css.vpon.me

04.03.2026 16:34 ๐Ÿ‘ 0 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0

Browser support:

text-wrap: pretty = 77%
text-wrap: balance = 87%

But nothing breaks if the browser doesn't support it.

One line of CSS and your typography instantly looks more professional.

04.03.2026 12:43 ๐Ÿ‘ 2 ๐Ÿ” 0 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 0

When to use what:

For headings: use balance. It makes titles look even, balanced, good.

For body text in articles: use pretty. No more single hanging words (orphans) that look ugly.

04.03.2026 12:43 ๐Ÿ‘ 0 ๐Ÿ” 0 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 0

text-wrap: wrap - default behavior

text-wrap: nowrap - keeps everything on one line (๐Ÿ’€)

text-wrap: balance - makes text balanced (~ so that each line has approximately the same width)

text-wrap: pretty - prevents orphans (single words on the last line). It leaves at least two words at the end (๐Ÿคฉ)

04.03.2026 12:43 ๐Ÿ‘ 1 ๐Ÿ” 0 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 0
Three text styles demonstrate design principles: "wrap," "balance," and "pretty," highlighting proper text formatting and clarity.

Three text styles demonstrate design principles: "wrap," "balance," and "pretty," highlighting proper text formatting and clarity.

Your headings look awkward because one word sits alone on the last line.

There's a CSS property that can fix that easily.

text-wrap!

It controls how text breaks across lines.

Here's what what each value does:

04.03.2026 12:43 ๐Ÿ‘ 24 ๐Ÿ” 4 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 0

Indeed

03.03.2026 18:31 ๐Ÿ‘ 0 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0
Preview
Learn Modern CSS for Better User Experience A practical book with modern CSS techniques, real examples, and UX-focused solutions.

I'll compile all these tricks into a book, feel free to join the waitlist

๐Ÿ‘‰ css.vpon.me

03.03.2026 18:30 ๐Ÿ‘ 0 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0

What improves:

โ€ข INP (Interaction to Next Paint)
โ€ข Initial load speed
โ€ข Mobile battery life
โ€ข Scroll performance

Your users won't see the optimization. They'll just notice your site feels faster.

03.03.2026 16:13 ๐Ÿ‘ 0 ๐Ÿ” 0 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 0

Where to use it:

Best for sections below the fold: reviews, footers, anything with complex layouts that aren't immediately visible.

Never on the hero section. That needs to render instantly for good LCP.

03.03.2026 16:13 ๐Ÿ‘ 0 ๐Ÿ” 0 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 0

The auto prefix solves this.

It's like "memory mode" for the browser. E.g. use 600px as a rough estimate on first render. Once the browser actually renders the section, it remembers the real height. Future scrolls are smooth.

03.03.2026 16:13 ๐Ÿ‘ 0 ๐Ÿ” 0 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 0
Code snippet showing CSS styling for a class `.heavy-section` with properties for content visibility and intrinsic size settings.

Code snippet showing CSS styling for a class `.heavy-section` with properties for content visibility and intrinsic size settings.

But! You need another property: contain-intrinsic-size

If you don't reserve space for hidden sections, they collapse to 0 height.

Your scrollbar thinks the page is shorter than it is. When you scroll down and the section renders, the page expands suddenly and everything jumps.

03.03.2026 16:13 ๐Ÿ‘ 0 ๐Ÿ” 0 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 0

The rescue is - content-visibility: auto

It's like a toggle that tells the browser: "Skip rendering this section until it's actually needed."

The browser saves CPU resources. Your page becomes interactive faster. Scrolling is smoother.

03.03.2026 16:13 ๐Ÿ‘ 0 ๐Ÿ” 0 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 0

Look, the browser doesn't care that your testimonials are off-screen.

It still calculates their layout, styles, and geometry. Your hero section is ready, but the main thread is busy with content the user can't see until they scroll down.

Result: slow INP, laggy interactions.

03.03.2026 16:13 ๐Ÿ‘ 0 ๐Ÿ” 0 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 0
A comparison diagram shows a browser rendering excessive content versus optimizing with CSS properties to improve performance.

A comparison diagram shows a browser rendering excessive content versus optimizing with CSS properties to improve performance.

You know what kills your site performance?

Rendering 3000px of content when the user can only see 900px. And there is an easy fix for that.

It's a magical CSS property

content-visibility: auto.

03.03.2026 16:13 ๐Ÿ‘ 8 ๐Ÿ” 0 ๐Ÿ’ฌ 2 ๐Ÿ“Œ 1
A user interface displays an owner tag and member tag with options for tagging in a group, emphasizing user roles and settings.

A user interface displays an owner tag and member tag with options for tagging in a group, emphasizing user roles and settings.

Try to guess what's going on in this UI?

03.03.2026 06:04 ๐Ÿ‘ 4 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0
A cash withdrawal receipt displays an error stating "OPERATION FAILED" along with various transaction details.

A cash withdrawal receipt displays an error stating "OPERATION FAILED" along with various transaction details.

Grateful UX.

Thank you too! :)

02.03.2026 17:55 ๐Ÿ‘ 0 ๐Ÿ” 0 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 0
Code snippet demonstrating the use of the aspect-ratio property in CSS for responsive images and video wrappers.

Code snippet demonstrating the use of the aspect-ratio property in CSS for responsive images and video wrappers.

CSS/UX Tip โšก

Your UI feels clunky and your Lighthouse score tanks because of CLS.

One CSS property fixes most of it is aspect-ratio.

Before aspect-ratio, we had a hacky workaround with padding-top: 56.25% (like if you remember this!)

Now it's just aspect-ratio: 16 / 9;

02.03.2026 10:02 ๐Ÿ‘ 7 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0

Writing a book in Figma: yes or no?

28.02.2026 11:40 ๐Ÿ‘ 2 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0
CSS code snippet adjusting background color and implementing backdrop-filter for responsive design and accessibility considerations.

CSS code snippet adjusting background color and implementing backdrop-filter for responsive design and accessibility considerations.

This CSS combo does something most developers skip.

It handles a11y, performance, and browser support at once.

Take backdrop-filter as an example. Users might not want liquid glass effects.

Also, backdrop-filter consumes GPU resources because it requires real-time processing of every frame.

23.02.2026 10:03 ๐Ÿ‘ 8 ๐Ÿ” 2 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 0

Even when I open these three icons I still don't know what I see :D

27.02.2026 13:38 ๐Ÿ‘ 0 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0
Four indistinct icons are displayed on a blurred background, suggesting navigation features related to social media usage.

Four indistinct icons are displayed on a blurred background, suggesting navigation features related to social media usage.

Instagram has the most confusing icons of any app I use.

I still don't know what all of these do.

27.02.2026 13:24 ๐Ÿ‘ 2 ๐Ÿ” 0 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 0