An Interest In:
Web News this Week
- April 29, 2024
- April 28, 2024
- April 27, 2024
- April 26, 2024
- April 25, 2024
- April 24, 2024
- April 23, 2024
July 27, 2020 02:36 pm GMT
Original Link: https://css-tricks.com/bold-on-hover-without-the-layout-shift/
Bold on Hover Without the Layout Shift
When you change the font-weight
of a font, the text will typically cause a bit of a layout shift. That’s because bold text is often larger and takes up more space. Sometimes that doesn’t matter, like a vertical stack of links where the wider/bolder text doesn’t push anything anyway. Sometimes it does matter, like a horizontal row where the wider/bolder text pushes other elements away a smidge.
Bolding text on mouse hover causes a layout shift
… Read article “Bold on Hover… Without the Layout Shift”
The post Bold on Hover… Without the Layout Shift appeared first on CSS-Tricks.
You can support CSS-Tricks by being an MVP Supporter.
Original Link: https://css-tricks.com/bold-on-hover-without-the-layout-shift/
Share this article:
Tweet
View Full Article