A site's own plain footer for a site outside the family footer, with links, a mark and small print.
<footer class="cap-site-footer" id="sample-plain">
<div class="cap-page cap-spread" data-align="center" data-gap="6">
<p class="cap-site-footer-note">Paid for by the Sample Campaign.</p>
<nav class="cap-site-footer-links" data-links="quiet" aria-label="Footer">
<a href="#top">Accessibility</a>
<a href="#top">Contact</a>
</nav>
</div>
</footer>
Installation
// package.json: "capsomer": "github:DrDustinEdwards/capsomer#v0.152.2"
import "capsomer/tokens.css";
import "capsomer/base.css";
import "capsomer/site-footer.css";
Usage
<footer class="cap-site-footer" data-tone="raised">
<div class="cap-page">
<nav class="cap-site-footer-links" aria-label="Footer">
<a href="/contact">Contact</a>
<a href="/accessibility">Accessibility</a>
</nav>
<p class="cap-site-footer-note">© Texas Branch ASM</p>
</div>
</footer>
Examples
Raised, with a mark
<footer class="cap-site-footer" data-tone="raised" id="sample-raised">
<div class="cap-page cap-stack" data-gap="5">
<nav class="cap-site-footer-links" aria-label="Sample site">
<a href="#top">Meetings</a>
<a href="#top">Awards</a>
<a href="#top">Contact</a>
</nav>
<svg aria-hidden="true" viewBox="0 0 80 16" width="80" height="16"><rect width="80" height="16" rx="3" fill="currentColor" opacity="0.4"/></svg>
<p class="cap-site-footer-note">© Sample Society</p>
</div>
</footer>
API reference
CSS variables
| Variable | Default |
|---|
--site-footer-bg | var(--raised) |
|---|
--site-footer-fs | var(--fs-detail) |
|---|
--site-footer-gap | 0 |
|---|
--site-footer-pad | calc(var(--space-7) + var(--space-3)) |
|---|
Parts and data attributes
| Class | Is |
|---|
.cap-site-footer | the root |
|---|
.cap-site-footer-links | a part |
|---|
.cap-site-footer-note | a part |
|---|
| Attribute | Values |
|---|
data-links | quiet |
|---|
data-tone | raised |
|---|
| State | Read from |
|---|
:hover | the platform |
|---|
Accessibility
| Key | Does |
|---|
| Tab | Moves through the links in reading order |
footer is the page's contentinfo landmark; its links row is a nav named "Footer".- A decorative mark is
aria-hidden; the small print names the site in words. - Quiet links are the muted text color (Lc 60 and 4.5:1) and semibold, so they stay links without the link color.
- Screen readers: no manual run by decision; the axe scan and a front-end review stand in.