-
Notifications
You must be signed in to change notification settings - Fork 481
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This changes: - add support for a keyword argument `ansicolor` in the `@example`/`@repl` block - for per-block setting to overide the default setting - the default uses the `:color` property of `stdout` (determined by `--color`) - use the `ansicolor` option for the `:color` property of output - translate "text/plain" output with ANSI escape codes in `HTMLWriter` - add styles for ANSI colors to the default themes
- Loading branch information
Showing
13 changed files
with
550 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,199 @@ | ||
|
||
$ansi-black: $black-ter !default; | ||
$ansi-red: $red !default; | ||
$ansi-green: $green !default; | ||
$ansi-yellow: $yellow !default; | ||
$ansi-blue: $blue !default; | ||
$ansi-magenta: $purple !default; | ||
$ansi-cyan: $turquoise !default; | ||
$ansi-white: $grey-lighter !default; | ||
|
||
$ansi-light-black: $grey-light !default; | ||
$ansi-light-red: $red !default; | ||
$ansi-light-green: $green !default; | ||
$ansi-light-yellow: $yellow !default; | ||
$ansi-light-blue: $blue !default; | ||
$ansi-light-magenta: $purple !default; | ||
$ansi-light-cyan: $turquoise !default; | ||
$ansi-light-white: $white-ter !default; | ||
|
||
@if $documenter-is-dark-theme { | ||
$ansi-light-red: lighten($red, 15); | ||
$ansi-light-green: lighten($green, 15); | ||
$ansi-light-yellow: lighten($yellow, 10); | ||
$ansi-light-blue: lighten($blue, 15); | ||
$ansi-light-magenta: lighten($purple, 10); | ||
$ansi-light-cyan: lighten($turquoise, 15); | ||
} | ||
@else { | ||
$ansi-light-black: $grey; | ||
$ansi-red: darken($red, 10); | ||
$ansi-green: darken($green, 10); | ||
$ansi-yellow: darken($yellow, 18); | ||
$ansi-blue: darken($blue, 10); | ||
$ansi-magenta: darken($purple, 15); | ||
$ansi-cyan: darken($turquoise, 10); | ||
} | ||
|
||
span { | ||
&.sgr1 { | ||
font-weight: bolder; | ||
} | ||
|
||
&.sgr2 { | ||
font-weight: lighter; | ||
} | ||
|
||
&.sgr3 { | ||
font-style: italic; | ||
} | ||
|
||
&.sgr4 { | ||
text-decoration: underline; | ||
} | ||
|
||
&.sgr7 { | ||
color: $body-background-color; | ||
background-color: $text; | ||
} | ||
|
||
&.sgr8 { | ||
color: transparent; | ||
|
||
span { | ||
color: transparent; | ||
} | ||
} | ||
|
||
&.sgr9 { | ||
text-decoration: line-through; | ||
} | ||
|
||
&.sgr30 { | ||
color: $ansi-black | ||
} | ||
|
||
&.sgr31 { | ||
color: $ansi-red | ||
} | ||
|
||
&.sgr32 { | ||
color: $ansi-green | ||
} | ||
|
||
&.sgr33 { | ||
color: $ansi-yellow; | ||
} | ||
|
||
&.sgr34 { | ||
color: $ansi-blue; | ||
} | ||
|
||
&.sgr35 { | ||
color: $ansi-magenta; | ||
} | ||
|
||
&.sgr36 { | ||
color: $ansi-cyan; | ||
} | ||
|
||
&.sgr37 { | ||
color: $ansi-white; | ||
} | ||
|
||
&.sgr40 { | ||
background-color: $ansi-black; | ||
} | ||
|
||
&.sgr41 { | ||
background-color: $ansi-red; | ||
} | ||
|
||
&.sgr42 { | ||
background-color: $ansi-green; | ||
} | ||
|
||
&.sgr43 { | ||
background-color: $ansi-yellow; | ||
} | ||
|
||
&.sgr44 { | ||
background-color: $ansi-blue; | ||
} | ||
|
||
&.sgr45 { | ||
background-color: $ansi-magenta; | ||
} | ||
|
||
&.sgr46 { | ||
background-color: $ansi-cyan; | ||
} | ||
|
||
&.sgr47 { | ||
background-color: $ansi-white; | ||
} | ||
|
||
&.sgr90 { | ||
color: $ansi-light-black; | ||
} | ||
|
||
&.sgr91 { | ||
color: $ansi-light-red; | ||
} | ||
|
||
&.sgr92 { | ||
color: $ansi-light-green; | ||
} | ||
|
||
&.sgr93 { | ||
color: $ansi-light-yellow; | ||
} | ||
|
||
&.sgr94 { | ||
color: $ansi-light-blue; | ||
} | ||
|
||
&.sgr95 { | ||
color: $ansi-light-magenta; | ||
} | ||
|
||
&.sgr96 { | ||
color: $ansi-light-cyan | ||
} | ||
|
||
&.sgr97 { | ||
color: $ansi-light-white; | ||
} | ||
|
||
&.sgr100 { | ||
background-color: $ansi-light-black; | ||
} | ||
|
||
&.sgr101 { | ||
background-color: $ansi-light-red; | ||
} | ||
|
||
&.sgr102 { | ||
background-color: $ansi-light-green; | ||
} | ||
|
||
&.sgr103 { | ||
background-color: $ansi-light-yellow; | ||
} | ||
|
||
&.sgr104 { | ||
background-color: $ansi-light-blue; | ||
} | ||
|
||
&.sgr105 { | ||
background-color: $ansi-light-magenta; | ||
} | ||
|
||
&.sgr106 { | ||
background-color: $ansi-light-cyan; | ||
} | ||
|
||
&.sgr107 { | ||
background-color: $ansi-light-white; | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.