From e43f5c6462ee066e635f07c98d0d5b85b6089ba0 Mon Sep 17 00:00:00 2001 From: unknownopponent Date: Sat, 14 Oct 2023 21:16:58 +0200 Subject: [PATCH] css dry use a variable for the main color --- docs/assets/css/extra.css | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/docs/assets/css/extra.css b/docs/assets/css/extra.css index 1ea4263..2cad84c 100644 --- a/docs/assets/css/extra.css +++ b/docs/assets/css/extra.css @@ -1,17 +1,18 @@ :root { - --md-admonition-icon--image: url('data:image/svg+xml;charset=utf-8,') + --md-admonition-icon--image: url('data:image/svg+xml;charset=utf-8,'); +--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); }