jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/405815 )
Change subject: Use child selectors for menuLayout
......................................................................
Use child selectors for menuLayout
Prevents broken layouts when menus are nested.
Bug: T185544
Change-Id: I1795fcefeac22d728aa7a716f7e23f87fff1bef0
---
M src/styles/layouts/IndexLayout.less
M src/styles/layouts/MenuLayout.less
2 files changed, 13 insertions(+), 12 deletions(-)
Approvals:
Bartosz Dziewoński: Looks good to me, approved
jenkins-bot: Verified
diff --git a/src/styles/layouts/IndexLayout.less
b/src/styles/layouts/IndexLayout.less
index d791499..9d905d0 100644
--- a/src/styles/layouts/IndexLayout.less
+++ b/src/styles/layouts/IndexLayout.less
@@ -1,19 +1,20 @@
@import '../common';
.oo-ui-indexLayout {
- > .oo-ui-menuLayout-menu {
+ /* Use two classes to ensure increased specificity over menuLayout */
+ &.oo-ui-menuLayout > .oo-ui-menuLayout-menu {
height: auto;
}
&.oo-ui-menuLayout-expanded {
- > .oo-ui-menuLayout-menu {
+ &.oo-ui-menuLayout > .oo-ui-menuLayout-menu {
height: 3em;
// Because the height is hardcoded, we have to disallow
wrapping of the tabs,
// as they would overlap the content. They'll scroll
horizontally instead.
white-space: nowrap;
}
- > .oo-ui-menuLayout-content {
+ &.oo-ui-menuLayout > .oo-ui-menuLayout-content {
top: 3em;
}
}
diff --git a/src/styles/layouts/MenuLayout.less
b/src/styles/layouts/MenuLayout.less
index 474d0d0..19270af 100644
--- a/src/styles/layouts/MenuLayout.less
+++ b/src/styles/layouts/MenuLayout.less
@@ -7,14 +7,14 @@
bottom: 0;
&-expanded,
- &-expanded .oo-ui-menuLayout-menu,
- &-expanded .oo-ui-menuLayout-content {
+ &-expanded > .oo-ui-menuLayout-menu,
+ &-expanded > .oo-ui-menuLayout-content {
position: absolute;
}
// If anything overflows out of the menu, display it on top of the
content,
// as it's probably some important interactive widget.
- &-expanded .oo-ui-menuLayout-menu {
+ &-expanded > .oo-ui-menuLayout-menu {
z-index: 1;
}
@@ -24,27 +24,27 @@
display: table;
width: 100%;
- .oo-ui-menuLayout-menu,
- .oo-ui-menuLayout-content {
+ > .oo-ui-menuLayout-menu,
+ > .oo-ui-menuLayout-content {
display: table-cell;
vertical-align: top;
}
}
}
- &-menu,
- &-content {
+ > .oo-ui-menuLayout-menu,
+ > .oo-ui-menuLayout-content {
.oo-ui-transition( all 200ms ease );
}
// These are overridden with 'auto' or '0' later
- &-menu {
+ > .oo-ui-menuLayout-menu {
height: 18em;
width: 18em;
}
// These are overridden with 'auto' or '0' later
- &-content {
+ > .oo-ui-menuLayout-content {
top: 18em;
left: 18em;
right: 18em;
--
To view, visit https://gerrit.wikimedia.org/r/405815
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I1795fcefeac22d728aa7a716f7e23f87fff1bef0
Gerrit-PatchSet: 2
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Esanders <[email protected]>
Gerrit-Reviewer: Bartosz Dziewoński <[email protected]>
Gerrit-Reviewer: VolkerE <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits