summaryrefslogtreecommitdiffstats
path: root/src/theme/css/general.css
diff options
context:
space:
mode:
authorMichael Howell <michael@notriddle.com>2023-09-08 13:14:54 -0700
committerMichael Howell <michael@notriddle.com>2023-09-08 13:17:21 -0700
commit65dae11e470450bddbe8451e7c3b5d27ca01f30a (patch)
tree02a249dbcdccab1a4395ce48249bc276d788ff23 /src/theme/css/general.css
parentd5b1676216229e176a4a7efcca048e340a0c96ad (diff)
Add `.warning` class for doc author use
This is designed to be compatible with rustdoc's version, in https://github.com/rust-lang/rust/pull/106561
Diffstat (limited to 'src/theme/css/general.css')
-rw-r--r--src/theme/css/general.css23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/theme/css/general.css b/src/theme/css/general.css
index 7e746d27..e7d20da7 100644
--- a/src/theme/css/general.css
+++ b/src/theme/css/general.css
@@ -156,6 +156,29 @@ blockquote {
border-block-end: .1em solid var(--quote-border);
}
+.warning {
+ margin: 20px;
+ padding: 0 20px;
+ border-inline-start: 2px solid var(--warning-border);
+}
+
+.warning:before {
+ position: absolute;
+ width: 3rem;
+ height: 3rem;
+ margin-inline-start: calc(-1.5rem - 21px);
+ content: "ⓘ";
+ text-align: center;
+ background-color: var(--bg);
+ color: var(--warning-border);
+ font-weight: bold;
+ font-size: 2rem;
+}
+
+blockquote .warning:before {
+ background-color: var(--quote-bg);
+}
+
kbd {
background-color: var(--table-border-color);
border-radius: 4px;