About this set
Callouts for documentation, shown inside a page of fictional docs for a static site builder called Quarry. The first group covers the five admonition types that GitHub, Docusaurus and most docs tools settled on: Note, Tip, Important, Warning and Caution, each with a 4px coloured edge, a tinted background, an icon and an uppercase label, so readers learn to scan for them. Inline code inside a callout gets a light chip that stays readable on every tint. The card callout is for API changes: a header with the function name, a red Deprecated in 3.0 badge and a green Replacement since 2.4 badge, a sentence and a diff-style code sample that wraps instead of scrolling. The collapsible callouts are question and answer boxes on native details and summary elements, for background that most readers can skip, with a rotating chevron and one opened by default. Every callout is a div with role=”note” and a visible label, so screen reader users hear what kind of note it is. There is no JavaScript in this set. The Bootstrap version uses .alert for the callouts and .card with .badge for the card callout.
What’s included
- Note, Tip, Important, Warning and Caution types
- Card callout with version badges and a wrapped code sample
- Collapsible question callouts on native details
- role="note" with a visible label on every callout
- No JavaScript
Accessibility
Callouts use role="note" and start with a text label, so the type is announced and never shown by colour alone; icons are hidden from assistive technology. The collapsible callouts are native details elements, so Enter and Space open them and their state is announced. Summaries and links show a visible focus outline, and the chevron rotation stops under prefers-reduced-motion.
Customise it
Each type sets --co-accent, --co-bg and --co-label on .co-note, .co-tip, .co-important, .co-warning and .co-caution; add a type by copying one of those lines. The code sample colours are on .co-pre. In Bootstrap the same properties sit beside --bs-alert-bg; in Tailwind edit the border-l, bg and text utilities.






