Skip to content

Commit

Permalink
Fixed custom admonition icons not working when color palette is defined
Browse files Browse the repository at this point in the history
  • Loading branch information
squidfunk committed Jun 5, 2022
1 parent 30dcb66 commit 7998dbf
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 10 deletions.
1 change: 1 addition & 0 deletions material/assets/stylesheets/main.5d38496d.min.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions material/assets/stylesheets/main.5d38496d.min.css.map

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion material/assets/stylesheets/main.c0b802b2.min.css

This file was deleted.

1 change: 0 additions & 1 deletion material/assets/stylesheets/main.c0b802b2.min.css.map

This file was deleted.

2 changes: 1 addition & 1 deletion material/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
{% endif %}
{% endblock %}
{% block styles %}
<link rel="stylesheet" href="{{ 'assets/stylesheets/main.c0b802b2.min.css' | url }}">
<link rel="stylesheet" href="{{ 'assets/stylesheets/main.5d38496d.min.css' | url }}">
{% if config.theme.palette %}
{% set palette = config.theme.palette %}
<link rel="stylesheet" href="{{ 'assets/stylesheets/palette.cbb835fc.min.css' | url }}">
Expand Down
23 changes: 16 additions & 7 deletions src/assets/stylesheets/main/_colors.scss
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,22 @@

// Color variables
:root {
@extend %root;
}

// ----------------------------------------------------------------------------

// Allow to explicitly use color schemes in nested content
[data-md-color-scheme="default"] {
@extend %root;
}

// ----------------------------------------------------------------------------
// Placeholders
// ----------------------------------------------------------------------------

// Default theme, i.e. light mode
%root {

// Default color shades
--md-default-fg-color: hsla(0, 0%, 0%, 0.87);
Expand Down Expand Up @@ -116,10 +132,3 @@
0 #{px2rem(4px)} #{px2rem(10px)} hsla(0, 0%, 0%, 0.2),
0 0 #{px2rem(1px)} hsla(0, 0%, 0%, 0.35);
}

// ----------------------------------------------------------------------------

// Allow to explicitly use color schemes in nested content
[data-md-color-scheme="default"] {
@extend :root;
}

0 comments on commit 7998dbf

Please # to comment.