Comments on: Alvaro Montoro: CSS One-Liners to Improve (Almost) Every Project https://css-tricks.com/alvaro-montoro-css-one-liners-to-improve-almost-every-project/ Tips, Tricks, and Techniques on using Cascading Style Sheets. Wed, 24 Jul 2024 07:50:16 +0000 hourly 1 https://wordpress.org/?v=6.6.1 By: salvo https://css-tricks.com/alvaro-montoro-css-one-liners-to-improve-almost-every-project/#comment-1849902 Wed, 24 Jul 2024 07:50:16 +0000 https://css-tricks.com/?p=379278#comment-1849902 Should I change my ‘responsive images’ oneliner once for all? From:
img { width:100%; height:auto; }

To:
img { max-width:100%; }

]]>
By: Geoff Graham https://css-tricks.com/alvaro-montoro-css-one-liners-to-improve-almost-every-project/#comment-1849888 Mon, 22 Jul 2024 16:49:26 +0000 https://css-tricks.com/?p=379278#comment-1849888 In reply to Ashley Heath.

Maybe from here?

Inheriting box-sizing Probably Slightly Better Best-Practice

]]>
By: Ashley Heath https://css-tricks.com/alvaro-montoro-css-one-liners-to-improve-almost-every-project/#comment-1849887 Mon, 22 Jul 2024 15:37:47 +0000 https://css-tricks.com/?p=379278#comment-1849887 re: Global border-box sizing I prefer to go with

html {
  box-sizing: border-box;
}

*,
:after,
:before {
  box-sizing: inherit;
}

That way you can override border-box if/where necessary or by a third party. It wasn’t my idea, I forget where I first saw it but I think it’s a marginally better solution.

]]>