* {
color: transparent;
}
Accessibility:
Essential for some, useful for all.
display: none;
visibility: hidden;
<p hidden></p>
aria-hidden="true"
role="presentation"
.hide-visually {
position: absolute;
left: -10000px;
width: 1px;
height: 1px;
overflow: hidden;
clip-path: inset(50%);
}
<button class="close-button">
Close
</button>
.close-button {
width: 40px;
height: 40px;
text-indent: 40px;
overflow: hidden;
background: url(close.svg) center no-repeat;
background-size: contain;
}
a.skip-link {
/* hide visually */
}
a.skip-link:focus {
/* show */
}
@media (prefers-color-scheme: dark) {
body {
background-color: #1e1e1e;
color: #d4d4d4;
}
}
@media (pointer: coarse) {
button {
padding: 2em;
}
}
@media (prefers-reduced-motion: reduce) {
*, *::after, *::before {
animation-duration: 1ms !important;
animation-delay: -1ms !important;
animation-iteration-count: 1 !important;
transition-duration: 1ms !important;
transition-delay: -1ms !important;
}
}
My favorite color is hotpink cornflowerblue.
del::before, del::after, ins::before, ins::after {
/* hide visually */
}
del::before { content: '[deletion start]'; }
del::after { content: '[deletion end]'; }
ins::before { content: '[insertion start]'; }
ins::after { content: '[insertion end]'; }
<div class="button-container">
<button type="submit">Login</button>
<button type="button">Cancel</button>
</div>
.button-container {
display: flex;
flex-direction: row-reverse;
flex-wrap: wrap;
}
:root {
font-size: 20px;
}
p {
font-size: 1rem;
line-height: 1.6;
letter-spacing: 0.3px;
word-spacing: 2px;
}
ul {
list-style-type: none;
}
<ul role="list">