> For the complete documentation index, see [llms.txt](https://docs.civictheme.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.civictheme.io/development/uikit/variables/typography.md).

# Typography

CivicTheme UI kit provides a system for easily consuming and extending typography mixins and variables.

### Fonts

The default font-families are defined in a map `$ct-fonts-default`:

```scss
$ct-fonts-default: (
  'primary': (
    'family': '"Lexend", sans-serif',
    'types': (
      (
        'uri': 'https://fonts.googleapis.com/css2?family=Lexend:wght@400;500;600;700&display=swap',
      ),
    ),
  ),
  // ...
);
```

This map can be extended using `$ct-fonts` map (fonts can be stored with the library or linked to a remote location):

```scss
$ct-fonts: (
  'tertiary': (
    'family': 'Roboto, sans-serif',
    'types': (
      (
        'uri': (
          '#{$ct-assets-directory}fonts/Roboto/Roboto-Regular.ttf',
          '#{$ct-assets-directory}fonts/Roboto/Roboto-Regular.woff',
          '#{$ct-assets-directory}fonts/Roboto/Roboto-Regular.eot',
        ),
      ),
      (
        'italic': true,
        'uri': (
          '#{$ct-assets-directory}fonts/Roboto/Roboto-Italic.ttf',
          '#{$ct-assets-directory}fonts/Roboto/Roboto-Italic.woff',
          '#{$ct-assets-directory}fonts/Roboto/Roboto-Italic.eot',
        ),
      ),
      (
        'weight': 'bold',
        'uri': (
          '#{$ct-assets-directory}fonts/Roboto/Roboto-Bold.ttf',
          '#{$ct-assets-directory}fonts/Roboto/Roboto-Bold.woff',
          '#{$ct-assets-directory}fonts/Roboto/Roboto-Bold.eot',
        ),
      ),
      (
        'italic': true,
        'weight': 'bold',
        'uri': (
          '#{$ct-assets-directory}fonts/Roboto/Roboto-BoldItalic.ttf',
          '#{$ct-assets-directory}fonts/Roboto/Roboto-BoldItalic.woff',
          '#{$ct-assets-directory}fonts/Roboto/Roboto-BoldItalic.eot',
        ),
      ),
      (
        'weight': 300,
        'uri': (
          '#{$ct-assets-directory}fonts/Roboto/Roboto-Thin.ttf',
          '#{$ct-assets-directory}fonts/Roboto/Roboto-Thin.woff',
          '#{$ct-assets-directory}fonts/Roboto/Roboto-Thin.eot',
        ),
      ),
      (
        'weight': 700,
        'uri': (
          '#{$ct-assets-directory}fonts/Roboto/Roboto-Black.ttf',
          '#{$ct-assets-directory}fonts/Roboto/Roboto-Black.woff',
          '#{$ct-assets-directory}fonts/Roboto/Roboto-Black.eot',
        ),
      ),
    ),
  ),
  // ...
);
```

#### Defining typography

The default typography is set in a map `$ct-typography-default`:

```scss
$ct-typography-default: (
  // Headings.
  'heading-1': (
    'xxs': ($ct-font-base-size * 2, $ct-font-base-line-height * 2.5, 700, 'primary', -0.6px),
    'm': ($ct-font-base-size * 3, $ct-font-base-line-height * 3.75, 700, 'primary', -1px)
  ),
  // ...
);
```

This can be extended using `$ct-typography` map:

```scss
$ct-typography: (
  'body-extra-large': (
    'xxs': ($ct-font-base-size * 2, $ct-font-base-line-height * 2.5, 700, 'primary', -0.6px),
    'm': ($ct-font-base-size * 3, $ct-font-base-line-height * 3.75, 700, 'primary', -1px)
  ),
);
```

### Using typography

Typography can be set for elements using the `ct-typography()` mixin with a pre-defined mapping:

```scss
h1 {
  @include ct-typography('heading-l');
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.civictheme.io/development/uikit/variables/typography.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
