.element {
background: url("icon.svg");
}
.cell {
table-layout: fixed;
}
.list {
display: flex;
justify-content: space-between;
}
.list__item {
flex-basis: 25%;
}
.container {
height: 0;
position: relative;
padding-bottom: 30%;
}
.container div {
height: 100%;
left: 0;
position: absolute;
top: 0;
width: 100%;
}
img {
display: block;
font-family: Arial;
font-weight: 300;
height: auto;
line-height: 2;
position: relative;
text-align: center;
width: 100%;
}
img:before {
content: "Missing Image";
display: block;
margin-bottom: 10px;
}
img:after {
content: "(url: " attr(src) ")";
display: block;
font-size: 12px;
}
List separators using CSS content - CodePen
ul > li:not(:last-child)::after {
content: ",";
}
Use :not
to remove styles - CodePen
.list li:not(:last-child) {
border-right: 1px solid #000;
}
html {
font-size: 16px;
}
h1 {
font-size: 2em;
}
p {
font-size: 1em;
}
.component {
font-size: 1.25rem;
}
Allow fonts to adjust with each viewport.
:root {
font-size: calc(1vw + 1vh + .5vmin);
}
body {
font: 1em/1.6 sans-serif;
}