About this set
Three notification cards in the info, success and warning severities, stacked the way they would sit in a notification panel. Each card has a coloured left edge, a matching icon tile, a bold title, a line of detail, a relative timestamp in a time element and a dismiss button in the top corner. The info card (a new comment) and the success card (a finished deployment) open something when clicked, so their titles are stretched links whose ::after layer covers the whole card; the warning card (a card about to expire) carries its own Update card and Remind me later buttons instead. The dismiss and action buttons sit above the link layer, so each stays a separate click target. Severity is not left to colour alone: a visually hidden Info, Success or Warning prefix is read before each title. One custom property, –tone, sets the edge, icon and primary button colour, and –wash sets the icon tile. The Bootstrap version uses .card, .stretched-link, .btn and the stock .btn-close; the Tailwind version draws the card focus ring with has-[a:focus-visible].
What’s included
- Info, success and warning variants driven by one --tone variable
- Stretched-link titles on the cards that open something
- Dismiss and action buttons layered above the link
- Hidden severity prefix so colour is not the only signal
- Relative timestamps in time elements with a datetime value
Accessibility
Each card title is an h2 that starts with visually hidden severity text, and each linked card has a single link, so a screen reader hears one name per card. The icon-only dismiss buttons are labelled Dismiss notification and all icons are aria-hidden. Keyboard focus on a card link draws a 2px indigo ring around the whole card, buttons get their own ring, and the hover shadow transition is removed under prefers-reduced-motion.
Customise it
Set --tone and --wash on .info, .ok and .warn (plain CSS and Bootstrap) or swap the border-l-, bg- and text- colours on each card (Tailwind). Keep --tone dark enough for white button text; the warning amber is #b45309 for that reason.




















