Jump to content

Template:Dfn/css: Difference between revisions

From Philosophical Research
css - from wikidata experiment, originally posted 2026-01-14T11:06Z
 
test on this wiki - close to finished but not quite
Line 1: Line 1:
<pre>/* ==UserStyle==
/* ==UserStyle==
@name          wikidata hue test
@name          wikidata hue test 2
@namespace      github.com/openstyles/stylus
@namespace      github.com/openstyles/stylus
@version        1.0.0
@version        1.0.0
Line 7: Line 7:
==/UserStyle== */
==/UserStyle== */


dfn.hue-term, dfn.hue-term .a, dfn.hue-term a, dfn.hue-term .figure, dfn.hue-term .figure.after { position: relative; }
.mw-body-content p dfn.hue-term ins, .mw-body-content p dfn.hue-term .wave-score { display: none; }
dfn.hue-term { display: inline-block; font-style: normal; padding: 0.07em 0.2em; z-index: -1; }
.mw-body-content p mark.hue { background: transparent; border: none; display: inline-block; } /* mark tag is being used for semantics / activating hue rules, not for displaying highlighter itself */
dfn.hue-term a { color: inherit; z-index: 4; }  dfn.hue-term .a { z-index: 2; }
 
p dfn.hue-term, p dfn.hue-term .a, p dfn.hue-term a, p dfn.hue-term .figure, p dfn.hue-term .figure.after { position: relative; }
.mw-body-content p dfn.hue-term { display: inline-block; font-style: normal; padding: 0.07em 0.2em; }


dfn.hue-term:before {
dfn.hue-term:before {
Line 16: Line 18:
}
}


dfn.hue-term .figure {
.mw-body-content p dfn.hue-term.manual .figure {
  display: inline-block; vertical-align: middle;  bottom: 0.1em; z-index: 3;
  display: inline-block; vertical-align: middle;  bottom: 0.1em;
  width: 1em; height: 1em; margin: 0 0.20em 0 0; padding: 0 0;
  width: 1em; height: 1em; margin: 0 0.20em 0 0; padding: 0 0;
  background: inherit; border: 1px solid var(--border-color-base,#a2a9b1);
  background: inherit; border: 1px solid var(--border-color-base,#a2a9b1);
}
}
dfn.hue-term .figure.after { background: transparent; border: none; display: inline; padding: 0 0 0 0.25em; }
dfn.hue-term abbr.figure.after, dfn.hue-term .figure.after ins { text-decoration: none; z-index: 4; }
dfn.hue-term .figure.after small { opacity: 0.6; font-size: 75%; }
.hue .field_internal { border-color:#909090; background:#d3d3d3 }
.hue .field_geo { border-color:#60a096; background:#b0e0e6 }
.hue .field_nations { border-color:#ae8847; background:#ddb887 }
.hue .field_exstruct { border-color:#4969e9; background:#afcce6 }
.hue .field_trotsky { border-color:#b71a0a; background:#fd9920 }
.hue .field_gramsci { border-color:#7e2b42; background:#f589a7 }
.hue .field_ML { border-color:#820212; background:#c24252 }
.hue .field_mdem { border-color:#5330ab; background:#9370db }
.hue .field_anarchy { border-color:#3f3b3b; background:#7f7f8e }
.hue .field_fantasy { border-color:#40ae50; background:#90ee90 }
.hue .field_horror { border-color:#305e00; background:#509e40 }
.hue.field_LGBT .field_LGBT { border-color:#1b3671; background:#a399f2 }
.hue .number_empty, .hue .field_horror.element_empty, .hue .field_geo.element_empty { border-color:transparent; background:#404040 }


/* TTS pronunciations - separate */
p dfn.hue-term .figure.after { background: transparent; border: none; display: inline; padding: 0 0 0 0.25em; }
.tts .aural { display: inline-block; width: 0; height: 0; overflow: hidden; }
p dfn.hue-term abbr.figure.after, p dfn.hue-term .figure.after ins { text-decoration: none; z-index: 4; }
.tts .help, dfn.hue-term .help { display: none; }</pre>
p dfn.hue-term .figure.after small { opacity: 0.6; font-size: 75%; }

Revision as of 12:38, 2 February 2026

/* ==UserStyle== @name wikidata hue test 2 @namespace github.com/openstyles/stylus @version 1.0.0 @description A new userstyle @author Me ==/UserStyle== */

.mw-body-content p dfn.hue-term ins, .mw-body-content p dfn.hue-term .wave-score { display: none; } .mw-body-content p mark.hue { background: transparent; border: none; display: inline-block; } /* mark tag is being used for semantics / activating hue rules, not for displaying highlighter itself */

p dfn.hue-term, p dfn.hue-term .a, p dfn.hue-term a, p dfn.hue-term .figure, p dfn.hue-term .figure.after { position: relative; } .mw-body-content p dfn.hue-term { display: inline-block; font-style: normal; padding: 0.07em 0.2em; }

dfn.hue-term:before {

content: " "; display: block; width: 100%; height: 100%; position: absolute; z-index: 0; left: 0; top: 0;
background: rgba(255,255,255,0.7);

}

.mw-body-content p dfn.hue-term.manual .figure {

display: inline-block; vertical-align: middle;  bottom: 0.1em;
width: 1em; height: 1em; margin: 0 0.20em 0 0; padding: 0 0;
background: inherit; border: 1px solid var(--border-color-base,#a2a9b1);

}

p dfn.hue-term .figure.after { background: transparent; border: none; display: inline; padding: 0 0 0 0.25em; } p dfn.hue-term abbr.figure.after, p dfn.hue-term .figure.after ins { text-decoration: none; z-index: 4; } p dfn.hue-term .figure.after small { opacity: 0.6; font-size: 75%; }