@t2falcon/tokens
v0.2.17
Published
Falcon design tokens — the compiled Falcon theme CSS (Tailwind v4 SSOT: all :root token variables, dark-mode overrides, keyframes, host-shell global font rules) plus the Falcon icon font and self-hosted webfonts. The base/preflight reset ships SEPARATELY
Readme
@falcon/tokens
Falcon design tokens as plain CSS — no Tailwind required in the consumer.
Contents:
styles/falcon-tokens.css— compiled from the Falcon theme SSOT (libs/falcon-theme/src/falcon-tailwind-tokens.css, Tailwind v4,theme(static)): ALL:roottoken variables (--color-falcon-*,--spacing-*,--text-*,--radius-*,--shadow-falcon-*, chart vars, …), Tailwind preflight/base, the.app-dark/.darkdark-mode overrides, every@keyframes(incl.menuIn), thebodydefault-text-color rule, and the host-shell global font rules (Poppins / IBM Plex Sans Arabic + RTL override) appended at the end.styles/falcon-icons.css— the Falcon glyph-font stylesheet (<i class="falcon-icon falcon-icon-{name}">); expects/assets/fonts/falcon-icons/falcon-icons.woff2.assets/fonts/google/— self-hosted Poppins / Inter / IBM Plex Sans Arabic (fonts.css+ woff2, relative urls).assets/fonts/falcon-icons/falcon-icons.woff2— the glyph font backingfalcon-icons.css.
Wiring (angular.json / project.json)
Styles — load tokens BEFORE any Falcon component/utility stylesheet
(e.g. @falcon/layout/styles/falcon-layout.css):
"styles": [
"node_modules/@falcon/tokens/styles/falcon-tokens.css",
"node_modules/@falcon/tokens/styles/falcon-icons.css",
"node_modules/@falcon/layout/styles/falcon-layout.css",
"src/styles.css"
]Assets — publish the fonts under /assets/fonts/**:
"assets": [
{ "glob": "**/*", "input": "node_modules/@falcon/tokens/assets/fonts", "output": "assets/fonts" }
]index.html — font preloads + stylesheet (verbatim from the Falcon host-shell):
<link rel="preload" as="font" type="font/woff2" crossorigin
href="assets/fonts/google/poppins-400-latin.woff2">
<link rel="preload" as="font" type="font/woff2" crossorigin
href="assets/fonts/google/poppins-600-latin.woff2">
<link rel="preload" as="font" type="font/woff2" crossorigin
href="assets/fonts/google/poppins-700-latin.woff2">
<link rel="stylesheet" href="assets/fonts/google/fonts.css">Dark mode
Add the app-dark class (and, for Falcon Stencil components, the
data-theme="dark" attribute) to <html>. @falcon/layout's ThemeService
does exactly this and persists the preference in localStorage falcon-theme.
