word: debugging stylesheet to colourise levels
authorMischa POSLAWSKY <perl@shiar.org>
Fri, 29 May 2020 02:07:26 +0000 (04:07 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Sat, 6 Jun 2020 01:49:20 +0000 (03:49 +0200)
word-debug.css [new file with mode: 0644]
word.plp

diff --git a/word-debug.css b/word-debug.css
new file mode 100644 (file)
index 0000000..cd58776
--- /dev/null
@@ -0,0 +1,75 @@
+figure:before {
+       content: '';
+       position: absolute;
+       width: 100%;
+       height: 100%;
+}
+.parent > figure:after {
+       content: '+';
+       position: absolute;
+       right: 0;
+       color: #FFF;
+       width: 1em;
+       line-height: 1em;
+       background: #0008;
+       border-radius: 1em;
+}
+
+/* essential = blue */
+.level0 > figure:before {
+       box-shadow: inset 0 0 1em #0FF;
+}
+
+/* basic = cyan */
+.level1 > figure {
+       filter: sepia(.8) hue-rotate(70deg) saturate(2);
+}
+.level1 > figure:before {
+       box-shadow: inset 0 0 1em #0F0;
+}
+.level1 > figure figcaption {
+       background: #080C;
+}
+
+/* common = green */
+.level2 > figure {
+       filter: sepia(.9) hue-rotate(45deg) saturate(2);
+}
+.level2 > figure:before {
+       box-shadow: inset 0 0 1em #FF0;
+}
+.level2 > figure figcaption {
+       background: #480C;
+}
+
+/* distinct = yellow */
+.level3 > figure {
+       filter: sepia(.9) hue-rotate(15deg) saturate(2);
+}
+.level3 > figure:before {
+       box-shadow: inset 0 0 1em #FC0;
+}
+.level3 > figure figcaption {
+       background: #880C;
+}
+
+/* rare = orange */
+.level4 > figure {
+       filter: sepia(.9) hue-rotate(-10deg) saturate(2);
+}
+.level4 > figure:before {
+       box-shadow: inset 0 0 2em #F80;
+}
+.level4 > figure figcaption {
+       background: #840C;
+}
+
+.level5 > figure {
+       filter: sepia(.9) hue-rotate(-40deg) saturate(2);
+}
+.level5 > figure:before {
+       box-shadow: inset 0 0 3em #F00;
+}
+.level5 > figure figcaption {
+       background: #800C;
+}
index ac596b5969d1de15d064dc77f9f22276451af8b1..5739731d6e8eed613b39c38439e1b8cb8e2f2142 100644 (file)
--- a/word.plp
+++ b/word.plp
@@ -63,6 +63,12 @@ figure:hover > figcaption {
 </style>
 EOT
 });
+
+if (exists $get{debug}) {
+       say '<style>';
+       include 'word-debug.css';
+       say '</style>';
+}
 :>
 <h1>Words</h1>