diff --git a/packages/component-header-footer/README.md b/packages/component-header-footer/README.md index e41d149a62..5f54ef557e 100644 --- a/packages/component-header-footer/README.md +++ b/packages/component-header-footer/README.md @@ -31,3 +31,20 @@ import { ASUHeader as Header, ASUFooter as Footer } from '@asu/component-header- ### Import for use in HTML page You can find an example of how to set `ASUHeader` and `ASUFooter` props for use in a browser [here](/packages/component-header/examples/global-header-footer.html) + +## Theming: brand colors + +The header and footer read ASU brand colors (maroon, gold) from Bootstrap's CSS +custom properties, with the standard hex as a fallback — for example +`var(--bs-gold, #ffc627)` and `var(--bs-maroon, #8c1d40)`. This includes gradient +usages such as the selected nav-item underline and the animated title underline. + +- **Branded sites** render pixel-identically: with no `--bs-*` overrides present, + the hex fallback applies. +- **Unbranded (KE) sites**: Webspark's unbranded palette rewrites `--bs-*` in the + compiled `unity-bootstrap-theme` stylesheet, so the header and footer follow the + site palette natively — no props or API changes required. + +Brand colors are centralized: the header's live in `src/header/colors.js`; the +footer's gold flows through the local `--color-base-gold` custom property in +`src/footer/index.styles.js`. Grays and other neutrals remain fixed literals. diff --git a/packages/component-header-footer/src/footer/footer-brand-colors.test.js b/packages/component-header-footer/src/footer/footer-brand-colors.test.js new file mode 100644 index 0000000000..2cdd45c684 --- /dev/null +++ b/packages/component-header-footer/src/footer/footer-brand-colors.test.js @@ -0,0 +1,26 @@ +// @ts-check +import { render, cleanup } from "@testing-library/react"; +import React from "react"; + +import { ASUFooter } from "."; + +import { completeState } from "../../__mocks__/data/props-mock"; + +// styled-components v6 injects its rules as