From 897fefa0d78c7a397de8bc642320226ad9e4fe98 Mon Sep 17 00:00:00 2001
From: Maximilian Roos <5635139+max-sixty@users.noreply.github.com>
Date: Fri, 6 Oct 2023 16:10:37 -0700
Subject: [PATCH] web: Update mdbook-admonish assets to v3 (#3613)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
---
web/book/book.toml | 4 +-
web/book/mdbook-admonish.css | 175 ++++++++++++++++++++---------------
2 files changed, 100 insertions(+), 79 deletions(-)
diff --git a/web/book/book.toml b/web/book/book.toml
index 1ce7a8769425..c2b39c8650d5 100644
--- a/web/book/book.toml
+++ b/web/book/book.toml
@@ -5,7 +5,7 @@ multilingual = false
title = "PRQL language book"
[output.html]
-additional-css = ["comparison-table.css", "mdbook-admonish.css"]
+additional-css = ["comparison-table.css", "mdbook-admonish.css", "./mdbook-admonish.css"]
additional-js = ["highlight-prql.js"]
git-repository-url = "https://github.com/PRQL/prql"
@@ -16,7 +16,7 @@ git-repository-url = "https://github.com/PRQL/prql"
command = "cargo run --bin mdbook-prql"
[preprocessor.admonish]
-assets_version = "2.0.0" # do not edit: managed by `mdbook-admonish install`
+assets_version = "3.0.0" # do not edit: managed by `mdbook-admonish install`
command = "mdbook-admonish"
[preprocessor.footnote]
diff --git a/web/book/mdbook-admonish.css b/web/book/mdbook-admonish.css
index 98d4a87c7cf1..76aabce639fa 100644
--- a/web/book/mdbook-admonish.css
+++ b/web/book/mdbook-admonish.css
@@ -1,17 +1,17 @@
@charset "UTF-8";
:root {
- --md-admonition-icon--note: url("data:image/svg+xml;charset=utf-8,");
- --md-admonition-icon--abstract: url("data:image/svg+xml;charset=utf-8,");
- --md-admonition-icon--info: url("data:image/svg+xml;charset=utf-8,");
- --md-admonition-icon--tip: url("data:image/svg+xml;charset=utf-8,");
- --md-admonition-icon--success: url("data:image/svg+xml;charset=utf-8,");
- --md-admonition-icon--question: url("data:image/svg+xml;charset=utf-8,");
- --md-admonition-icon--warning: url("data:image/svg+xml;charset=utf-8,");
- --md-admonition-icon--failure: url("data:image/svg+xml;charset=utf-8,");
- --md-admonition-icon--danger: url("data:image/svg+xml;charset=utf-8,");
- --md-admonition-icon--bug: url("data:image/svg+xml;charset=utf-8,");
- --md-admonition-icon--example: url("data:image/svg+xml;charset=utf-8,");
- --md-admonition-icon--quote: url("data:image/svg+xml;charset=utf-8,");
+ --md-admonition-icon--admonish-note: url("data:image/svg+xml;charset=utf-8,");
+ --md-admonition-icon--admonish-abstract: url("data:image/svg+xml;charset=utf-8,");
+ --md-admonition-icon--admonish-info: url("data:image/svg+xml;charset=utf-8,");
+ --md-admonition-icon--admonish-tip: url("data:image/svg+xml;charset=utf-8,");
+ --md-admonition-icon--admonish-success: url("data:image/svg+xml;charset=utf-8,");
+ --md-admonition-icon--admonish-question: url("data:image/svg+xml;charset=utf-8,");
+ --md-admonition-icon--admonish-warning: url("data:image/svg+xml;charset=utf-8,");
+ --md-admonition-icon--admonish-failure: url("data:image/svg+xml;charset=utf-8,");
+ --md-admonition-icon--admonish-danger: url("data:image/svg+xml;charset=utf-8,");
+ --md-admonition-icon--admonish-bug: url("data:image/svg+xml;charset=utf-8,");
+ --md-admonition-icon--admonish-example: url("data:image/svg+xml;charset=utf-8,");
+ --md-admonition-icon--admonish-quote: url("data:image/svg+xml;charset=utf-8,");
--md-details-icon: url("data:image/svg+xml;charset=utf-8,");
}
@@ -66,8 +66,9 @@ a.admonition-anchor-link::before {
content: "ยง";
}
-:is(.admonition-title, summary) {
+:is(.admonition-title, summary.admonition-title) {
position: relative;
+ min-height: 4rem;
margin-block: 0;
margin-inline: -1.6rem -1.2rem;
padding-block: 0.8rem;
@@ -76,13 +77,13 @@ a.admonition-anchor-link::before {
background-color: rgba(68, 138, 255, 0.1);
display: flex;
}
-:is(.admonition-title, summary) p {
+:is(.admonition-title, summary.admonition-title) p {
margin: 0;
}
-html :is(.admonition-title, summary):last-child {
+html :is(.admonition-title, summary.admonition-title):last-child {
margin-bottom: 0;
}
-:is(.admonition-title, summary)::before {
+:is(.admonition-title, summary.admonition-title)::before {
position: absolute;
top: 0.625em;
inset-inline-start: 1.6rem;
@@ -97,7 +98,8 @@ html :is(.admonition-title, summary):last-child {
-webkit-mask-size: contain;
content: "";
}
-:is(.admonition-title, summary):hover a.admonition-anchor-link {
+:is(.admonition-title, summary.admonition-title):hover
+ a.admonition-anchor-link {
display: initial;
}
@@ -122,204 +124,223 @@ details[open].admonition > summary.admonition-title::after {
transform: rotate(90deg);
}
-:is(.admonition):is(.note) {
+:is(.admonition):is(.admonish-note) {
border-color: #448aff;
}
-:is(.note) > :is(.admonition-title, summary) {
+:is(.admonish-note) > :is(.admonition-title, summary.admonition-title) {
background-color: rgba(68, 138, 255, 0.1);
}
-:is(.note) > :is(.admonition-title, summary)::before {
+:is(.admonish-note) > :is(.admonition-title, summary.admonition-title)::before {
background-color: #448aff;
- mask-image: var(--md-admonition-icon--note);
- -webkit-mask-image: var(--md-admonition-icon--note);
+ mask-image: var(--md-admonition-icon--admonish-note);
+ -webkit-mask-image: var(--md-admonition-icon--admonish-note);
mask-repeat: no-repeat;
-webkit-mask-repeat: no-repeat;
mask-size: contain;
-webkit-mask-repeat: no-repeat;
}
-:is(.admonition):is(.abstract, .summary, .tldr) {
+:is(.admonition):is(.admonish-abstract, .admonish-summary, .admonish-tldr) {
border-color: #00b0ff;
}
-:is(.abstract, .summary, .tldr) > :is(.admonition-title, summary) {
+:is(.admonish-abstract, .admonish-summary, .admonish-tldr)
+ > :is(.admonition-title, summary.admonition-title) {
background-color: rgba(0, 176, 255, 0.1);
}
-:is(.abstract, .summary, .tldr) > :is(.admonition-title, summary)::before {
+:is(.admonish-abstract, .admonish-summary, .admonish-tldr)
+ > :is(.admonition-title, summary.admonition-title)::before {
background-color: #00b0ff;
- mask-image: var(--md-admonition-icon--abstract);
- -webkit-mask-image: var(--md-admonition-icon--abstract);
+ mask-image: var(--md-admonition-icon--admonish-abstract);
+ -webkit-mask-image: var(--md-admonition-icon--admonish-abstract);
mask-repeat: no-repeat;
-webkit-mask-repeat: no-repeat;
mask-size: contain;
-webkit-mask-repeat: no-repeat;
}
-:is(.admonition):is(.info, .todo) {
+:is(.admonition):is(.admonish-info, .admonish-todo) {
border-color: #00b8d4;
}
-:is(.info, .todo) > :is(.admonition-title, summary) {
+:is(.admonish-info, .admonish-todo)
+ > :is(.admonition-title, summary.admonition-title) {
background-color: rgba(0, 184, 212, 0.1);
}
-:is(.info, .todo) > :is(.admonition-title, summary)::before {
+:is(.admonish-info, .admonish-todo)
+ > :is(.admonition-title, summary.admonition-title)::before {
background-color: #00b8d4;
- mask-image: var(--md-admonition-icon--info);
- -webkit-mask-image: var(--md-admonition-icon--info);
+ mask-image: var(--md-admonition-icon--admonish-info);
+ -webkit-mask-image: var(--md-admonition-icon--admonish-info);
mask-repeat: no-repeat;
-webkit-mask-repeat: no-repeat;
mask-size: contain;
-webkit-mask-repeat: no-repeat;
}
-:is(.admonition):is(.tip, .hint, .important) {
+:is(.admonition):is(.admonish-tip, .admonish-hint, .admonish-important) {
border-color: #00bfa5;
}
-:is(.tip, .hint, .important) > :is(.admonition-title, summary) {
+:is(.admonish-tip, .admonish-hint, .admonish-important)
+ > :is(.admonition-title, summary.admonition-title) {
background-color: rgba(0, 191, 165, 0.1);
}
-:is(.tip, .hint, .important) > :is(.admonition-title, summary)::before {
+:is(.admonish-tip, .admonish-hint, .admonish-important)
+ > :is(.admonition-title, summary.admonition-title)::before {
background-color: #00bfa5;
- mask-image: var(--md-admonition-icon--tip);
- -webkit-mask-image: var(--md-admonition-icon--tip);
+ mask-image: var(--md-admonition-icon--admonish-tip);
+ -webkit-mask-image: var(--md-admonition-icon--admonish-tip);
mask-repeat: no-repeat;
-webkit-mask-repeat: no-repeat;
mask-size: contain;
-webkit-mask-repeat: no-repeat;
}
-:is(.admonition):is(.success, .check, .done) {
+:is(.admonition):is(.admonish-success, .admonish-check, .admonish-done) {
border-color: #00c853;
}
-:is(.success, .check, .done) > :is(.admonition-title, summary) {
+:is(.admonish-success, .admonish-check, .admonish-done)
+ > :is(.admonition-title, summary.admonition-title) {
background-color: rgba(0, 200, 83, 0.1);
}
-:is(.success, .check, .done) > :is(.admonition-title, summary)::before {
+:is(.admonish-success, .admonish-check, .admonish-done)
+ > :is(.admonition-title, summary.admonition-title)::before {
background-color: #00c853;
- mask-image: var(--md-admonition-icon--success);
- -webkit-mask-image: var(--md-admonition-icon--success);
+ mask-image: var(--md-admonition-icon--admonish-success);
+ -webkit-mask-image: var(--md-admonition-icon--admonish-success);
mask-repeat: no-repeat;
-webkit-mask-repeat: no-repeat;
mask-size: contain;
-webkit-mask-repeat: no-repeat;
}
-:is(.admonition):is(.question, .help, .faq) {
+:is(.admonition):is(.admonish-question, .admonish-help, .admonish-faq) {
border-color: #64dd17;
}
-:is(.question, .help, .faq) > :is(.admonition-title, summary) {
+:is(.admonish-question, .admonish-help, .admonish-faq)
+ > :is(.admonition-title, summary.admonition-title) {
background-color: rgba(100, 221, 23, 0.1);
}
-:is(.question, .help, .faq) > :is(.admonition-title, summary)::before {
+:is(.admonish-question, .admonish-help, .admonish-faq)
+ > :is(.admonition-title, summary.admonition-title)::before {
background-color: #64dd17;
- mask-image: var(--md-admonition-icon--question);
- -webkit-mask-image: var(--md-admonition-icon--question);
+ mask-image: var(--md-admonition-icon--admonish-question);
+ -webkit-mask-image: var(--md-admonition-icon--admonish-question);
mask-repeat: no-repeat;
-webkit-mask-repeat: no-repeat;
mask-size: contain;
-webkit-mask-repeat: no-repeat;
}
-:is(.admonition):is(.warning, .caution, .attention) {
+:is(.admonition):is(.admonish-warning, .admonish-caution, .admonish-attention) {
border-color: #ff9100;
}
-:is(.warning, .caution, .attention) > :is(.admonition-title, summary) {
+:is(.admonish-warning, .admonish-caution, .admonish-attention)
+ > :is(.admonition-title, summary.admonition-title) {
background-color: rgba(255, 145, 0, 0.1);
}
-:is(.warning, .caution, .attention) > :is(.admonition-title, summary)::before {
+:is(.admonish-warning, .admonish-caution, .admonish-attention)
+ > :is(.admonition-title, summary.admonition-title)::before {
background-color: #ff9100;
- mask-image: var(--md-admonition-icon--warning);
- -webkit-mask-image: var(--md-admonition-icon--warning);
+ mask-image: var(--md-admonition-icon--admonish-warning);
+ -webkit-mask-image: var(--md-admonition-icon--admonish-warning);
mask-repeat: no-repeat;
-webkit-mask-repeat: no-repeat;
mask-size: contain;
-webkit-mask-repeat: no-repeat;
}
-:is(.admonition):is(.failure, .fail, .missing) {
+:is(.admonition):is(.admonish-failure, .admonish-fail, .admonish-missing) {
border-color: #ff5252;
}
-:is(.failure, .fail, .missing) > :is(.admonition-title, summary) {
+:is(.admonish-failure, .admonish-fail, .admonish-missing)
+ > :is(.admonition-title, summary.admonition-title) {
background-color: rgba(255, 82, 82, 0.1);
}
-:is(.failure, .fail, .missing) > :is(.admonition-title, summary)::before {
+:is(.admonish-failure, .admonish-fail, .admonish-missing)
+ > :is(.admonition-title, summary.admonition-title)::before {
background-color: #ff5252;
- mask-image: var(--md-admonition-icon--failure);
- -webkit-mask-image: var(--md-admonition-icon--failure);
+ mask-image: var(--md-admonition-icon--admonish-failure);
+ -webkit-mask-image: var(--md-admonition-icon--admonish-failure);
mask-repeat: no-repeat;
-webkit-mask-repeat: no-repeat;
mask-size: contain;
-webkit-mask-repeat: no-repeat;
}
-:is(.admonition):is(.danger, .error) {
+:is(.admonition):is(.admonish-danger, .admonish-error) {
border-color: #ff1744;
}
-:is(.danger, .error) > :is(.admonition-title, summary) {
+:is(.admonish-danger, .admonish-error)
+ > :is(.admonition-title, summary.admonition-title) {
background-color: rgba(255, 23, 68, 0.1);
}
-:is(.danger, .error) > :is(.admonition-title, summary)::before {
+:is(.admonish-danger, .admonish-error)
+ > :is(.admonition-title, summary.admonition-title)::before {
background-color: #ff1744;
- mask-image: var(--md-admonition-icon--danger);
- -webkit-mask-image: var(--md-admonition-icon--danger);
+ mask-image: var(--md-admonition-icon--admonish-danger);
+ -webkit-mask-image: var(--md-admonition-icon--admonish-danger);
mask-repeat: no-repeat;
-webkit-mask-repeat: no-repeat;
mask-size: contain;
-webkit-mask-repeat: no-repeat;
}
-:is(.admonition):is(.bug) {
+:is(.admonition):is(.admonish-bug) {
border-color: #f50057;
}
-:is(.bug) > :is(.admonition-title, summary) {
+:is(.admonish-bug) > :is(.admonition-title, summary.admonition-title) {
background-color: rgba(245, 0, 87, 0.1);
}
-:is(.bug) > :is(.admonition-title, summary)::before {
+:is(.admonish-bug) > :is(.admonition-title, summary.admonition-title)::before {
background-color: #f50057;
- mask-image: var(--md-admonition-icon--bug);
- -webkit-mask-image: var(--md-admonition-icon--bug);
+ mask-image: var(--md-admonition-icon--admonish-bug);
+ -webkit-mask-image: var(--md-admonition-icon--admonish-bug);
mask-repeat: no-repeat;
-webkit-mask-repeat: no-repeat;
mask-size: contain;
-webkit-mask-repeat: no-repeat;
}
-:is(.admonition):is(.example) {
+:is(.admonition):is(.admonish-example) {
border-color: #7c4dff;
}
-:is(.example) > :is(.admonition-title, summary) {
+:is(.admonish-example) > :is(.admonition-title, summary.admonition-title) {
background-color: rgba(124, 77, 255, 0.1);
}
-:is(.example) > :is(.admonition-title, summary)::before {
+:is(.admonish-example)
+ > :is(.admonition-title, summary.admonition-title)::before {
background-color: #7c4dff;
- mask-image: var(--md-admonition-icon--example);
- -webkit-mask-image: var(--md-admonition-icon--example);
+ mask-image: var(--md-admonition-icon--admonish-example);
+ -webkit-mask-image: var(--md-admonition-icon--admonish-example);
mask-repeat: no-repeat;
-webkit-mask-repeat: no-repeat;
mask-size: contain;
-webkit-mask-repeat: no-repeat;
}
-:is(.admonition):is(.quote, .cite) {
+:is(.admonition):is(.admonish-quote, .admonish-cite) {
border-color: #9e9e9e;
}
-:is(.quote, .cite) > :is(.admonition-title, summary) {
+:is(.admonish-quote, .admonish-cite)
+ > :is(.admonition-title, summary.admonition-title) {
background-color: rgba(158, 158, 158, 0.1);
}
-:is(.quote, .cite) > :is(.admonition-title, summary)::before {
+:is(.admonish-quote, .admonish-cite)
+ > :is(.admonition-title, summary.admonition-title)::before {
background-color: #9e9e9e;
- mask-image: var(--md-admonition-icon--quote);
- -webkit-mask-image: var(--md-admonition-icon--quote);
+ mask-image: var(--md-admonition-icon--admonish-quote);
+ -webkit-mask-image: var(--md-admonition-icon--admonish-quote);
mask-repeat: no-repeat;
-webkit-mask-repeat: no-repeat;
mask-size: contain;