Move obvious Outline related CSS into own file

Should be a noop. Also moving one rule further up to the set of
similar selectors.

Removing one rule that was disabled for some time now.

Optimizations follow.

Change-Id: I8da70a52c13afd8ac1c3ff43bae63a203c3bf86a
This commit is contained in:
WMDE-Fisch 2022-07-07 22:05:09 +02:00
parent e635e70cca
commit 83c30099ec
3 changed files with 163 additions and 168 deletions

View file

@ -2157,7 +2157,8 @@
"modules/ve-mw/ui/styles/pages/ve.ui.MWAddParameterPage.less", "modules/ve-mw/ui/styles/pages/ve.ui.MWAddParameterPage.less",
"modules/ve-mw/ui/styles/pages/ve.ui.MWTemplatePage.css", "modules/ve-mw/ui/styles/pages/ve.ui.MWTemplatePage.css",
"modules/ve-mw/ui/styles/pages/ve.ui.MWTemplatePlaceholderPage.less", "modules/ve-mw/ui/styles/pages/ve.ui.MWTemplatePlaceholderPage.less",
"modules/ve-mw/ui/styles/widgets/ve.ui.MWTransclusionOutlineControlsWidget.less" "modules/ve-mw/ui/styles/widgets/ve.ui.MWTransclusionOutlineControlsWidget.less",
"modules/ve-mw/ui/styles/widgets/ve.ui.MWTransclusionOutlineWidget.less"
], ],
"skinStyles": { "skinStyles": {
"default": [ "default": [

View file

@ -21,20 +21,16 @@
display: none; display: none;
} }
.ve-ui-mwTransclusionOutlineTemplateWidget-sticky {
background-color: #fff;
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
position: sticky;
top: 0;
z-index: 1;
}
.ve-ui-mwTransclusionDialog-single-transclusion .ve-ui-mwTransclusionOutlineTemplateWidget-sticky { .ve-ui-mwTransclusionDialog-single-transclusion .ve-ui-mwTransclusionOutlineTemplateWidget-sticky {
margin-top: -8px; margin-top: -8px;
margin-bottom: 8px; margin-bottom: 8px;
padding-top: 8px; padding-top: 8px;
} }
.ve-ui-mwTransclusionDialog-single-transclusion .ve-ui-mwTransclusionOutline-no-template-parameters {
margin: 24px;
}
.ve-ui-mwTemplateDialog.ve-ui-mwTransclusionDialog-small-screen.ve-ui-mwTransclusionDialog-expanded .oo-ui-menuLayout > .oo-ui-menuLayout-menu { .ve-ui-mwTemplateDialog.ve-ui-mwTransclusionDialog-small-screen.ve-ui-mwTransclusionDialog-expanded .oo-ui-menuLayout > .oo-ui-menuLayout-menu {
border-right: 0; border-right: 0;
width: 100%; width: 100%;
@ -44,165 +40,6 @@
display: none; display: none;
} }
.ve-ui-mwTransclusionOutlinePartWidget {
margin-top: 24px;
margin-bottom: 24px;
}
.ve-ui-mwTransclusionOutlineButtonWidget {
margin-top: -10px;
}
.ve-ui-mwTransclusionOutlinePartWidget:first-child .ve-ui-mwTransclusionOutlineButtonWidget {
margin-top: -24px;
}
/* no margin for labels and wikitext */
.ve-ui-mwTransclusionOutlinePartWidget:last-child {
margin-bottom: -24px;
}
/* margin for last checkbox or text */
.ve-ui-mwTransclusionOutlinePartWidget:last-child .ve-ui-mwTransclusionOutlineParameterWidget:last-child,
.ve-ui-mwTransclusionOutlinePartWidget:last-child .ve-ui-mwTransclusionOutline-no-template-parameters {
margin-bottom: 48px;
}
.ve-ui-mwTransclusionOutlineWidget {
/* .oo-ui-window-head uses a 1px outline which overlaps the top pixel of the sidebar */
padding-top: 1px;
}
.ve-ui-mwTransclusionOutline-ariaHidden {
display: none;
}
.ve-ui-mwTransclusionOutline-no-template-parameters {
font-style: italic;
color: #72777d;
margin: 8px 24px 24px 24px;
}
.ve-ui-mwTransclusionDialog-single-transclusion .ve-ui-mwTransclusionOutline-no-template-parameters {
margin: 24px;
}
.ve-ui-mwTransclusionOutlineParameterSelectWidget:focus {
border-radius: 2px;
box-shadow: inset 0 0 0 1px #36c;
outline: 0;
}
.ve-ui-mwTransclusionOutlineParameterWidget {
overflow: hidden;
padding-bottom: 8px;
padding-left: 30px;
padding-top: 8px;
text-overflow: ellipsis;
white-space: nowrap;
}
.ve-ui-mwTransclusionOutlineParameterWidget.oo-ui-labelElement > .oo-ui-labelElement-label {
cursor: pointer;
display: inline;
}
/* TODO: Remove debug color */
.ve-ui-mwTransclusionOutlineParameterWidget.oo-ui-optionWidget-selected {
/* background-color: rgba( 0%, 100%, 0%, 0.2 ); */
}
.ve-ui-mwTransclusionOutlineParameterWidget.oo-ui-optionWidget-highlighted:hover,
.ve-ui-mwTransclusionOutlineParameterWidget.oo-ui-optionWidget-highlighted {
color: #36c;
background-color: #eaf3ff;
}
.ve-ui-mwTransclusionOutlineParameterSelectWidget:focus .ve-ui-mwTransclusionOutlineParameterWidget.oo-ui-optionWidget-highlighted,
.ve-ui-mwTransclusionOutlineParameterWidget:hover {
/* This shade on a white background results in #eaecf0 a.k.a. @background-color-base--hover
a.k.a. @wmui-color-base80 */
background-color: rgba( 0, 24, 73, 0.082 );
}
.ve-ui-mwTransclusionOutlineParameterWidget .oo-ui-checkboxInputWidget.oo-ui-widget-enabled [ type='checkbox' ]:hover + span {
/* Stronger :hover effect to make the different checkbox/label click regions more obvious */
border-width: 2px;
}
.ve-ui-mwTransclusionOutlineParameterWidget-hasValue {
font-weight: bold;
}
.ve-ui-mwTransclusionOutlineButtonWidget,
.ve-ui-mwTransclusionOutlineButtonWidget > .oo-ui-buttonElement-button {
display: block;
}
.ve-ui-mwTransclusionOutlineButtonWidget.oo-ui-buttonElement-frameless.oo-ui-labelElement.oo-ui-iconElement > .oo-ui-buttonElement-button {
overflow: hidden;
padding: 8px 0 8px 36px;
text-overflow: ellipsis;
}
/* selected */
.ve-ui-mwTransclusionOutlineButtonWidget.oo-ui-optionWidget-selected .oo-ui-buttonElement-button {
background-color: #eaf3ff;
}
/* hover */
.ve-ui-mwTransclusionOutlineButtonWidget.oo-ui-buttonElement-frameless.oo-ui-widget-enabled > .oo-ui-buttonElement-button:hover {
background-color: #eaecf0;
}
/* selected + hover */
.ve-ui-mwTransclusionOutlineButtonWidget.oo-ui-buttonElement-frameless.oo-ui-optionWidget-selected > .oo-ui-buttonElement-button:hover {
background-color: #eaf3ff;
color: #36c;
}
/* click */
.ve-ui-mwTransclusionOutlineButtonWidget.oo-ui-buttonElement-frameless.oo-ui-widget-enabled > .oo-ui-buttonElement-button:active,
.ve-ui-mwTransclusionOutlineParameterWidget:active {
/* Same as .oo-ui-optionWidget-pressed, a.k.a. @background-color-primary--hover */
background-color: rgba( 41, 98, 204, 0.1 );
color: #36c;
}
.ve-ui-mwTransclusionOutlineButtonWidget.oo-ui-buttonElement-frameless.oo-ui-iconElement:first-child {
margin-left: 0;
}
.ve-ui-mwTransclusionOutlineButtonWidget.oo-ui-buttonElement-frameless.oo-ui-iconElement > .oo-ui-buttonElement-button > .oo-ui-iconElement-icon {
left: 10px;
}
.ve-ui-mwTransclusionOutlineTemplateWidget-searchWidget {
margin: 8px 24px;
width: auto;
}
.ve-ui-mwTransclusionOutlineTemplateWidget-searchWidget:last-child {
/* Workaround to override oo-ui-inputWidget:last-child rule */
margin-right: 24px;
}
.ve-ui-mwTransclusionOutlineTemplateWidget-no-match {
font-style: italic;
color: #72777d;
margin: 8px 24px;
}
.ve-ui-mwTransclusionOutlineToggleUnusedWidget.oo-ui-buttonWidget {
margin: -4px 24px 0 24px;
}
.ve-ui-mwTransclusionOutlineToggleUnusedWidget .oo-ui-labelElement-label {
word-break: break-word;
word-wrap: break-word;
overflow-wrap: break-word;
white-space: normal;
}
.ve-ui-mwTransclusionDialog-floatingHelpElement { .ve-ui-mwTransclusionDialog-floatingHelpElement {
position: absolute; position: absolute;
right: 16px; right: 16px;

View file

@ -0,0 +1,157 @@
.ve-ui-mwTransclusionOutlineTemplateWidget-sticky {
background-color: #fff;
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
position: sticky;
top: 0;
z-index: 1;
}
.ve-ui-mwTransclusionOutlinePartWidget {
margin-top: 24px;
margin-bottom: 24px;
}
.ve-ui-mwTransclusionOutlineButtonWidget {
margin-top: -10px;
}
.ve-ui-mwTransclusionOutlinePartWidget:first-child .ve-ui-mwTransclusionOutlineButtonWidget {
margin-top: -24px;
}
/* no margin for labels and wikitext */
.ve-ui-mwTransclusionOutlinePartWidget:last-child {
margin-bottom: -24px;
}
/* margin for last checkbox or text */
.ve-ui-mwTransclusionOutlinePartWidget:last-child .ve-ui-mwTransclusionOutlineParameterWidget:last-child,
.ve-ui-mwTransclusionOutlinePartWidget:last-child .ve-ui-mwTransclusionOutline-no-template-parameters {
margin-bottom: 48px;
}
.ve-ui-mwTransclusionOutlineWidget {
/* .oo-ui-window-head uses a 1px outline which overlaps the top pixel of the sidebar */
padding-top: 1px;
}
.ve-ui-mwTransclusionOutline-ariaHidden {
display: none;
}
.ve-ui-mwTransclusionOutline-no-template-parameters {
font-style: italic;
color: #72777d;
margin: 8px 24px 24px 24px;
}
.ve-ui-mwTransclusionOutlineParameterSelectWidget:focus {
border-radius: 2px;
box-shadow: inset 0 0 0 1px #36c;
outline: 0;
}
.ve-ui-mwTransclusionOutlineParameterWidget {
overflow: hidden;
padding-bottom: 8px;
padding-left: 30px;
padding-top: 8px;
text-overflow: ellipsis;
white-space: nowrap;
}
.ve-ui-mwTransclusionOutlineParameterWidget.oo-ui-labelElement > .oo-ui-labelElement-label {
cursor: pointer;
display: inline;
}
.ve-ui-mwTransclusionOutlineParameterWidget.oo-ui-optionWidget-highlighted:hover,
.ve-ui-mwTransclusionOutlineParameterWidget.oo-ui-optionWidget-highlighted {
color: #36c;
background-color: #eaf3ff;
}
.ve-ui-mwTransclusionOutlineParameterSelectWidget:focus .ve-ui-mwTransclusionOutlineParameterWidget.oo-ui-optionWidget-highlighted,
.ve-ui-mwTransclusionOutlineParameterWidget:hover {
/* This shade on a white background results in #eaecf0 a.k.a. @background-color-base--hover
a.k.a. @wmui-color-base80 */
background-color: rgba( 0, 24, 73, 0.082 );
}
.ve-ui-mwTransclusionOutlineParameterWidget .oo-ui-checkboxInputWidget.oo-ui-widget-enabled [ type='checkbox' ]:hover + span {
/* Stronger :hover effect to make the different checkbox/label click regions more obvious */
border-width: 2px;
}
.ve-ui-mwTransclusionOutlineParameterWidget-hasValue {
font-weight: bold;
}
.ve-ui-mwTransclusionOutlineButtonWidget,
.ve-ui-mwTransclusionOutlineButtonWidget > .oo-ui-buttonElement-button {
display: block;
}
.ve-ui-mwTransclusionOutlineButtonWidget.oo-ui-buttonElement-frameless.oo-ui-labelElement.oo-ui-iconElement > .oo-ui-buttonElement-button {
overflow: hidden;
padding: 8px 0 8px 36px;
text-overflow: ellipsis;
}
/* selected */
.ve-ui-mwTransclusionOutlineButtonWidget.oo-ui-optionWidget-selected .oo-ui-buttonElement-button {
background-color: #eaf3ff;
}
/* hover */
.ve-ui-mwTransclusionOutlineButtonWidget.oo-ui-buttonElement-frameless.oo-ui-widget-enabled > .oo-ui-buttonElement-button:hover {
background-color: #eaecf0;
}
/* selected + hover */
.ve-ui-mwTransclusionOutlineButtonWidget.oo-ui-buttonElement-frameless.oo-ui-optionWidget-selected > .oo-ui-buttonElement-button:hover {
background-color: #eaf3ff;
color: #36c;
}
/* click */
.ve-ui-mwTransclusionOutlineButtonWidget.oo-ui-buttonElement-frameless.oo-ui-widget-enabled > .oo-ui-buttonElement-button:active,
.ve-ui-mwTransclusionOutlineParameterWidget:active {
/* Same as .oo-ui-optionWidget-pressed, a.k.a. @background-color-primary--hover */
background-color: rgba( 41, 98, 204, 0.1 );
color: #36c;
}
.ve-ui-mwTransclusionOutlineButtonWidget.oo-ui-buttonElement-frameless.oo-ui-iconElement:first-child {
margin-left: 0;
}
.ve-ui-mwTransclusionOutlineButtonWidget.oo-ui-buttonElement-frameless.oo-ui-iconElement > .oo-ui-buttonElement-button > .oo-ui-iconElement-icon {
left: 10px;
}
.ve-ui-mwTransclusionOutlineTemplateWidget-searchWidget {
margin: 8px 24px;
width: auto;
}
.ve-ui-mwTransclusionOutlineTemplateWidget-searchWidget:last-child {
/* Workaround to override oo-ui-inputWidget:last-child rule */
margin-right: 24px;
}
.ve-ui-mwTransclusionOutlineTemplateWidget-no-match {
font-style: italic;
color: #72777d;
margin: 8px 24px;
}
.ve-ui-mwTransclusionOutlineToggleUnusedWidget.oo-ui-buttonWidget {
margin: -4px 24px 0 24px;
}
.ve-ui-mwTransclusionOutlineToggleUnusedWidget .oo-ui-labelElement-label {
word-break: break-word;
word-wrap: break-word;
overflow-wrap: break-word;
white-space: normal;
}