From 58bab74eab887b7c5521681d34c7559c4dff65fa Mon Sep 17 00:00:00 2001 From: alistair3149 Date: Mon, 6 May 2024 13:48:29 -0400 Subject: [PATCH] =?UTF-8?q?feat(core):=20=E2=9C=A8=20switch=20all=20icons?= =?UTF-8?q?=20to=20OOUI=20module?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Custom icons are no longer needed. This should reduce an extra ResourceLoader module registration. --- resources/skins.citizen.icons/backToTop.svg | 4 ---- .../skins.citizen.icons/wmui/collapse.svg | 7 ------ resources/skins.citizen.icons/wmui/edit.svg | 4 ---- .../components/TableOfContents.less | 22 +++---------------- skin.json | 12 ++-------- templates/TableOfContents.mustache | 1 + 6 files changed, 6 insertions(+), 44 deletions(-) delete mode 100644 resources/skins.citizen.icons/backToTop.svg delete mode 100644 resources/skins.citizen.icons/wmui/collapse.svg delete mode 100644 resources/skins.citizen.icons/wmui/edit.svg diff --git a/resources/skins.citizen.icons/backToTop.svg b/resources/skins.citizen.icons/backToTop.svg deleted file mode 100644 index 041f7bb92..000000000 --- a/resources/skins.citizen.icons/backToTop.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/resources/skins.citizen.icons/wmui/collapse.svg b/resources/skins.citizen.icons/wmui/collapse.svg deleted file mode 100644 index cc1857c41..000000000 --- a/resources/skins.citizen.icons/wmui/collapse.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - collapse - - - diff --git a/resources/skins.citizen.icons/wmui/edit.svg b/resources/skins.citizen.icons/wmui/edit.svg deleted file mode 100644 index 1826ba931..000000000 --- a/resources/skins.citizen.icons/wmui/edit.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/resources/skins.citizen.styles/components/TableOfContents.less b/resources/skins.citizen.styles/components/TableOfContents.less index 6318106ad..6f08c7108 100644 --- a/resources/skins.citizen.styles/components/TableOfContents.less +++ b/resources/skins.citizen.styles/components/TableOfContents.less @@ -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 ); diff --git a/skin.json b/skin.json index 7f6fc94c4..484ad364b 100644 --- a/skin.json +++ b/skin.json @@ -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", diff --git a/templates/TableOfContents.mustache b/templates/TableOfContents.mustache index 6a406a4be..a67b3849b 100644 --- a/templates/TableOfContents.mustache +++ b/templates/TableOfContents.mustache @@ -18,6 +18,7 @@