Merge identical styles in MediaWiki style sheet

To avoid code duplication and to make this easier to read and to
maintain.

Bug: T307188
Change-Id: I01ccdb7aecae6c80e7924250afdf0d7fafb486e2
This commit is contained in:
Thiemo Kreuz 2022-06-14 09:48:27 +02:00
parent 574ceba9bf
commit c8c140b33d

View file

@ -7,9 +7,9 @@
.cm-mw-matching { background-color: #ffd700; }
.cm-mw-skipformatting { background-color: #adf; }
.cm-mw-list { color: #0076dd; font-weight: bold; }
.cm-mw-doubleUnderscore, .cm-mw-signature, .cm-mw-hr { color: #0076dd; font-weight: bold; background-color: #eee; }
.cm-mw-list,
.cm-mw-indenting { color: #0076dd; font-weight: bold; }
.cm-mw-doubleUnderscore, .cm-mw-signature, .cm-mw-hr { color: #0076dd; font-weight: bold; background-color: #eee; }
.cm-mw-mnemonic { color: #14866d; }
.cm-mw-comment { color: #72777d; font-weight: normal; }
.cm-mw-apostrophes-bold, .cm-mw-apostrophes-italic { color: #0076dd; }
@ -25,38 +25,31 @@ pre.CodeMirror-line-like.cm-mw-section-2 {
line-height: 1.2em;
}
pre.CodeMirror-line.cm-mw-section-3,
pre.CodeMirror-line-like.cm-mw-section-3 {
font-weight: bold;
}
pre.CodeMirror-line-like.cm-mw-section-3,
pre.CodeMirror-line.cm-mw-section-4,
pre.CodeMirror-line-like.cm-mw-section-4 {
font-weight: bold;
}
pre.CodeMirror-line-like.cm-mw-section-4,
pre.CodeMirror-line.cm-mw-section-5,
pre.CodeMirror-line-like.cm-mw-section-5 {
font-weight: bold;
}
pre.CodeMirror-line-like.cm-mw-section-5,
pre.CodeMirror-line.cm-mw-section-6,
pre.CodeMirror-line-like.cm-mw-section-6 {
font-weight: bold;
}
.cm-mw-section-header { color: #0076dd; font-weight: normal; }
.cm-mw-template { color: #80c; font-weight: normal; }
.cm-mw-template-name { color: #80c; font-weight: bold; }
.cm-mw-template-name-mnemonic { font-weight: normal; }
.cm-mw-template-argument-name { color: #80c; font-weight: bold; }
.cm-mw-template-delimiter { color: #80c; font-weight: bold; }
.cm-mw-template-name,
.cm-mw-template-argument-name,
.cm-mw-template-delimiter,
.cm-mw-template-bracket { color: #80c; font-weight: bold; }
.cm-mw-templatevariable { color: #ac6600; font-weight: normal; }
.cm-mw-templatevariable-name { color: #ac6600; font-weight: bold; }
.cm-mw-templatevariable,
.cm-mw-templatevariable-bracket { color: #ac6600; font-weight: normal; }
.cm-mw-templatevariable-name,
.cm-mw-templatevariable-delimiter { color: #ac6600; font-weight: bold; }
.cm-mw-parserfunction { font-weight: normal; }
.cm-mw-parserfunction-name { color: #d33; font-weight: bold; }
.cm-mw-parserfunction-bracket { color: #d33; font-weight: bold; }
.cm-mw-parserfunction-name,
.cm-mw-parserfunction-bracket,
.cm-mw-parserfunction-delimiter { color: #d33; font-weight: bold; }
pre.CodeMirror-line.cm-mw-exttag,
@ -64,43 +57,39 @@ pre.CodeMirror-line-like.cm-mw-exttag {
background-color: rgba( 119, 0, 170, 0.02 );
}
.cm-mw-exttag { background-color: rgba( 119, 0, 170, 0.04 ); }
.cm-mw-exttag-name { color: #14866d; font-weight: bold; }
.cm-mw-exttag-bracket { color: #14866d; font-weight: normal; }
.cm-mw-exttag-attribute { color: #14866d; font-weight: normal; }
.cm-mw-exttag-name,
.cm-mw-htmltag-name { color: #14866d; font-weight: bold; }
.cm-mw-htmltag-bracket { color: #14866d; font-weight: normal; }
.cm-mw-exttag-bracket,
.cm-mw-exttag-attribute,
.cm-mw-htmltag-bracket,
.cm-mw-htmltag-attribute { color: #14866d; font-weight: normal; }
pre.CodeMirror-line.cm-mw-tag-pre,
pre.CodeMirror-line-like.cm-mw-tag-pre,
.cm-mw-tag-pre {
background-color: rgba( 0, 0, 0, 0.04 );
}
.cm-mw-tag-pre,
pre.CodeMirror-line.cm-mw-tag-nowiki,
pre.CodeMirror-line-like.cm-mw-tag-nowiki,
.cm-mw-tag-nowiki {
background-color: rgba( 0, 0, 0, 0.04 );
}
.cm-mw-link { color: #0076dd; font-weight: normal; }
.cm-mw-link-pagename { color: #000aaa; font-weight: normal; }
.cm-mw-link-tosection { color: #0076dd; font-weight: normal; }
.cm-mw-link-bracket { color: #000aaa; font-weight: normal; }
/* .cm-mw-link-text { } */
.cm-mw-link-delimiter { color: #000aaa; font-weight: normal; }
.cm-mw-extlink, .cm-mw-free-extlink { color: #000aaa; font-weight: normal; }
.cm-mw-extlink-protocol, .cm-mw-free-extlink-protocol { color: #000aaa; font-weight: bold; }
/* .cm-mw-extlink-text { } */
.cm-mw-link,
.cm-mw-link-tosection,
.cm-mw-section-header { color: #0076dd; font-weight: normal; }
.cm-mw-link-pagename,
.cm-mw-link-bracket,
.cm-mw-link-delimiter,
.cm-mw-extlink,
.cm-mw-free-extlink { color: #000aaa; font-weight: normal; }
.cm-mw-extlink-protocol,
.cm-mw-free-extlink-protocol,
.cm-mw-extlink-bracket { color: #000aaa; font-weight: bold; }
.cm-mw-table-bracket { color: #d08; font-weight: bold; }
.cm-mw-table-bracket,
.cm-mw-table-delimiter { color: #d08; font-weight: bold; }
.cm-mw-table-definition { color: #d08; font-weight: normal; }
.cm-mw-table-caption { font-weight: bold; }
/* .cm-mw-template-ground {} */
.cm-mw-template2-ground { background-color: rgba( 170, 17, 17, 0.04 ); }
.cm-mw-template3-ground { background-color: rgba( 170, 17, 17, 0.08 ); }
.cm-mw-template-ext-ground { background-color: rgba( 119, 0, 170, 0.04 ); }
@ -110,6 +99,7 @@ pre.CodeMirror-line-like.cm-mw-tag-nowiki,
.cm-mw-template-ext-link-ground { background-color: rgba( 77, 9, 162, 0.08 ); }
.cm-mw-template-ext2-link-ground { background-color: rgba( 91, 6, 164, 0.12 ); }
.cm-mw-template-ext3-link-ground { background-color: rgba( 98, 4, 166, 0.16 ); }
.cm-mw-template2-ext-ground { background-color: rgba( 145, 9, 94, 0.08 ); }
.cm-mw-template2-ext2-ground { background-color: rgba( 136, 6, 119, 0.12 ); }
.cm-mw-template2-ext3-ground { background-color: rgba( 132, 4, 132, 0.16 ); }
@ -117,6 +107,7 @@ pre.CodeMirror-line-like.cm-mw-tag-nowiki,
.cm-mw-template2-ext-link-ground { background-color: rgba( 108, 11, 113, 0.12 ); }
.cm-mw-template2-ext2-link-ground { background-color: rgba( 111, 9, 128, 0.16 ); }
.cm-mw-template2-ext3-link-ground { background-color: rgba( 112, 7, 136, 0.2 ); }
.cm-mw-template3-ext-ground { background-color: rgba( 153, 11, 68, 0.12 ); }
.cm-mw-template3-ext2-ground { background-color: rgba( 145, 9, 94, 0.16 ); }
.cm-mw-template3-ext3-ground { background-color: rgba( 139, 7, 109, 0.2 ); }
@ -124,6 +115,7 @@ pre.CodeMirror-line-like.cm-mw-tag-nowiki,
.cm-mw-template3-ext-link-ground { background-color: rgba( 123, 13, 89, 0.16 ); }
.cm-mw-template3-ext2-link-ground { background-color: rgba( 122, 10, 105, 0.2 ); }
.cm-mw-template3-ext3-link-ground { background-color: rgba( 122, 9, 116, 0.24 ); }
.cm-mw-ext-ground { background-color: rgba( 119, 0, 170, 0.04 ); }
.cm-mw-ext2-ground { background-color: rgba( 119, 0, 170, 0.08 ); }
.cm-mw-ext3-ground { background-color: rgba( 119, 0, 170, 0.12 ); }