Examples
Read a responsive two-column card layout
Input
.cards{display:grid;grid-template-columns:repeat(2,1fr);gap:1rem}@media(max-width:40rem){.cards{grid-template-columns:1fr}}Expected answer
.cards{
display:grid;
grid-template-columns:repeat(2,1fr);
gap:1rem
}
@media(max-width:40rem){
.cards{
grid-template-columns:1fr
}
}
- Indent string
Inspect focus styles without losing the attribute selector
Input
button[data-state="open"]:focus-visible{outline:2px solid #005fcc;outline-offset:3px}Expected answer
button[data-state="open"]:focus-visible{
outline:2px solid #005fcc;
outline-offset:3px
}
- Indent string
Trace a custom property through a dark-mode override
Input
:root{--surface:#fff;--ink:#111}.dark{--surface:#111;--ink:#fff}.panel{background:var(--surface);color:var(--ink)}Expected answer
:root{
--surface:#fff;
--ink:#111
}
.dark{
--surface:#111;
--ink:#fff
}
.panel{
background:var(--surface);
color:var(--ink)
}
- Indent string
Separate the steps of an opacity animation
Input
@keyframes fade{0%{opacity:0}50%{opacity:.5}100%{opacity:1}}Expected answer
@keyframes fade{
0%{
opacity:0
}
50%{
opacity:.5
}
100%{
opacity:1
}
}
- Indent string
Read a print rule that hides navigation
Input
/* Paper copy */@media print{nav,.toolbar{display:none}a{color:#000;text-decoration:underline}}Expected answer
/* Paper copy */
@media print{
nav,.toolbar{
display:none
}
a{
color:#000;
text-decoration:underline
}
}
- Indent string
Parameters
| Parameter | Default value | Input and choices |
|---|---|---|
| Indent string | "\\t" | Escape sequences such as \n, \r and \t are supported |