Toggle pill (pressed state)

Toggle pill (pressed state): a CSS button. Copy the rules, or the prompt that rebuilds it.

togglepressedaria-pressedpill

CSS
.btn-087 {
  font: 600 13px/1 system-ui,sans-serif;
  color: #374151;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  padding: 9px 16px;
  cursor: pointer;
  transition: background .15s,color .15s,border-color .15s
}
.btn-087:hover {
  background: #f3f4f6
}
.btn-087[aria-pressed="true"] {
  background: #111827;
  color: #fff;
  border-color: #111827
}
.btn-087[aria-pressed="true"]:hover {
  background: #1f2937
}
.btn-087:focus-visible {
  outline: 2px solid #111827;
  outline-offset: 2px
}
.btn-087:active {
  transform: scale(.96)
}
HTML
<button class="btn-087" aria-pressed="true">Bold</button> <button class="btn-087" aria-pressed="false">Italic</button>
Prompt

Pill toggle buttons driven by aria-pressed: default white with 1px #d1d5db border and grey text #374151 at 13px semibold, 9px by 16px padding; when aria-pressed is true the pill inverts to #111827 with white text. Hover #f3f4f6 (or #1f2937 when pressed); active scales to 96%. Focus outline 2px dark.