refactor: simplify unnessecary selectors

This commit is contained in:
alistair3149 2022-04-27 14:43:02 -04:00
parent b9b795ff11
commit 7e068dd4b1
No known key found for this signature in database
GPG key ID: 94D081060FD3DD9C
2 changed files with 39 additions and 48 deletions

View file

@ -55,6 +55,11 @@
&-subheading {
display: flex;
align-items: center;
// Right-align the editsection
.mw-headline {
flex-grow: 1;
}
}
&-collapsible {

View file

@ -15,54 +15,7 @@
color: var( --color-base--subtle );
}
#mw-content-text {
.mw-parser-output {
& > h1,
& > h2,
& > h3,
& > h4,
& > h5,
& > h6 {
display: flex;
align-items: center;
}
.mw-editsection {
display: flex;
margin-left: auto;
a {
.resource-loader-icon-link-small;
padding: @margin-side / 4;
background: 0 !important; // Cancel above styles
opacity: var( --opacity-icon-base );
text-indent: -9999px; // Hide text
transition: @transition-opacity-quick;
&:before {
.resource-loader-icon;
display: block;
background-size: contain;
}
&:hover {
opacity: var( --opacity-icon-base--hover );
}
&:active {
opacity: var( --opacity-icon-base--active );
}
}
> span {
display: none;
}
}
}
}
.citizen-body,
.mw-body-content {
.citizen-body {
h1,
h2,
h3,
@ -128,6 +81,39 @@
transition: @transition-transform-quick;
}
}
.mw-editsection {
display: flex;
margin-left: 4px;
float: right; // Can't target the container so have to use to float
a {
.resource-loader-icon-link-small;
padding: @margin-side / 4;
background: 0 !important; // Cancel above styles
opacity: var( --opacity-icon-base );
text-indent: -9999px; // Hide text
transition: @transition-opacity-quick;
&:before {
.resource-loader-icon;
display: block;
background-size: contain;
}
&:hover {
opacity: var( --opacity-icon-base--hover );
}
&:active {
opacity: var( --opacity-icon-base--active );
}
}
> span {
display: none;
}
}
}
.center {