From 4599e1f85357b5c63e08507c1b8496c569abfb71 Mon Sep 17 00:00:00 2001 From: Tatsuro YOKOTA Date: Sat, 26 Aug 2023 16:04:07 +0900 Subject: [PATCH] move part of pre to pre:has(code) --- koushu1/lesson2/formatE_tate/css/sample5-code.css | 8 +++++++- koushu1/lesson2/formatE_yoko/css/sample5-code.css | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/koushu1/lesson2/formatE_tate/css/sample5-code.css b/koushu1/lesson2/formatE_tate/css/sample5-code.css index 5d8ea44..8e53f79 100644 --- a/koushu1/lesson2/formatE_tate/css/sample5-code.css +++ b/koushu1/lesson2/formatE_tate/css/sample5-code.css @@ -6,17 +6,22 @@ code { } pre { - font-family: var(--code-font); white-space: pre-wrap; line-break: anywhere; text-spacing: none; font-size: 12Q; line-height: 18Q; +} + +pre:has(code) { + font-family: var(--code-font); + border: solid 0.5mm #585656; padding-block: 0.5mm; padding-inline: 1.5mm; margin-block: 6mm; margin-inline: 0; + /* background: repeating-linear-gradient(#eee 0, #eee 18Q, #fff 18Q, #fff 36Q); */ background-image: url("img/vs_pre_bg.png"); background-size: var(--page-body-width) 9mm; @@ -24,6 +29,7 @@ pre { background-position-y: 0.5mm; border-radius: 1mm; } + .codenum-elem { width: 2em; display: inline-block; diff --git a/koushu1/lesson2/formatE_yoko/css/sample5-code.css b/koushu1/lesson2/formatE_yoko/css/sample5-code.css index 5d8ea44..8e53f79 100644 --- a/koushu1/lesson2/formatE_yoko/css/sample5-code.css +++ b/koushu1/lesson2/formatE_yoko/css/sample5-code.css @@ -6,17 +6,22 @@ code { } pre { - font-family: var(--code-font); white-space: pre-wrap; line-break: anywhere; text-spacing: none; font-size: 12Q; line-height: 18Q; +} + +pre:has(code) { + font-family: var(--code-font); + border: solid 0.5mm #585656; padding-block: 0.5mm; padding-inline: 1.5mm; margin-block: 6mm; margin-inline: 0; + /* background: repeating-linear-gradient(#eee 0, #eee 18Q, #fff 18Q, #fff 36Q); */ background-image: url("img/vs_pre_bg.png"); background-size: var(--page-body-width) 9mm; @@ -24,6 +29,7 @@ pre { background-position-y: 0.5mm; border-radius: 1mm; } + .codenum-elem { width: 2em; display: inline-block;