Frontend Tidbits
Sep 11, 2025
capitalising / styling first letter
CSS has a pseudo-class for the first letter of a block of text: ::first-letter
<p class="first-letter:capitalize">
{firstName}
</p>
scale effect on button press
An easy way to make your interface feel more responsive is to add a subtle scale down effect when a button is pressed.
— Emil Kowalski (@emilkowalski_) August 4, 2025
A scale of 0.97/0.98 scale on the :active pseudo-class with a ~150ms transition should do the job. pic.twitter.com/kQgxnBOjfz
preventing the ‘bounce’ when overscrolling
You can use the overscroll-behavior
property to prevent the ‘bounce’ when overscrolling.