feat(core): ✨ migrate misc icons to use RIL icon module
这个提交包含在:
父节点
6e3727f8f3
当前提交
2d014694a6
|
@ -1,9 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" id="svg10" width="20" height="20" viewBox="0 0 20 20">
|
||||
<title id="title2">
|
||||
ellipsis
|
||||
</title>
|
||||
<circle id="circle4" cx="-10" cy="10" r="2" transform="rotate(-90)"/>
|
||||
<circle id="circle6" cx="-17" cy="10" r="2" transform="rotate(-90)"/>
|
||||
<circle id="circle8" cx="-3" cy="10" r="2" transform="rotate(-90)"/>
|
||||
</svg>
|
之前 宽度: | 高度: | 大小: 420 B |
|
@ -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>
|
||||
language
|
||||
</title>
|
||||
<path d="M20 18h-1.44a.61.61 0 0 1-.4-.12.81.81 0 0 1-.23-.31L17 15h-5l-1 2.54a.77.77 0 0 1-.22.3.59.59 0 0 1-.4.14H9l4.55-11.47h1.89zm-3.53-4.31L14.89 9.5a11.62 11.62 0 0 1-.39-1.24q-.09.37-.19.69l-.19.56-1.58 4.19zm-6.3-1.58a13.43 13.43 0 0 1-2.91-1.41 11.46 11.46 0 0 0 2.81-5.37H12V4H7.31a4 4 0 0 0-.2-.56C6.87 2.79 6.6 2 6.6 2l-1.47.5s.4.89.6 1.5H0v1.33h2.15A11.23 11.23 0 0 0 5 10.7a17.19 17.19 0 0 1-5 2.1q.56.82.87 1.38a23.28 23.28 0 0 0 5.22-2.51 15.64 15.64 0 0 0 3.56 1.77zM3.63 5.33h4.91a8.11 8.11 0 0 1-2.45 4.45 9.11 9.11 0 0 1-2.46-4.45z"/>
|
||||
</svg>
|
之前 宽度: | 高度: | 大小: 722 B |
|
@ -360,9 +360,8 @@ function initPref( window ) {
|
|||
if ( typeof window.mw !== 'undefined' ) {
|
||||
const headerTools = document.querySelector( '.citizen-header__end' ),
|
||||
container = document.createElement( 'div' ),
|
||||
button = document.createElement( 'button' );
|
||||
|
||||
mw.loader.load( 'skins.citizen.icons.preferences' );
|
||||
button = document.createElement( 'button' ),
|
||||
icon = document.createElement( 'span' );
|
||||
|
||||
// citizen-pref
|
||||
container.id = CLASS;
|
||||
|
@ -370,11 +369,13 @@ function initPref( window ) {
|
|||
container.classList.add( CLASS, 'citizen-header__item' );
|
||||
button.id = CLASS + '-toggle';
|
||||
|
||||
button.classList.add( CLASS + '__button', 'citizen-header__button', 'citizen-header__button--icon' );
|
||||
button.classList.add( CLASS + '__button', 'citizen-header__button' );
|
||||
button.setAttribute( 'title', mw.message( 'preferences' ).text() );
|
||||
button.setAttribute( 'aria-label', mw.message( 'preferences' ).text() );
|
||||
button.setAttribute( 'aria-controls', CLASS + '-panel' );
|
||||
button.setAttribute( 'aria-expanded', false );
|
||||
icon.classList.add( 'citizen-ui-icon', 'mw-ui-icon-wikimedia-settings' );
|
||||
button.prepend( icon );
|
||||
container.prepend( button );
|
||||
headerTools.prepend( container );
|
||||
|
||||
|
|
|
@ -160,7 +160,7 @@
|
|||
}
|
||||
|
||||
@media ( hover: hover ) {
|
||||
.citizen-pref:hover .citizen-pref__button:after {
|
||||
.citizen-pref:hover .citizen-pref__button .citizen-ui-icon:before {
|
||||
transform: rotate3d( 0, 0, 1, 90deg );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -37,22 +37,16 @@
|
|||
// Pure CSS icons
|
||||
&Icon {
|
||||
overflow: hidden; // Sometimes CSS animation can clip
|
||||
width: var( --header-icon-size );
|
||||
height: var( --header-icon-size );
|
||||
}
|
||||
|
||||
// Background image icons
|
||||
&--icon:after {
|
||||
width: var( --header-icon-size );
|
||||
height: var( --header-icon-size );
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
background-size: contain;
|
||||
content: '';
|
||||
}
|
||||
|
||||
&Icon,
|
||||
&--icon:after {
|
||||
.citizen-ui-icon {
|
||||
width: var( --header-icon-size );
|
||||
height: var( --header-icon-size );
|
||||
}
|
||||
|
||||
&Icon,
|
||||
.citizen-ui-icon:before {
|
||||
opacity: var( --opacity-icon-base );
|
||||
transition: @transition-transform, @transition-opacity;
|
||||
}
|
||||
|
@ -60,8 +54,8 @@
|
|||
&:hover {
|
||||
background-color: var( --background-color-quiet--hover );
|
||||
|
||||
.citizen-header__buttonIcon,
|
||||
&.citizen-header__button--icon:after {
|
||||
.citizen-ui-icon:before,
|
||||
.citizen-header__buttonIcon {
|
||||
opacity: var( --opacity-icon-base--hover );
|
||||
}
|
||||
}
|
||||
|
@ -69,8 +63,8 @@
|
|||
&:active {
|
||||
background-color: var( --background-color-quiet--active );
|
||||
|
||||
.citizen-header__buttonIcon,
|
||||
&.citizen-header__button--icon:after {
|
||||
.citizen-ui-icon:before,
|
||||
.citizen-header__buttonIcon {
|
||||
opacity: var( --opacity-icon-base--active );
|
||||
}
|
||||
}
|
||||
|
@ -113,8 +107,7 @@
|
|||
|
||||
.skin-citizen-dark {
|
||||
.citizen-header__button {
|
||||
&Icon,
|
||||
&--icon:after {
|
||||
&Icon {
|
||||
filter: invert( 1 );
|
||||
}
|
||||
}
|
||||
|
@ -138,8 +131,7 @@
|
|||
&:hover {
|
||||
background-color: none;
|
||||
|
||||
.citizen-header__buttonIcon,
|
||||
&.citizen-header__button--icon:after {
|
||||
.citizen-header__buttonIcon {
|
||||
opacity: var( --opacity-icon-base );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
|
||||
// FIXME: This should not be here
|
||||
.citizen-ui-icon {
|
||||
display: block;
|
||||
width: var( --size-icon );
|
||||
height: var( --size-icon );
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
&:hover {
|
||||
background-color: var( --background-color-quiet--hover );
|
||||
|
||||
&:before {
|
||||
.citizen-ui-icon:before {
|
||||
opacity: var( --opacity-icon-base--hover );
|
||||
}
|
||||
}
|
||||
|
@ -29,7 +29,7 @@
|
|||
&:active {
|
||||
background-color: var( --background-color-quiet--active );
|
||||
|
||||
&:before {
|
||||
.citizen-ui-icon:before {
|
||||
opacity: var( --opacity-icon-base--active );
|
||||
}
|
||||
}
|
||||
|
@ -115,9 +115,7 @@
|
|||
|
||||
/* Non-WMUI icons */
|
||||
// See SkinHooks.php for why VE is here
|
||||
.page-actions__button:before,
|
||||
#ca-ve-edit > a:before,
|
||||
#citizen-languages__buttonCheckbox:before,
|
||||
.mw-portlet-tb .mw-list-item > a:before {
|
||||
width: var( --size-icon );
|
||||
height: var( --size-icon );
|
||||
|
@ -168,7 +166,7 @@
|
|||
~ .page-actions__button {
|
||||
background-color: var( --background-color-quiet--hover );
|
||||
|
||||
&:before {
|
||||
.citizen-ui-icon:before {
|
||||
opacity: var( --opacity-icon-base--hover );
|
||||
}
|
||||
}
|
||||
|
@ -178,7 +176,7 @@
|
|||
~ .page-actions__button {
|
||||
background-color: var( --background-color-quiet--active );
|
||||
|
||||
&:before {
|
||||
.citizen-ui-icon:before {
|
||||
opacity: var( --opacity-icon-base--active );
|
||||
}
|
||||
}
|
||||
|
@ -247,7 +245,6 @@
|
|||
|
||||
.skin-citizen-dark {
|
||||
#ca-ve-edit > a,
|
||||
.page-actions__button--icon,
|
||||
.mw-list-item > a {
|
||||
&:before {
|
||||
filter: invert( 1 );
|
||||
|
@ -305,7 +302,7 @@
|
|||
&:hover {
|
||||
background-color: none;
|
||||
|
||||
&:before {
|
||||
.citizen-ui-icon:before {
|
||||
opacity: var( --opacity-icon-base );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,7 +13,8 @@ a.feedlink {
|
|||
&-button {
|
||||
cursor: pointer;
|
||||
|
||||
> span {
|
||||
// Icons have to use span inside label elements
|
||||
> span:not( .citizen-ui-icon ) {
|
||||
.mixin-screen-reader-text;
|
||||
}
|
||||
}
|
||||
|
|
15
skin.json
15
skin.json
|
@ -286,9 +286,6 @@
|
|||
"rtl": "resources/skins.citizen.icons/toc-rtl.svg"
|
||||
}
|
||||
},
|
||||
"#citizen-userMenu__buttonCheckbox:after": "resources/skins.citizen.icons/shared/userAvatar.svg",
|
||||
"#citizen-languages__buttonCheckbox:before": "resources/skins.citizen.icons/shared/language.svg",
|
||||
"#page-actions-more__buttonCheckbox:before": "resources/skins.citizen.icons/more.svg",
|
||||
"#ca-ve-edit > a:before": "resources/skins.citizen.icons/shared/edit.svg",
|
||||
".mw-editsection > a:before": "resources/skins.citizen.icons/shared/edit.svg",
|
||||
".mw-editsection > a.mw-editsection-visualeditor + .mw-editsection-divider + a:before": "resources/skins.citizen.icons/shared/wikiText.svg",
|
||||
|
@ -356,7 +353,9 @@
|
|||
"speechBubbleAdd",
|
||||
"image",
|
||||
"search",
|
||||
"die"
|
||||
"die",
|
||||
"textLanguage",
|
||||
"ellipsis"
|
||||
]
|
||||
},
|
||||
"skins.citizen.icons.sections": {
|
||||
|
@ -366,14 +365,6 @@
|
|||
"images": {
|
||||
"collapse": "resources/skins.citizen.icons/shared/collapse.svg"
|
||||
}
|
||||
},
|
||||
"skins.citizen.icons.preferences": {
|
||||
"class": "ResourceLoaderImageModule",
|
||||
"selector": "#citizen-pref-{name}:after",
|
||||
"useDataURI": false,
|
||||
"images": {
|
||||
"toggle": "resources/skins.citizen.icons/shared/settings.svg"
|
||||
}
|
||||
}
|
||||
},
|
||||
"ResourceFileModulePaths": {
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
for="page-actions-more__checkbox"
|
||||
title="{{msg-citizen-actions-more-toggle}}"
|
||||
aria-hidden="true">
|
||||
<span class="citizen-ui-icon mw-ui-icon-wikimedia-ellipsis"></span>
|
||||
<span>{{msg-citizen-actions-more-toggle}}</span>
|
||||
</label>
|
||||
</div>
|
||||
|
|
|
@ -17,11 +17,12 @@
|
|||
</aside>
|
||||
<label
|
||||
id="citizen-languages__buttonCheckbox"
|
||||
class="mw-checkbox-hack-button page-actions__button page-actions__button--icon"
|
||||
class="mw-checkbox-hack-button page-actions__button"
|
||||
for="citizen-languages__checkbox"
|
||||
title="{{msg-citizen-languages-toggle}}"
|
||||
aria-hidden="true"
|
||||
data-counter-text="{{html-language-count}}">
|
||||
<span class="citizen-ui-icon mw-ui-icon-wikimedia-textLanguage"></span>
|
||||
<span>{{msg-citizen-languages-toggle}}</span>
|
||||
</label>
|
||||
</div>
|
|
@ -17,13 +17,13 @@
|
|||
<form action="{{form-action}}" role="search" id="searchform" class="citizen-search__card mw-checkbox-hack-target" autocomplete="off">
|
||||
<input type="hidden" name="title" value="{{page-title}}">
|
||||
<label class="screen-reader-text" for="searchInput">{{msg-search}}</label>
|
||||
<div class="citizen-ui-icon mw-ui-icon-wikimedia-search"></div>
|
||||
<span class="citizen-ui-icon mw-ui-icon-wikimedia-search"></span>
|
||||
{{{html-input}}}
|
||||
<a
|
||||
class="citizen-search__random"
|
||||
href="{{html-random-href}}"
|
||||
title="{{msg-randompage}}">
|
||||
<div class="citizen-ui-icon mw-ui-icon-wikimedia-die"></div>
|
||||
<span class="citizen-ui-icon mw-ui-icon-wikimedia-die"></span>
|
||||
<span class="screen-reader-text">{{msg-random}}</span>
|
||||
</a>
|
||||
</form>
|
||||
|
|
|
@ -17,10 +17,11 @@
|
|||
</aside>
|
||||
<label
|
||||
id="citizen-userMenu__buttonCheckbox"
|
||||
class="mw-checkbox-hack-button citizen-header__button citizen-header__button--icon"
|
||||
class="mw-checkbox-hack-button citizen-header__button"
|
||||
for="citizen-userMenu__checkbox"
|
||||
title="{{msg-citizen-usermenu-toggle}}"
|
||||
aria-hidden="true">
|
||||
<span class="citizen-ui-icon mw-ui-icon-wikimedia-userAvatar"></span>
|
||||
<span>{{msg-citizen-usermenu-toggle}}</span>
|
||||
</label>
|
||||
</div>
|
正在加载...
在新工单中引用