Skip to content

Commit

Permalink
css dry
Browse files Browse the repository at this point in the history
use a variable for the main color
  • Loading branch information
unknownopponent committed Oct 14, 2023
1 parent 8c005e2 commit e43f5c6
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions docs/assets/css/extra.css
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
:root {
--md-admonition-icon--image: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M8.5,13.5L11,16.5L14.5,12L19,18H5M21,19V5C21,3.89 20.1,3 19,3H5A2,2 0 0,0 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19Z" /></svg>')
--md-admonition-icon--image: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M8.5,13.5L11,16.5L14.5,12L19,18H5M21,19V5C21,3.89 20.1,3 19,3H5A2,2 0 0,0 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19Z" /></svg>');
--main-color: 124, 77, 255;
}
.md-typeset .admonition.image,
.md-typeset details.image {
border-color: rgb(124, 77, 255);
border-color: rgb(var(--main-color));
}
.md-typeset .image > .admonition-title,
.md-typeset .image > summary {
background-color: rgba(124, 77, 255, 0.1);
background-color: rgba(var(--main-color), 0.1);
}
.md-typeset .image > .admonition-title::before,
.md-typeset .image > summary::before {
background-color: rgb(124, 77, 255);
background-color: rgb(var(--main-color));
-webkit-mask-image: var(--md-admonition-icon--image);
mask-image: var(--md-admonition-icon--image);
}
Expand Down

0 comments on commit e43f5c6

Please sign in to comment.