img { border-width: 2px; }
h1 { font-size: 3rem; }
section { width: 80vw; }
p {
color: grey;
border-color: teal;
background-color: green;
}
p {
color: #808080;
border-color: #008080;
background-color: #008000;
}
p {
color: rgb(128, 128, 128);
border-color: rgb(0, 128, 128);
background-color: rgba(0, 128, 0, 0.5);
}
p {
color: hsl(0, 0, 50%);
border-color: rgb(180, 100%, 50%);
background-color: rgba(120, 100%, 50%, 0.5);
}
*::selection { background: #eee; } /* Pseudo-element */
a:hover { color: #c00; } /* Pseudo-class */
nav h1 { font-weight: normal; } /* Descendant */
ul > li { font-style: italic; } /* Child */
h1 + p { font-weight: bold; } /* Sibling */
a.portal { font-size: 1.5rem; } /* Specificity */
@media print {
body { backgorund: #fff; }
}
@media screen and (max-width: 800px) {
nav ul { display: block; }
}
@media screen and (min-aspect-ratio: 1/1) {
/* Apply rules for landscape orientation */
}
nav {
display: flex;
flex-direction: row;
}
.portal { display: inline-block; }
nav {
top: 0;
position: fixed;
}