🌟 Refactor your CSS the modern way 🤯🤯🤯
Here we have 2 snippets that do the same thing; except for the padding behavior. We only use the padding here as a gutter. Other than that, the main difference is that one of them saves you some lines of CSS. Snippet number 2 will use the min function and subtract 30 (double the amount of padding (15)) from 100% to give us spacing on the sides while also limiting the width to 840px. Then centering the container by applying margin left and right of auto.
Post by: juliocodes
If you found this content useful, please tap the ♥️ icon and give me a follow. I would greatly appreciate it. Also, if you have any feedback, questions or concerns, let me know in the comments section 💬. Thanks ☺️
#css #csstricks #cssanimation
[ css, modern css, css shorthands, css functions, css tutorials, css tricks, css tips ]