mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CodeMirror
synced 2024-11-14 17:55:07 +00:00
Merge "Convert MediaWiki style sheet to LESS code"
This commit is contained in:
commit
e341cc8ad8
|
@ -73,7 +73,7 @@
|
|||
"ext.CodeMirror.mode.mediawiki": {
|
||||
"scripts": "mode/mediawiki/mediawiki.js",
|
||||
"styles": [
|
||||
"mode/mediawiki/mediawiki.css",
|
||||
"mode/mediawiki/mediawiki.less",
|
||||
"mode/mediawiki/colorblind-colors.less"
|
||||
],
|
||||
"dependencies": [
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
block-opening-brace-newline-after, block-closing-brace-space-after */
|
||||
|
||||
/*
|
||||
* This style sheet overrides colors in mediawiki.css
|
||||
* This style sheet overrides colors in mediawiki.less
|
||||
* with more colorblind-friendly colors.
|
||||
*/
|
||||
|
||||
|
|
|
@ -2,6 +2,17 @@
|
|||
block-closing-brace-space-after, declaration-block-single-line-max-declarations,
|
||||
declaration-block-semicolon-newline-after, selector-list-comma-newline-after */
|
||||
|
||||
@template-background-color: #a11;
|
||||
@ext-background-color: #70a;
|
||||
@link-background-color: #219;
|
||||
|
||||
.ground( @template: 0, @ext: 0, @link: 0 ) {
|
||||
@template-shade: fade( @template-background-color, 4% * @template );
|
||||
@ext-shade: fade( @ext-background-color, 4% * @ext );
|
||||
@link-shade: fade( @link-background-color, 4% * @link );
|
||||
background-color: average( average( @template-shade, @ext-shade ), @link-shade );
|
||||
}
|
||||
|
||||
.cm-mw-pagename { text-decoration: underline; }
|
||||
|
||||
.cm-mw-matching { background-color: #ffd700; }
|
||||
|
@ -54,9 +65,9 @@ pre.CodeMirror-line-like.cm-mw-section-6 {
|
|||
|
||||
pre.CodeMirror-line.cm-mw-exttag,
|
||||
pre.CodeMirror-line-like.cm-mw-exttag {
|
||||
background-color: rgba( 119, 0, 170, 0.02 );
|
||||
.ground( @ext: 0.5 );
|
||||
}
|
||||
.cm-mw-exttag { background-color: rgba( 119, 0, 170, 0.04 ); }
|
||||
.cm-mw-exttag { .ground( @ext: 1 ); }
|
||||
.cm-mw-exttag-name,
|
||||
.cm-mw-htmltag-name { color: #14866d; font-weight: bold; }
|
||||
.cm-mw-exttag-bracket,
|
||||
|
@ -90,39 +101,39 @@ pre.CodeMirror-line-like.cm-mw-tag-nowiki,
|
|||
.cm-mw-table-definition { color: #d08; font-weight: normal; }
|
||||
.cm-mw-table-caption { font-weight: bold; }
|
||||
|
||||
.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 ); }
|
||||
.cm-mw-template-ext2-ground { background-color: rgba( 119, 0, 170, 0.08 ); }
|
||||
.cm-mw-template-ext3-ground { background-color: rgba( 119, 0, 170, 0.12 ); }
|
||||
.cm-mw-template-link-ground { background-color: rgba( 34, 17, 153, 0.04 ); }
|
||||
.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-ground { .ground( @template: 1 ); }
|
||||
.cm-mw-template3-ground { .ground( @template: 2 ); }
|
||||
.cm-mw-template-ext-ground { .ground( @ext: 1 ); }
|
||||
.cm-mw-template-ext2-ground { .ground( @ext: 2 ); }
|
||||
.cm-mw-template-ext3-ground { .ground( @ext: 3 ); }
|
||||
.cm-mw-template-link-ground { .ground( @link: 1 ); }
|
||||
.cm-mw-template-ext-link-ground { .ground( @ext: 1, @link: 1 ); }
|
||||
.cm-mw-template-ext2-link-ground { .ground( @ext: 2, @link: 1 ); }
|
||||
.cm-mw-template-ext3-link-ground { .ground( @ext: 3, @link: 1 ); }
|
||||
|
||||
.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 ); }
|
||||
.cm-mw-template2-link-ground { background-color: rgba( 102, 17, 85, 0.08 ); }
|
||||
.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-template2-ext-ground { .ground( @template: 1, @ext: 1 ); }
|
||||
.cm-mw-template2-ext2-ground { .ground( @template: 1, @ext: 2 ); }
|
||||
.cm-mw-template2-ext3-ground { .ground( @template: 1, @ext: 3 ); }
|
||||
.cm-mw-template2-link-ground { .ground( @template: 1, @link: 1 ); }
|
||||
.cm-mw-template2-ext-link-ground { .ground( @template: 1, @ext: 1, @link: 1 ); }
|
||||
.cm-mw-template2-ext2-link-ground { .ground( @template: 1, @ext: 2, @link: 1 ); }
|
||||
.cm-mw-template2-ext3-link-ground { .ground( @template: 1, @ext: 3, @link: 1 ); }
|
||||
|
||||
.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 ); }
|
||||
.cm-mw-template3-link-ground { background-color: rgba( 125, 17, 62, 0.12 ); }
|
||||
.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-template3-ext-ground { .ground( @template: 2, @ext: 1 ); }
|
||||
.cm-mw-template3-ext2-ground { .ground( @template: 2, @ext: 2 ); }
|
||||
.cm-mw-template3-ext3-ground { .ground( @template: 2, @ext: 3 ); }
|
||||
.cm-mw-template3-link-ground { .ground( @template: 2, @link: 1 ); }
|
||||
.cm-mw-template3-ext-link-ground { .ground( @template: 2, @ext: 1, @link: 1 ); }
|
||||
.cm-mw-template3-ext2-link-ground { .ground( @template: 2, @ext: 2, @link: 1 ); }
|
||||
.cm-mw-template3-ext3-link-ground { .ground( @template: 2, @ext: 3, @link: 1 ); }
|
||||
|
||||
.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 ); }
|
||||
.cm-mw-ext-link-ground { background-color: rgba( 34, 17, 153, 0.04 ); }
|
||||
.cm-mw-ext2-link-ground { background-color: rgba( 77, 9, 162, 0.08 ); }
|
||||
.cm-mw-ext3-link-ground { background-color: rgba( 91, 6, 164, 0.12 ); }
|
||||
.cm-mw-link-ground { background-color: rgba( 34, 17, 153, 0.04 ); }
|
||||
.cm-mw-ext-ground { .ground( @ext: 1 ); }
|
||||
.cm-mw-ext2-ground { .ground( @ext: 2 ); }
|
||||
.cm-mw-ext3-ground { .ground( @ext: 3 ); }
|
||||
.cm-mw-ext-link-ground { .ground( @link: 1 ); }
|
||||
.cm-mw-ext2-link-ground { .ground( @ext: 1, @link: 1 ); }
|
||||
.cm-mw-ext3-link-ground { .ground( @ext: 2, @link: 1 ); }
|
||||
.cm-mw-link-ground { .ground( @link: 1 ); }
|
||||
|
||||
.cm-mw-matchingbracket {
|
||||
background-color: #eee;
|
Loading…
Reference in a new issue