Skip to content

Commit d10e171

Browse files
committed
beta: Info about fonts
1 parent 2cfcb63 commit d10e171

2 files changed

Lines changed: 41 additions & 2 deletions

File tree

doc/llms.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,14 @@ repository at `https://github.com/Telefonica/mistica-web/blob/master/doc/<filena
2727
6. **Always namespace React hooks**: `React.useState`, `React.useEffect`, `React.useRef`.
2828
7. **Add `'use client';`** directive to client components when using Next.js app router.
2929
8. Use `skinVars.rawColors.*` (not `skinVars.colors.*`) when applying alpha with `applyAlpha`.
30+
9. **Always set `font-family` on `body`.** Mistica does NOT inject a font family — without it browsers fall
31+
back to their default serif font (e.g. Times New Roman on desktop). At minimum add this to your global CSS:
32+
```css
33+
body {
34+
font-family: -apple-system, 'Roboto', 'Helvetica', 'Arial', sans-serif;
35+
}
36+
```
37+
See [fonts.md](./fonts.md) for full setup including `@font-face` declarations and dynamic font sizes.
3038

3139
## Install
3240

@@ -42,6 +50,15 @@ npm install @telefonica/mistica
4250

4351
## Quick Start
4452

53+
**Required global CSS** — add this to your global stylesheet (e.g. `globals.css`). Mistica does not inject a
54+
font family, so without it browsers render text with their default serif font:
55+
56+
```css
57+
body {
58+
font-family: -apple-system, 'Roboto', 'Helvetica', 'Arial', sans-serif;
59+
}
60+
```
61+
4562
```tsx
4663
'use client';
4764

skills/mistica/SKILL.md

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,18 +108,40 @@ These rules MUST be followed in ALL generated code:
108108

109109
10. **Use `small` prop on buttons** inside cards and `EmptyStateCard`.
110110

111-
11. **Do NOT wrap these components in `ResponsiveLayout`** — they already contain one internally:
111+
11. **Always set `font-family` on `body`.** Mistica does NOT inject a font — without it browsers fall back to
112+
their default serif font (Times New Roman on desktop). Add to your global CSS:
113+
114+
```css
115+
body {
116+
font-family: -apple-system, 'Roboto', 'Helvetica', 'Arial', sans-serif;
117+
}
118+
```
119+
120+
Read `node_modules/@telefonica/mistica/doc/fonts.md` for full `@font-face` setup.
121+
122+
12. **Do NOT wrap these components in `ResponsiveLayout`** — they already contain one internally:
112123
`HeaderLayout`, `MainSectionHeaderLayout`, `Hero`, `CoverHero`, `MasterDetailLayout`,
113124
`ButtonFixedFooterLayout`, `NavigationBar`, `MainNavigationBar`, `FunnelNavigationBar`, `Tabs`,
114125
`SuccessFeedbackScreen`, `ErrorFeedbackScreen`, `InfoFeedbackScreen`, `LoadingScreen`,
115126
`BrandLoadingScreen`. Place them at page level, side by side with `ResponsiveLayout` blocks.
116127

117-
12. **Use carousels only for horizontal content.** `Carousel` and `CenteredCarousel` are horizontal-scroll
128+
13. **Use carousels only for horizontal content.** `Carousel` and `CenteredCarousel` are horizontal-scroll
118129
components — always place them **inside** `ResponsiveLayout`. `Slideshow` bleeds full-width automatically
119130
and should be placed **outside** `ResponsiveLayout`.
120131

121132
## Quick Reference
122133

134+
### Required global CSS
135+
136+
Add to your global stylesheet (e.g. `globals.css`, `index.css`). Without this, browsers render Mistica text
137+
with their default serif font (Times New Roman on desktop):
138+
139+
```css
140+
body {
141+
font-family: -apple-system, 'Roboto', 'Helvetica', 'Arial', sans-serif;
142+
}
143+
```
144+
123145
### Standard page structure
124146

125147
```tsx

0 commit comments

Comments
 (0)