mirror of
https://github.com/snachodog/just-the-docs.git
synced 2025-04-14 07:12:23 -06:00
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: Matt Wang <matt@matthewwang.me>
This commit is contained in:
parent
f1fd81dd01
commit
33a7b2ac28
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user