Group and nest stylesheets now they are .less files

Change-Id: Iedd9748cf9f38847ef4553459d533a67a0950645
This commit is contained in:
thiemowmde 2024-01-21 15:59:20 +01:00
parent 80c8eaf3ce
commit 16711d681b
6 changed files with 89 additions and 87 deletions

View file

@ -4,11 +4,11 @@
.mw-cite-up-arrow-backlink {
display: none;
}
:target .mw-cite-up-arrow-backlink {
:target & {
display: inline;
}
}
:target .mw-cite-up-arrow {
display: none;

View file

@ -10,15 +10,17 @@
/* Upstream bug in stylelint makes it complain aboout the case of 'mw-Ref' */
.mw-ref a {
/* With a group set */
.mw-ref a[ data-mw-group ]::after {
&[ data-mw-group ]::after {
content: '[' attr( data-mw-group ) ' ' counter( mw-Ref, decimal ) ']';
}
/* Without a group */
.mw-ref a::after {
&::after {
content: '[' counter( mw-Ref, decimal ) ']';
}
}
/* Hide the default rendering in browsers that support content
* generation by selecting for :after pseudo-element. */
@ -44,9 +46,8 @@ ol.mw-references {
* is the one that seems to be winning.
**/
counter-reset: mw-ref-extends-parent mw-references list-item;
}
ol.mw-references > li {
> li {
/**
* We have 2 counters for Parsoid HTML for different functionality.
* Make sure both are incremented!
@ -59,6 +60,7 @@ ol.mw-references > li {
**/
counter-increment: mw-ref-extends-parent mw-references;
}
}
[ rel~='mw:referencedBy' ]::before {
content: '↑ ';
@ -66,9 +68,8 @@ ol.mw-references > li {
span[ rel~='mw:referencedBy' ] {
counter-reset: mw-ref-linkback -1;
}
span[ rel~='mw:referencedBy' ] a::before {
a::before {
counter-increment: mw-ref-linkback;
content: counter( mw-references, decimal ) '.' counter( mw-ref-linkback, decimal );
line-height: 1;
@ -76,14 +77,15 @@ span[ rel~='mw:referencedBy' ] a::before {
font-size: smaller; /* <sup> use in Cite */
}
span[ rel~='mw:referencedBy' ] a::after {
a::after {
content: ' '; /* default separator outside <sup> */
line-height: 1;
}
span[ rel~='mw:referencedBy' ] a:last-child::after {
a:last-child::after {
content: '';
}
}
/* Hide the default rendering in browsers that support content
* generation by selecting for ::after pseudo-element. */

View file

@ -11,19 +11,19 @@
-moz-column-width: 30em;
column-width: 30em;
margin-top: 0.3em;
}
/* Lines first column up nicely. */
.mw-parser-output .mw-references-columns .references {
.mw-parser-output & .references {
margin-top: 0;
}
/* Avoid elements from breaking between columns */
.mw-references-columns li {
li {
-webkit-column-break-inside: avoid;
page-break-inside: avoid;
break-inside: avoid-column;
}
}
ol.references {
/**
@ -34,9 +34,8 @@ ol.references {
* Make sure both are reset!
**/
counter-reset: mw-ref-extends-parent mw-references list-item;
}
ol.references > li {
> li {
/**
* We have 2 counters for Parsoid HTML for different functionality.
* Make sure both are incremented!
@ -45,10 +44,11 @@ ol.references > li {
counter-reset: mw-ref-extends-child;
}
ol.references .mw-extended-references {
.mw-extended-references {
list-style: none;
margin-left: 2em;
}
}
.mw-extended-references > li::before {
counter-increment: mw-ref-extends-child;
@ -81,9 +81,8 @@ sup.reference:target {
font-weight: bold;
/* For the case that the error is embedded in an element with a different direction */
unicode-bidi: embed;
}
.mw-ext-cite-error code {
code {
/* As code is inheriting `#f8f9fa` as background color from `code`,
we need to increase contrast, by setting it to `transparent`. See T247903. */
background-color: transparent;
@ -91,6 +90,7 @@ sup.reference:target {
/* Reduce inherited `padding` to make code fit in better in Resources list. */
padding: 1px 2px;
}
}
/* @noflip */
.mw-cite-dir-ltr .reference-text {

View file

@ -40,12 +40,12 @@
user-select: none;
pointer-events: none;
}
}
.ve-ce-mwReferencesListNode-highlight {
&-highlight {
.ve-ce-surface-highlights-focused & {
background: transparent;
pointer-events: none;
box-shadow: inset 0 0 0 1px #4c76ac, 0 0 0 2px #4c76ac;
}
}
}

View file

@ -18,7 +18,7 @@
word-wrap: break-word;
overflow-wrap: break-word;
& + .ve-ui-mwReferenceContextItem-muted {
+ .ve-ui-mwReferenceContextItem-muted {
margin-top: 0.5em;
}
}

View file

@ -9,20 +9,20 @@
position: relative;
padding: 1em;
border-bottom: 1px solid #eaecf0;
}
.ve-ui-mwReferenceResultWidget:last-child {
&:last-child {
border-bottom: 0;
}
.ve-ui-mwReferenceResultWidget.oo-ui-labelElement .oo-ui-labelElement-label {
&.oo-ui-labelElement .oo-ui-labelElement-label {
white-space: normal;
}
.ve-ui-mwReferenceResultWidget-shield {
&-shield {
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
}
}