html {
font-family: sans-serif;
font-size: 16px;
}
/* Your CSS below here */
button {
width: 10rem;
height: 3rem;
text-align: center;
font-size: 1.125rem; /* I used this website to convert the units: https://www.ninjaunits.com/converters/pixels/pixels-rem/ */
background-color: hsl(238, 60%, 61%);
background-image: linear-gradient(to bottom right, hsla(0, 0%, 0%, 0), hsla(0, 0%, 0%, 0.2) 30%, hsl(0, 0%, 0%));
color: hsl(238, 60%, 61%);
text-shadow: 2px 0px 5px hsl(0, 0%, 0%),
2px 0px 5px hsl(0, 0%, 0%);
box-shadow: 3px 3px 1px hsl(0, 0%, 0%),
inset 1px 1px 1px hsla(0, 0%, 100%, 0.5),
inset 1px 1px 1px hsla(0, 0%, 0%, 0.5);
border-radius: 10px;
border: 1px solid hsl(238, 48%, 29%);
}
button:active {
box-shadow: inset 2px 2px 1px hsl(0, 0%, 0%),
inset 1px 1px 1px hsla(0, 0%, 100%, 0.5),
inset 1px 1px 1px hsla(0, 0%, 0%, 0.5);
}
p {
margin: auto 50%;
}
Question: Should I use rem for everything, or just for font sizing and other wide scales? My logic is to use rem for things that can affect the layout if confronted with different resolutions and leave pixels for cosmetic design only such as border-radius, text-shadow, etc etc.