From 47b7991805acf268c44ca1ca80992baa8768d7e5 Mon Sep 17 00:00:00 2001 From: Ian Carrico Date: Wed, 4 Sep 2019 08:55:11 -0400 Subject: [PATCH 1/2] Allow for custom overrides by the user --- _sass/overrides.scss | 3 +++ assets/css/just-the-docs.scss | 1 + 2 files changed, 4 insertions(+) create mode 100644 _sass/overrides.scss diff --git a/_sass/overrides.scss b/_sass/overrides.scss new file mode 100644 index 0000000..21e9527 --- /dev/null +++ b/_sass/overrides.scss @@ -0,0 +1,3 @@ +// +// Custom overrides from a user. +// diff --git a/assets/css/just-the-docs.scss b/assets/css/just-the-docs.scss index 6a2eefa..4de25c0 100644 --- a/assets/css/just-the-docs.scss +++ b/assets/css/just-the-docs.scss @@ -42,3 +42,4 @@ @import "./tables"; @import "./code"; @import "./utilities/utilities"; +@import "./overrides"; From 1aee233e1f363816892b97e09eaed67885b9de0c Mon Sep 17 00:00:00 2001 From: Ian Carrico Date: Wed, 4 Sep 2019 09:04:10 -0400 Subject: [PATCH 2/2] Add in some docs --- docs/customization.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/docs/customization.md b/docs/customization.md index eccb4bc..a3d5b6f 100644 --- a/docs/customization.md +++ b/docs/customization.md @@ -69,3 +69,20 @@ $link-color: $blue-000; ``` _Note:_ Editing the variables directly in `_sass/support/variables.scss` is not recommended and can cause other dependencies to fail. + +## Override styles + +To add your own CSS at the end of the cascade, edit `_sass/overrides.scss` to add in your own custom CSS. This will allow for all overrides to be kept in a single file, and allow for any upstream changes to still be allowed. + +For example, if you'd like to add your own styles for printing a page, you could add the following styles. + +#### Example +{: .no_toc } + +```scss +// Print-only styles. +@media print { + .side-bar, .page-header { display: none; } + .main-content { max-width: auto; margin: 1em;} +} +```