mediawiki-skins-Citizen/resources/skins.citizen.styles/Pagetools.less
2022-05-10 22:17:12 -04:00

253 lines
4.3 KiB
Plaintext

.page-actions {
display: flex;
margin-left: -0.75rem; // To align with page padding
font-size: 0.875rem;
font-weight: 450;
gap: 0.25rem;
&-more {
display: block;
width: var( --size-icon );
height: var( --size-icon );
box-sizing: content-box;
padding: 0.5rem;
border-radius: var( --border-radius--medium );
cursor: pointer;
transition: @transition-opacity;
&-menu {
position: absolute;
z-index: -1;
right: var( --padding-page );
left: var( --padding-page );
overflow: auto;
max-height: 60vh;
padding-top: 0.3125rem;
margin-top: 0.3125rem;
cursor: auto; // reset cursor pointer set by parent
.citizen-card;
.citizen-card-hide( 100% 0 );
a {
.menu-item-link;
justify-content: space-between;
padding: 0.625rem 1.25rem;
&:after {
.resource-loader-list-icon;
margin-left: @icon-padding;
opacity: var( --opacity-icon-base );
}
&:hover {
.menu-item-link-hover;
&:after {
opacity: var( --opacity-icon-base--hover );
}
}
&:active {
.menu-item-link-active;
&:after {
opacity: var( --opacity-icon-base--active );
}
}
}
}
&:before {
display: block;
width: var( --size-icon );
height: var( --size-icon );
background-size: var( --size-icon );
content: '';
opacity: var( --opacity-icon-base );
}
&:hover {
.page-actions-more-menu {
z-index: 5;
.citizen-card-show;
}
}
&:active {
background: var( --background-color-quiet--active ) !important;
&:before {
opacity: var( --opacity-icon-base--active );
}
}
}
> .mw-portal,
> .mw-portlet {
ul {
display: flex;
gap: 0.25rem;
}
li > a {
display: flex;
align-items: center;
padding: 0.5rem 0.75rem;
border-radius: var( --border-radius--medium );
color: var( --color-base );
font-size: 0;
transition: @transition-background, @transition-color;
&:after {
width: var( --size-icon );
height: var( --size-icon );
order: -1; // Move icon before the text
background-position: center;
background-repeat: no-repeat;
background-size: var( --size-icon );
content: '';
opacity: var( --opacity-icon-base );
transition: @transition-opacity;
}
&:hover {
background-color: var( --background-color-quiet--hover );
color: var( --color-base--emphasized );
&:after {
opacity: var( --opacity-icon-base--hover );
}
}
&:active {
background-color: var( --background-color-quiet--active );
color: var( --color-base--subtle );
&:after {
opacity: var( --opacity-icon-base--active );
}
}
span {
.mixin-screen-reader-text;
}
}
}
ul {
margin: 0;
list-style: none;
}
li {
margin: 0;
}
}
#p-views {
// VE styles shouldn't be core but it is just a few lines :/
#ca-ve-edit {
order: 98; // Before source edit
> a {
padding-right: 1.5rem;
}
// Merge two buttons together
+ #ca-edit {
border-left: 1px solid var( --color-primary--hover );
margin-left: -1rem;
> a {
padding-left: 0.5rem;
border-radius: 0 var( --border-radius--medium ) var( --border-radius--medium ) 0;
font-size: 0; // hide edit source text
&:after {
margin-right: 0; // reset
}
}
}
}
#ca-edit {
order: 99; // Align to last
}
#ca-edit,
#ca-ve-edit {
> a {
background-color: var( --color-primary );
color: #fff;
&:after {
filter: invert( 1 );
// white icon
opacity: 1;
}
&:hover {
background-color: var( --color-primary--hover );
}
&:active {
background-color: var( --color-primary--active );
}
}
}
}
.skin-citizen-dark {
.page-actions {
&-more {
&:before {
filter: invert( 1 );
}
}
li > a:after {
filter: invert( 1 );
}
}
}
.citizen-animations-ready {
.page-actions-more-menu {
.citizen-card-transition();
}
}
@media ( min-width: @width-breakpoint-tablet ) {
.page-actions {
position: relative;
margin-right: 0;
&-more-menu {
right: 0;
left: unset;
min-width: 12rem;
}
> .mw-portal,
> .mw-portlet {
li > a {
font-size: 0.875rem;
&:after {
margin-right: 0.5rem;
}
}
}
}
}
@media ( hover: hover ) {
.page-actions-more:hover {
background: var( --background-color-quiet--hover );
&:before {
opacity: var( --opacity-icon-base--hover );
}
}
}