Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add chapter: theming a base theme #6328

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/source/theming/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ theming-engine
theming-strategy
custom-styling
using-third-party-themes
theming-a-base-theme
```
36 changes: 36 additions & 0 deletions docs/source/theming/theming-a-base-theme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
html_meta:
"description": "Customize a base theme like `Volto Light Theme` via SCSS."
"property=og:description": "Customize a base theme like `Volto Light Theme` via SCSS."
"property=og:title": "Theming a base theme like `Volto Light Theme`"
"keywords": "Volto, Plone, frontend, React, themes, Volto Light Theme"
---

# Theming a base theme like `Volto Light Theme`

In your Volto addon, create a `theme` folder with the follwing two empty files:

```
src/
├── components
├── index.js
└── theme
├── _main.scss
└── _variables.scss
```

## Variables
`_variables.scss`

This is the place to override SCSS variables of the base theme.

```
$text-color: #000;
$font-size: 18px;
$line-height: 24px;
```

## Main
`_main.scss`

All custom styles should done here. You can also include other SCSS or CSS files here.
Loading