From 5a4195ab361566b389e52857754b879c9cf2d1b9 Mon Sep 17 00:00:00 2001 From: Matt Smith Date: Mon, 8 Jan 2024 13:25:55 -0500 Subject: [PATCH] Small update --- README.md | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index bf5022bb..1d5c528a 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -

+

light bulb icon -

+
# CSS Protips [![Awesome](https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg)](https://github.com/sindresorhus/awesome) @@ -51,7 +51,7 @@ A collection of tips to help take your CSS skills pro. ### Use a CSS Reset -CSS resets help enforce style consistency across different browsers with a clean slate for styling elements. You can use a CSS reset library like [Normalize](http://necolas.github.io/normalize.css/), _et al._, or you can use a more simplified reset approach: +CSS resets help enforce style consistency across different browsers with a clean slate for styling elements. There are plenty of reset patterns to find, or you can use a more simplified reset approach: ```css *, @@ -230,12 +230,12 @@ No, it's not black magic, you really can center elements vertically. You can do html, body { height: 100%; - margin: 0; } body { align-items: center; display: flex; + justify-content: center; } ``` @@ -245,8 +245,7 @@ body { body { display: grid; height: 100vh; - margin: 0; - place-items: center center; + place-items: center; } ``` @@ -270,7 +269,6 @@ img { } ``` - Learn more about the `aspect-ratio` property in this [web.dev post](https://web.dev/articles/aspect-ratio). #### [Demo](https://codepen.io/AllThingsSmitty/pen/MWxwoNx/)