Skip to content

Commit

Permalink
Fix what I've borked
Browse files Browse the repository at this point in the history
  • Loading branch information
pradyunsg committed Nov 5, 2020
1 parent 2bd4419 commit 70aba79
Show file tree
Hide file tree
Showing 6 changed files with 70 additions and 77 deletions.
1 change: 1 addition & 0 deletions src/furo/assets/styles/base/_index.sass
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
@import "icons"
@import "theme"
@import "typography"
5 changes: 3 additions & 2 deletions src/furo/assets/styles/components/_table_of_contents.sass
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
// This file contains the styles for the contents of the right sidebar, which
// contains the table of contents for the current page.
.toc-scroll
padding-top: var(--toc-spacing-vertical)
padding-bottom: var(--toc-spacing-vertical)

.toc-title-container
padding: var(--toc-title-padding)
padding-top: var(--toc-spacing-vertical)

.toc-title
font-size: var(--toc-title-font-size)
Expand All @@ -19,7 +21,6 @@
line-height: 1.3

padding-left: calc(var(--toc-spacing-horizontal) - var(--toc-item-spacing-horizontal))
padding-bottom: var(--toc-spacing-vertical)

// Hide the "top level" bullet.
> ul > li
Expand Down
64 changes: 64 additions & 0 deletions src/furo/assets/styles/content/_admonitions.sass
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
// Definitely inspired by mkdocs-material.
.admonition
margin: 1rem auto
padding: 0 0.5rem 0.5rem 0.5rem

background: var(--color-admonition-background)

border-radius: 0.2rem
border-left: 0.2rem solid var(--color-admonition-title)
box-shadow: 0 0.2rem 0.5rem rgba(0, 0, 0, 0.05), 0 0 0.0625rem rgba(0, 0, 0, 0.1)

font-size: var(--admonition-font-size)

overflow: hidden
page-break-inside: avoid

// First element should have no margin, since the title has it.
> :nth-child(2)
margin-top: 0

// Last item should have no margin, since we'll control that w/ padding
> :last-child
margin-bottom: 0


// Defaults for all admonitions
p.admonition-title
position: relative
margin: 0 -0.5rem 0.5rem
padding: 0.5rem 0.5rem 0.5rem 2rem

font-weight: 500
font-size: var(--admonition-title-font-size)
background-color: var(--color-admonition-title-background)

line-height: 1.3

// Our fancy icon
&::before
content: ""
position: absolute
left: 0.5rem
width: 1rem
height: 1rem
// color: var(--color-admonition-title)
background-color: var(--color-admonition-title)

mask-image: var(--icon-admonition-default)
mask-repeat: no-repeat

//
// Variants
//
@each $type, $value in $admonitions
&.#{$type}
border-left-color: var(--color-admonition-title--#{$type})
.admonition-title
background-color: var(--color-admonition-title-background--#{$type})
&::before
background-color: var(--color-admonition-title--#{$type})
mask-image: var(--icon-#{nth($value, 2)})

.admonition-todo .admonition-title
text-transform: uppercase
73 changes: 0 additions & 73 deletions src/furo/assets/styles/content/_admonitions.scss

This file was deleted.

2 changes: 1 addition & 1 deletion src/furo/theme/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@

{#- Theme-related stylesheets -#}
{%- block theme_styles -%}
<link rel="stylesheet" href="{{ pathto('_static/styles/default.css', 1) }}?{{ furo_asset_hash }}">
<link rel="stylesheet" href="{{ pathto('_static/' + style, 1) | e }}?{{ furo_asset_hash }}">
<link rel="stylesheet" href="{{ pathto('_static/pygments.css', 1) }}">
<link media="(prefers-color-scheme: dark)" rel="stylesheet" href="{{ pathto('_static/pygments_dark.css', 1) }}">
{% include "partials/_head_css_variables.html" with context %}
Expand Down
2 changes: 1 addition & 1 deletion src/furo/theme/theme.conf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[theme]
inherit = basic
stylesheet = furo.css
stylesheet = styles/furo.css
pygments_style = default
pygments_dark_style = native
sidebars = sidebar/brand.html, sidebar/search.html, sidebar/navigation.html
Expand Down

0 comments on commit 70aba79

Please sign in to comment.