Skip to content

Commit

Permalink
fix: review
Browse files Browse the repository at this point in the history
BREAKING CHANGE: changed name of `fullfont.css` to `font-characters-extension.css`.
  • Loading branch information
jeripeierSBB committed Apr 29, 2024
1 parent 0310f47 commit 2d64425
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 18 deletions.
32 changes: 16 additions & 16 deletions docs/GETTING_STARTED.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,29 +198,29 @@ and on [storybook](https://lyne-storybook.app.sbb.ch).
Basically, all our styles are included in 'standard-theme.css' which should be included in your application.
However, if you like to more specifically pick what you need, consider the following CSS files available.

| File name | Description |
| -------------------- | ----------------------------------------------------------------------------------- |
| `standard-theme.css` | Contains normalizing, core styles and available CSS classes. |
| `fullfont.css` | Provides full character set of SBB fonts, needs larger files to fetch. |
| | |
| `normalize.css` | Contains general browser resetting styles which can be useful for your application. |
| | |
| `core.css` | Contains mandatory basics to use lyne-components (including design tokens). |
| | |
| `a11y.css` | Provides accessibility related CSS classes. |
| `animation.css` | Provides CSS classes to disable animation (e.g. for testing). |
| `layout.css` | Provides layout related CSS classes (e.g. page spacing, grid). |
| `lists.css` | Provides CSS classes to style lists. |
| `typography.css` | Provides typography related CSS classes. |
| File name | Description |
| ------------------------------- | ----------------------------------------------------------------------------------- |
| `standard-theme.css` | Contains normalizing, core styles and available CSS classes. |
| `font-characters-extension.css` | Provides full character set of SBB fonts, needs larger files to fetch. |
| | |
| `normalize.css` | Contains general browser resetting styles which can be useful for your application. |
| | |
| `core.css` | Contains mandatory basics to use lyne-components (including design tokens). |
| | |
| `a11y.css` | Provides accessibility related CSS classes. |
| `animation.css` | Provides CSS classes to disable animation (e.g. for testing). |
| `layout.css` | Provides layout related CSS classes (e.g. page spacing, grid). |
| `lists.css` | Provides CSS classes to style lists. |
| `typography.css` | Provides typography related CSS classes. |

### Full Font

The `standard-theme.css` (or `core.css`) file only contains a subset of the `SBBWeb` fonts that do not contain all characters (e.g. the French "œ").
For including the full fontset, we provide the `fullfont.css` file which can be added after the `standard-theme.css` (or `core.css`) file.
For including the full fontset, we provide the `font-characters-extension.css` file which can be added after the `standard-theme.css` (or `core.css`) file.

```css
@import '@sbb-esta/lyne-components/standard-theme.css';
@import '@sbb-esta/lyne-components/fullfont.css';
@import '@sbb-esta/lyne-components/font-characters-extension.css';
```

### Design Tokens
Expand Down
2 changes: 1 addition & 1 deletion src/components/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export default defineConfig((config) =>
'a11y.css',
'animation.css',
'core.css',
'fullfont.css',
'font-characters-extension.css',
'standard-theme.css',
'layout.css',
'lists.css',
Expand Down
5 changes: 4 additions & 1 deletion tools/vite/typography.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ export function typography(): PluginOption {
{ inputName: 'core/styles/a11y.scss', outputName: 'a11y.css' },
{ inputName: 'core/styles/animation.scss', outputName: 'animation.css' },
{ inputName: 'core/styles/core.scss', outputName: 'core.css' },
{ inputName: 'core/styles/fullfont.scss', outputName: 'fullfont.css' },
{
inputName: 'core/styles/font-characters-extension.scss',
outputName: 'font-characters-extension.css',
},
{ inputName: 'core/styles/layout.scss', outputName: 'layout.css' },
{ inputName: 'core/styles/lists.scss', outputName: 'lists.css' },
{ inputName: 'core/styles/normalize.scss', outputName: 'normalize.css' },
Expand Down

0 comments on commit 2d64425

Please sign in to comment.