Skip to content

Commit

Permalink
Have website use theme variables instead of custom SASS overrides (#285)
Browse files Browse the repository at this point in the history
  • Loading branch information
japborst authored Oct 9, 2022
1 parent 8f8f57f commit 45cac61
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 23 deletions.
4 changes: 2 additions & 2 deletions website/_includes/head_custom.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<!-- XXX: The theme does not natively support both light and dark mode. Drop
this section once https://github.com/just-the-docs/just-the-docs/issues/234 is
resolved. -->
<link rel="stylesheet" href="{{ '/assets/css/just-the-docs-light.css' | relative_url }}"
<link rel="stylesheet" href="{{ '/assets/css/just-the-docs-eps-light.css' | relative_url }}"
media="(prefers-color-scheme: light)">
<link rel="stylesheet" href="{{ '/assets/css/just-the-docs-dark.css' | relative_url }}"
<link rel="stylesheet" href="{{ '/assets/css/just-the-docs-eps-dark.css' | relative_url }}"
media="(prefers-color-scheme: dark)">
5 changes: 5 additions & 0 deletions website/_sass/color_schemes/_common.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
footer > img#logo {
width: 2rem;
margin: 0 auto;
display: block;
}
1 change: 1 addition & 0 deletions website/_sass/color_schemes/_variables.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
$nav-width: 400px;
3 changes: 3 additions & 0 deletions website/_sass/color_schemes/eps-dark.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@import "./color_schemes/dark";
@import "_variables";
@import "_common";
3 changes: 3 additions & 0 deletions website/_sass/color_schemes/eps-light.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@import "./color_schemes/light";
@import "_variables";
@import "_common";
21 changes: 0 additions & 21 deletions website/_sass/custom/custom.scss

This file was deleted.

3 changes: 3 additions & 0 deletions website/assets/css/just-the-docs-eps-dark.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
---
{% include css/just-the-docs.scss.liquid color_scheme="eps-dark" %}
3 changes: 3 additions & 0 deletions website/assets/css/just-the-docs-eps-light.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
---
{% include css/just-the-docs.scss.liquid color_scheme="eps-light" %}

0 comments on commit 45cac61

Please sign in to comment.