Skip to content
Snippets Groups Projects
Unverified Commit 33a7b2ac authored by Peter Mosses's avatar Peter Mosses Committed by GitHub
Browse files

Fix default highlighting in custom color schemes (#986)


* Fix default highlighting in custom schemes

Fix #982

The variable settings for highlighting in the default `light` scheme are currently (v0.4.0.rc2`) in `_sass/color_schemes/light.scss`.
This PR ensures that custom schemes are based on the `light` scheme.

It also adds a note explaining the default to the customization docs,
and gives an example of how to define a custom scheme based on the `dark` scheme

* Prettier

* Deleted test file

Co-authored-by: default avatarMatt Wang <matt@matthewwang.me>
parent f1fd81dd
No related branches found
No related tags found
No related merge requests found
......@@ -2,6 +2,7 @@
$logo: "{{ site.logo | relative_url }}";
{% endif %}
@import "./support/support";
@import "./color_schemes/light";
@import "./color_schemes/{{ include.color_scheme }}";
@import "./modules";
{% include css/custom.scss.liquid %}
......
......@@ -58,6 +58,17 @@ You can add custom schemes.
If you want to add a scheme named `foo` (can be any name) just add a file `_sass/color_schemes/foo.scss` (replace `foo` by your scheme name)
where you override theme variables to change colors, fonts, spacing, etc.
{: .note }
Since the default color scheme is `light`, your custom scheme is implicitly based on the variable settings used by the `light` scheme.
If you want your custom scheme to be based on the `dark` scheme, you need to start your file with the following line:
```scss
@import "./color_schemes/dark";
```
You can define custom schemes based on other custom schemes in the same way.
Available variables are listed in the [\_variables.scss](https://github.com/just-the-docs/just-the-docs/tree/main/_sass/support/_variables.scss) file.
For example, to change the link color from the purple default to blue, include the following inside your scheme file:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment