Исток

HTML and CSS cheatsheet

February 23, 2025 -
CSS
HTML

On this page you will see a HTML/CSS cheatsheet of new browser APIs and maybe something interesting.

HTML and CSS cheatsheet Color text based on background color with CSS

More info at devongovett.


Use attr(id type(<custom-ident>), none) for view transition names

Or use attr like color: attr(data-custom-color type(<color>), red); to read <p data-custom-color='blue'></p>

More info at bram.us.


field-sizing to resize textarea, select, and input

If using field-sizing define min-block-size min-inline-size max-inline-size to constrain the element from becoming too much small or too much large.


interpolate-size calc-size() to animate width and height

Prevously this required JavaScript. Now it just works with CSS:

More info at developer.chrome.com.


...post will be updated over time