feat(core): switch all icons to OOUI module

Custom icons are no longer needed. This should reduce
an extra ResourceLoader module registration.
This commit is contained in:
alistair3149 2024-05-06 13:48:29 -04:00
parent a81bf1fc16
commit 58bab74eab
No known key found for this signature in database
6 changed files with 6 additions and 44 deletions

View file

@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" style="enable-background:new 0 0 20 20" viewBox="0 0 20 20">
<path d="M1 3h18V1H1v2zm4 8h4v8h2v-8h4l-5-6-5 6z"/>
</svg>

Before

Width:  |  Height:  |  Size: 221 B

View file

@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20">
<title>
collapse
</title>
<path d="m2.5 15.25 7.5-7.5 7.5 7.5 1.5-1.5-9-9-9 9z"/>
</svg>

Before

Width:  |  Height:  |  Size: 217 B

View file

@ -1,4 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
<path d="m19.5 9.8 2.2-2.2c.4-.4.4-1.1 0-1.6L18 2.3c-.4-.4-1.1-.4-1.6 0l-2.2 2.2 5.3 5.3zm-6.4-4.1L2 16.7V22h5.3l11.1-11.1c-.1 0-5.3-5.2-5.3-5.2z"/>
</svg>

Before

Width:  |  Height:  |  Size: 280 B

View file

@ -1,4 +1,5 @@
.citizen-toc {
--size-icon: 1rem;
font-size: var( --font-size-small );
line-height: var( --line-height-xs );
@ -9,20 +10,8 @@
}
&__top {
&::before {
width: 0.875rem;
height: 0.875rem;
content: '';
filter: var( --filter-invert );
opacity: var( --opacity-icon-base );
}
&:hover::before {
opacity: var( --opacity-icon-base--hover );
}
&:active::before {
opacity: var( --opacity-icon-base--hover );
.citizen-ui-icon {
transform: rotate( 90deg );
}
}
@ -183,11 +172,6 @@
transform: none;
transform-origin: bottom left;
.citizen-ui-icon {
width: 1rem;
height: 1rem;
}
// The hover state colors are not great but it will do for now
&:hover {
background-color: var( --color-surface-3 );

View file

@ -52,8 +52,7 @@
],
"styles": [
"skins.citizen.styles",
"skins.citizen.icons",
"skins.citizen.icons.wmui"
"skins.citizen.icons"
],
"messages": [
"citizen-actions-more-toggle",
@ -278,14 +277,6 @@
]
},
"skins.citizen.icons": {
"class": "MediaWiki\\ResourceLoader\\ImageModule",
"selector": "{name}",
"defaultColor": "#000",
"images": {
".citizen-toc__top:before": "resources/skins.citizen.icons/backToTop.svg"
}
},
"skins.citizen.icons.wmui": {
"selectorWithoutVariant": ".mw-ui-icon-wikimedia-{name}:before",
"useDataURI": false,
"defaultColor": "#000",
@ -305,6 +296,7 @@
"edit",
"editLock",
"ellipsis",
"first",
"help",
"history",
"home",

View file

@ -18,6 +18,7 @@
</label>
<nav id="mw-panel-toc" class="citizen-toc__card citizen-menu-checkbox-target" role="navigation" aria-labelledby="mw-panel-toc-label">
<a class="citizen-toc__top citizen-toc__link" title="{{html-citizen-jumptotop}}" href="#top">
<div class="citizen-ui-icon mw-ui-icon-first mw-ui-icon-wikimedia-first"></div>
<div class="citizen-toc__text">{{msg-citizen-jumptotop}}</div>
</a>
<div class="citizen-toc__header">{{msg-toc}}</div>