The highlight component is a general, generic box with an icon.
Use the highlight component on a page to highlight a short text, certain specific information or to show a notification.
The highlight component works best with a text with no more than one or a few sentences. The ideal total length of the text is the length of a tweet, meaning between 140 characters and 280 characters.
Do not use the highlight component to present the main content. Only use the highlight component to highlight specific information.
Do not use the highlight component to show long text or complex content.
Do not use the highlight component when another, more specific style guide component is more applicable:
The highlight component consists of 3 parts:
See the examples.
<section class="highlight">
<div class="highlight__inner">
<i class="icon-star-empty" aria-hidden="true"></i>
{{ title }}
{{ content }}
</div>
</section>
<section class="highlight">
<div class="highlight__inner">
<i class="icon-star-empty" aria-hidden="true"></i>
<h2 class="h3">Highlight</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum imperdiet vestibulum ex, id tincidunt nulla porttitor nec.</p>
</div>
</section>
{
"title": "<h2 class=\"h3\">Highlight</h2>",
"content": "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum imperdiet vestibulum ex, id tincidunt nulla porttitor nec.</p>"
}
.highlight {
position: relative;
z-index: 0;
.highlight__inner {
@include theme('background-color', 'color-tertiary-light', 'highlight-background');
@include theme-content('color-tertiary-pastel', 'highlight-shadow-color') {
@include abstract-shadow('bottom', 'right', $theme-color, null, 190px, 190px);
@include phablet {
@include abstract-shadow('bottom', 'right', $theme-color, null, 220px, 220px);
}
}
padding: 30px;
@include tablet {
padding: 60px;
}
& > i {
@include theme('color', 'color-tertiary', 'highlight-icon-color');
display: inline-block;
width: 40px;
height: 40px;
vertical-align: top;
&::before {
display: block;
margin: 0 8px 0 0;
font-size: 2rem;
}
}
h2,
h3 {
display: inline-block;
margin: 0 0 20px;
vertical-align: top;
}
p:first-of-type {
margin-top: 0;
}
> *:last-child {
margin-bottom: 0;
}
}
}