diff options
author | Simon Knox <psimyn@gmail.com> | 2019-02-14 09:54:34 +0300 |
---|---|---|
committer | Simon Knox <psimyn@gmail.com> | 2019-02-15 13:10:19 +0300 |
commit | 5996fd145ff8d774573e5a0ef22c3b4f0611196f (patch) | |
tree | ab8c31c2ae0c32a2273dd18662550f58f4894580 /app/assets/stylesheets/highlight | |
parent | 0328d4faeec093db7744ae5a018174ea4f558a42 (diff) |
Only load selected syntax highlight CSS
Compile highlight CSS separately
Move highlight-specific mixins out of mixins.scss
Rename solarized themes to match theme name as this was a smaller
change than changing all instances to snake_case
Diffstat (limited to 'app/assets/stylesheets/highlight')
-rw-r--r-- | app/assets/stylesheets/highlight/common.scss | 18 | ||||
-rw-r--r-- | app/assets/stylesheets/highlight/dark.scss | 2 | ||||
-rw-r--r-- | app/assets/stylesheets/highlight/monokai.scss | 2 | ||||
-rw-r--r-- | app/assets/stylesheets/highlight/none.scss | 2 | ||||
-rw-r--r-- | app/assets/stylesheets/highlight/solarized-dark.scss (renamed from app/assets/stylesheets/highlight/solarized_dark.scss) | 2 | ||||
-rw-r--r-- | app/assets/stylesheets/highlight/solarized-light.scss (renamed from app/assets/stylesheets/highlight/solarized_light.scss) | 2 | ||||
-rw-r--r-- | app/assets/stylesheets/highlight/white_base.scss | 2 |
7 files changed, 29 insertions, 1 deletions
diff --git a/app/assets/stylesheets/highlight/common.scss b/app/assets/stylesheets/highlight/common.scss new file mode 100644 index 00000000000..2b0794759d5 --- /dev/null +++ b/app/assets/stylesheets/highlight/common.scss @@ -0,0 +1,18 @@ +@import "../framework/variables"; + +@mixin diff-background($background, $idiff, $border) { + background: $background; + + &.line_content span.idiff { + background: $idiff; + } + + &.diff-line-num { + border-color: $border; + } +} + +@mixin dark-diff-match-line { + color: $dark-diff-match-bg; + background: $dark-diff-match-color; +} diff --git a/app/assets/stylesheets/highlight/dark.scss b/app/assets/stylesheets/highlight/dark.scss index ca9a2a673f5..435c57ab329 100644 --- a/app/assets/stylesheets/highlight/dark.scss +++ b/app/assets/stylesheets/highlight/dark.scss @@ -1,5 +1,7 @@ /* https://github.com/MozMorris/tomorrow-pygments */ +@import "./common"; + /* * Dark syntax colors */ diff --git a/app/assets/stylesheets/highlight/monokai.scss b/app/assets/stylesheets/highlight/monokai.scss index bc3761d1e47..d09a21d574b 100644 --- a/app/assets/stylesheets/highlight/monokai.scss +++ b/app/assets/stylesheets/highlight/monokai.scss @@ -1,5 +1,7 @@ /* https://github.com/richleland/pygments-css/blob/master/monokai.css */ +@import "./common"; + /* * Monokai Colors */ diff --git a/app/assets/stylesheets/highlight/none.scss b/app/assets/stylesheets/highlight/none.scss index 4bedb6a8e5b..3105c4ed6e8 100644 --- a/app/assets/stylesheets/highlight/none.scss +++ b/app/assets/stylesheets/highlight/none.scss @@ -2,7 +2,7 @@ * None Syntax Colors */ - +@import "./common"; @mixin match-line { color: $black-transparent; diff --git a/app/assets/stylesheets/highlight/solarized_dark.scss b/app/assets/stylesheets/highlight/solarized-dark.scss index de7b9424340..6b1ee4d450c 100644 --- a/app/assets/stylesheets/highlight/solarized_dark.scss +++ b/app/assets/stylesheets/highlight/solarized-dark.scss @@ -1,5 +1,7 @@ /* https://gist.github.com/qguv/7936275 */ +@import "./common"; + /* * Solarized dark colors */ diff --git a/app/assets/stylesheets/highlight/solarized_light.scss b/app/assets/stylesheets/highlight/solarized-light.scss index 84a92d0320a..3e8367754ca 100644 --- a/app/assets/stylesheets/highlight/solarized_light.scss +++ b/app/assets/stylesheets/highlight/solarized-light.scss @@ -1,5 +1,7 @@ /* https://gist.github.com/qguv/7936275 */ +@import "./common"; + /* * Solarized light syntax colors */ diff --git a/app/assets/stylesheets/highlight/white_base.scss b/app/assets/stylesheets/highlight/white_base.scss index c636abbdfad..23ec3380ce9 100644 --- a/app/assets/stylesheets/highlight/white_base.scss +++ b/app/assets/stylesheets/highlight/white_base.scss @@ -1,5 +1,7 @@ /* https://github.com/aahan/pygments-github-style */ +@import "./common"; + /* * White Syntax Colors */ |