From d49eb1e0ffadeccbe4b6db82ca578e257c1bbb30 Mon Sep 17 00:00:00 2001 From: jdlrobson Date: Tue, 26 May 2020 10:38:24 -0700 Subject: [PATCH] Merge EmphasizedSidebarAction.less into Sidebar.less The opt in link is part of the sidebar in the current modern version of vector. The legacy sidebar has been split out and frozen. For this reason I think it makes sense to move the styles for the button into the sidebar stylesheet. The class name is renamed to reflect the hierarchy. We are not using BEM but we are using hyphens to describe location so the newly proposed names `mw-sidebar` and `mw-sidebar-action` seem more applicable than the previous generic class names. This doesn't impact caching given anonymous users cannot see the opt in/out link. Change-Id: I2991e941592a0678f40c73bb6daeab71ada6b7c3 --- includes/templates/Sidebar.mustache | 6 +++--- .../skins.vector.styles/EmphasizedSidebarAction.less | 12 ------------ resources/skins.vector.styles/Sidebar.less | 11 +++++++++++ resources/skins.vector.styles/index.less | 1 - 4 files changed, 14 insertions(+), 16 deletions(-) delete mode 100644 resources/skins.vector.styles/EmphasizedSidebarAction.less diff --git a/includes/templates/Sidebar.mustache b/includes/templates/Sidebar.mustache index 85a491aa7..dab64228e 100644 --- a/includes/templates/Sidebar.mustache +++ b/includes/templates/Sidebar.mustache @@ -9,11 +9,11 @@ emphasized-sidebar-action data-emphasized-sidebar-action For displaying an emphasized action in the sidebar. }} -
+
{{#data-portals-first}}{{>Menu}}{{/data-portals-first}} {{#data-emphasized-sidebar-action}} -
- {{text}} + {{/data-emphasized-sidebar-action}} {{#array-portals-rest}}{{>Menu}}{{/array-portals-rest}} diff --git a/resources/skins.vector.styles/EmphasizedSidebarAction.less b/resources/skins.vector.styles/EmphasizedSidebarAction.less deleted file mode 100644 index 44375b42b..000000000 --- a/resources/skins.vector.styles/EmphasizedSidebarAction.less +++ /dev/null @@ -1,12 +0,0 @@ -@import '../../variables.less'; - -.vector-emphasized-sidebar-action { - // Align with the portal heading/links - // `.portal` + `.portal .body` - margin: 8px @margin-end-portal 8px @margin-start-portal + @margin-start-portal-body; -} - -.vector-emphasized-sidebar-action-link { - font-size: @font-size-portal-list-item; - font-weight: bold; -} diff --git a/resources/skins.vector.styles/Sidebar.less b/resources/skins.vector.styles/Sidebar.less index 9c4e5d146..d01d8e1cd 100644 --- a/resources/skins.vector.styles/Sidebar.less +++ b/resources/skins.vector.styles/Sidebar.less @@ -1,2 +1,13 @@ @import '../../variables.less'; @import 'legacy/Sidebar.less'; + +.mw-sidebar-action { + // Align with the portal heading/links + // `.portal` + `.portal .body` + margin: 8px @margin-end-portal 8px @margin-start-portal + @margin-start-portal-body; +} + +.mw-sidebar-action-link { + font-size: @font-size-portal-list-item; + font-weight: bold; +} diff --git a/resources/skins.vector.styles/index.less b/resources/skins.vector.styles/index.less index 43aa67ec4..78690c61a 100644 --- a/resources/skins.vector.styles/index.less +++ b/resources/skins.vector.styles/index.less @@ -21,7 +21,6 @@ @import 'Sidebar.less'; @import 'SidebarLogo.less'; @import 'Footer.less'; - @import 'EmphasizedSidebarAction.less'; } // Support: IE8