Skip to content

Commit

Permalink
Remove wyrm_addons/pygments (#504)
Browse files Browse the repository at this point in the history
* Remove wyrm_addons/pygments/
* Use own sass for codeblocks
* Fix styling of code blocks
* Set line height for all
* Revert back to normal line height
* Group css rules to keep them in sync
  • Loading branch information
Blendify authored Jan 14, 2018
1 parent 124e61c commit d332646
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 10 deletions.
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
#show_authors = False

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
pygments_style = 'default'

# A list of ignored prefixes for module index sorting.
#modindex_common_prefix = []
Expand Down
38 changes: 33 additions & 5 deletions sass/_theme_rst.sass
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@
max-width: 100%
height: auto

.highlight > pre, .linenodiv > pre
line-height: normal

div.figure
margin-bottom: $base-line-height
p.caption
Expand Down Expand Up @@ -53,8 +50,39 @@
margin-left: $base-line-height
line-height: $base-line-height
margin-bottom: $base-line-height
.literal-block, pre.literal-block
@extend .codeblock

pre.literal-block, div[class^='highlight']
border: 1px solid $table-border-color
padding: 0px
overflow-x: auto
// 1px hack otherwise border won't show. lame
margin: 1px 0 $base-line-height 0
div[class^='highlight']
border: none
margin: 0
// Needs 100% width for line highlighting to work properly
div[class^='highlight'] td.code
width: 100%
.linenodiv pre
border-right: solid 1px lighten($table-border-color, 2%)
margin: 0
padding: $base-line-height / 2 $base-line-height / 2
font-family: $code-font-family
div[class^='highlight'] pre
white-space: pre
margin: 0
padding: $base-line-height / 2 $base-line-height / 2
font-family: $code-font-family
display: block
overflow: auto
pre.literal-block, div[class^='highlight'] pre, .linenodiv pre
font-size: 12px
line-height: normal

@media print
.codeblock, div[class^='highlight'], div[class^='highlight'] pre
white-space: pre-wrap

// These are the various note pullouts that sphinx applies
.note, .attention, .caution, .danger, .error, .hint, .important, .tip, .warning, .seealso, .admonition-todo, .admonition
@extend .wy-alert
Expand Down
4 changes: 0 additions & 4 deletions sass/theme.sass
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,6 @@
@import wyrm_core/table
@import wyrm_core/type

// Pygments styling
@import wyrm_addons/pygments/pygments
@import wyrm_addons/pygments/pygments_light

// Theme specific styles. These are likely the files you want to edit.
@import theme_breadcrumbs
@import theme_layout
Expand Down

0 comments on commit d332646

Please sign in to comment.