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
This commit is contained in:
jdlrobson 2020-05-26 10:38:24 -07:00 committed by Jdlrobson
parent fbdda96d22
commit d49eb1e0ff
4 changed files with 14 additions and 16 deletions

View File

@ -9,11 +9,11 @@
emphasized-sidebar-action data-emphasized-sidebar-action For displaying an emphasized action in the sidebar.
}}
<div id="mw-panel">
<div id="mw-panel" class="mw-sidebar">
{{#data-portals-first}}{{>Menu}}{{/data-portals-first}}
{{#data-emphasized-sidebar-action}}
<div class="vector-emphasized-sidebar-action">
<a class="vector-emphasized-sidebar-action-link" title="{{title}}" href="{{href}}">{{text}}</a>
<div class="mw-sidebar-action">
<a class="mw-sidebar-action-link" title="{{title}}" href="{{href}}">{{text}}</a>
</div>
{{/data-emphasized-sidebar-action}}
{{#array-portals-rest}}{{>Menu}}{{/array-portals-rest}}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -21,7 +21,6 @@
@import 'Sidebar.less';
@import 'SidebarLogo.less';
@import 'Footer.less';
@import 'EmphasizedSidebarAction.less';
}
// Support: IE8