Merge "Allow sidebar to be slightly smaller"

This commit is contained in:
jenkins-bot 2024-06-08 04:30:52 +00:00 committed by Gerrit Code Review
commit 58e577c3a4
3 changed files with 11 additions and 19 deletions

View file

@ -21,7 +21,7 @@
@opacity-mid: 0.8;
@specialpage-separation-unit: 0.7em;
@specialpage-sidebar-width: 20em;
@specialpage-sidebar-width: 15em;
@specialpage-sidebar-max-width: 20em;
@specialpage-main-width: 20em;

View file

@ -27,13 +27,8 @@
}
}
&-table {
display: table;
width: 100%;
}
&-row {
display: table-row;
display: flex;
}
&-cell {
@ -42,7 +37,7 @@
}
&.oo-ui-iconElement &-icon {
width: 1em;
min-width: 1em;
.oo-ui-iconElement-icon {
position: relative;
@ -50,21 +45,22 @@
}
&-title {
padding: 0;
width: 100%;
align-items: center;
display: flex;
flex: 1;
line-height: 1em;
min-width: 0;
padding: 0;
&-label {
display: inline-block;
// Sidebar width - icon width - twice padding - counter average width
max-width: calc( @specialpage-sidebar-width - 1.865em - 2 * @specialpage-separation-unit - 2em );
display: block;
// Truncate text with ellipsis.
.text-overflow( @visible: false );
}
}
&-count {
width: 1em;
min-width: 1em;
}
&-label-count {

View file

@ -51,11 +51,7 @@
// Initialization
this.$element
.addClass( 'mw-echo-ui-pageNotificationsOptionWidget' )
.append(
$( '<div>' )
.addClass( 'mw-echo-ui-pageNotificationsOptionWidget-table' )
.append( $row )
);
.append( $row );
if ( this.getIcon() ) {
$row.prepend(