Callout
A tinted note with a coloured edge and a short heading. A cool version for tips and a warm version for warnings. Use it inside an article to lift out one tip or caution. Use sparingly; if everything is a callout, nothing is.
← All blocks
<section class="blk-section" aria-labelledby="blk-callout-title">
<div class="blk-container blk-container--narrow">
<aside class="blk-callout" aria-labelledby="blk-callout-title">
<h2 class="blk-callout__title" id="blk-callout-title">Good to know</h2>
<p>A short note that deserves to stand apart from the text around it: a tip, a rule of thumb or a thing people often miss.</p>
</aside>
<aside class="blk-callout blk-callout--warn" aria-labelledby="blk-callout-warn-title">
<h2 class="blk-callout__title" id="blk-callout-warn-title">Watch out</h2>
<p>A caution about something that costs money, time or patience if it is missed.</p>
</aside>
</div>
</section>.blk-container--narrow { max-width: var(--blk-container-narrow); }
.blk-callout { position: relative; padding: 22px 26px 22px 30px; border-radius: var(--blk-radius-lg); background: var(--blk-band-b); color: var(--blk-ink); }
.blk-callout + .blk-callout { margin-top: 18px; }
.blk-callout::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 5px; border-radius: 0 3px 3px 0; background: var(--blk-secondary); }
.blk-callout--warn { background: var(--blk-band-a); }
.blk-callout--warn::before { background: var(--blk-accent); }
.blk-section .blk-callout__title { font-size: 1.05rem; margin-bottom: 8px; }
.blk-callout--warn .blk-callout__title { color: var(--blk-accent); }
.blk-callout p { font-size: 1rem; line-height: 1.6; }How to customise it
- Use the plain version for tips and add
blk-callout--warnfor cautions. - Keep the body to two or three sentences.
- The tints come from
--blk-band-aand--blk-band-b; change those in your theme to recolour them. - Give each callout its own heading text and a unique id on the heading.
Tokens it reads
--blk-band-a--blk-band-b--blk-secondary--blk-accent--blk-ink--blk-radius-lg--blk-container-narrowAdd the "Callout" block from Product Scope Blocks (https://resources.productscope.uk/blocks/blocks/callout) to my page. Link https://resources.productscope.uk/blocks/blocks/kit/blocks.css once. Paste the HTML from https://resources.productscope.uk/blocks/blocks/kit/blocks/callout.html and replace the placeholder text with my real content. Do not change the class names, add inline styles or add scripts. To change colours or fonts, override the --blk- variables in my own CSS. Do not invent facts, clients or numbers.