Move icons to RL image module and generate variants

Bug: T196050
Change-Id: Ie6acbeac3d74b99278b8d5b0db3ca1d349065d5e
This commit is contained in:
Ed Sanders 2018-06-02 21:56:49 +01:00
parent b8dbfe7d87
commit 9b2ba59ac9
2 changed files with 37 additions and 33 deletions

View file

@ -170,11 +170,11 @@
"ve-math/ve.ui.MWLatexDialog.css",
"ve-math/ve.ce.MWLatexNode.css",
"ve-math/ve.ui.MWLatexInspector.css",
"ve-math/ve.ui.MWLatexPage.css",
"ve-math/ve.ui.MWLatexIcons.css"
"ve-math/ve.ui.MWLatexPage.css"
],
"dependencies": [
"ext.visualEditor.mwcore",
"ext.math.visualEditor.icons",
"ext.math.styles"
],
"messages": [
@ -253,6 +253,41 @@
"dependencies": [
"ext.math.visualEditor.chemSymbolsData"
]
},
"ext.math.visualEditor.icons": {
"class": "ResourceLoaderImageModule",
"selectorWithoutVariant": ".oo-ui-icon-{name}",
"selectorWithVariant": ".oo-ui-image-{variant}.oo-ui-icon-{name}",
"variants": {
"progressive": {
"color": "#36c"
},
"invert": {
"color": "#fff"
}
},
"images": {
"math": {
"file": "ve-math/math.svg",
"variants": [ "progressive" ]
},
"math-display-block": {
"file": "ve-math/math-display-block.svg",
"variants": [ "invert" ]
},
"math-display-default": {
"file": "ve-math/math-display-default.svg",
"variants": [ "invert" ]
},
"math-display-inline": {
"file": "ve-math/math-display-inline.svg",
"variants": [ "invert" ]
},
"chem": {
"file": "ve-math/chem.svg",
"variants": [ "progressive" ]
}
}
}
},
"ResourceFileModulePaths": {

View file

@ -1,31 +0,0 @@
/*!
* VisualEditor UserInterface LaTeX icon styles.
*
* @copyright 2011-2015 VisualEditor Team and others; see AUTHORS.txt
* @license MIT
*/
.oo-ui-icon-math {
/* @embed */
background-image: url( math.svg );
}
.oo-ui-icon-math-display-block {
/* @embed */
background-image: url( math-display-block.svg );
}
.oo-ui-icon-math-display-default {
/* @embed */
background-image: url( math-display-default.svg );
}
.oo-ui-icon-math-display-inline {
/* @embed */
background-image: url( math-display-inline.svg );
}
.oo-ui-icon-chem {
/* @embed */
background-image: url( chem.svg );
}