all skills

HTML / CSS

everything on the web ends up here eventually, including this site.

semantic markup, custom properties, container queries and nothing clever in JavaScript. the card on the right is styled by the CSS on the left.

used in CHC Review Studio

html / css · styled by the css it shows

ui mutation lab

build log

one card, every width

no media queries here: the card asks its container how much room it has, and the theme and density are just variables.

  • semantic
  • container queries
  • custom properties
read more

layout
420px
1.0x
density
alignment
shape
14px
1px
shadow
type and colour
1.00x
theme
what the page actually set
.demo-frame[style] {
  --frame-w: 420px;
  --spacing: 1;
  --card-radius: 14px;
  --card-border-w: 1px;
  --type-scale: 1;
}
data-theme="light" data-density="normal"
data-align="start" data-shadow="none"

tab + arrows slidersclick a preset for quick widths

how this works

the controls only write custom properties and data attributes. the card is the markup in card.html, adapting through app/demo-card.css: variables for the numbers, a container query for the layout. the one thing the lab will not stop you doing is making it worse.

<!-- the lab sets the data-* attributes and the style attribute; the card never changes. --><div class="demo-frame" data-theme="light" data-density="normal" data-align="start" data-shadow="none" style="--frame-w: 420px; --spacing: 1; --card-radius: 14px">  <article class="demo-card" aria-labelledby="demo-card-title">    <div class="demo-card-art" aria-hidden="true"></div>    <div class="demo-card-body">      <p class="demo-card-kicker">build log</p>      <h3 id="demo-card-title">one card, every width</h3>      <p>no media queries here: the card asks its container how much room it has, and the theme and density are just variables.</p>      <ul class="demo-card-tags">        <li>semantic</li>        <li>container queries</li>        <li>custom properties</li>      </ul>      <a class="demo-card-link" href="#demo-card-title">read more</a>    </div>  </article></div>