mediawiki.widgets: Fix TitleOptionWidget styles
authorEd Sanders <esanders@wikimedia.org>
Sat, 3 Oct 2015 12:08:47 +0000 (13:08 +0100)
committerBartosz Dziewoński <matma.rex@gmail.com>
Sat, 3 Oct 2015 16:25:44 +0000 (16:25 +0000)
* Make the description display:block so ellipsis works
* Fix assumption that option is a child of titleWidget,
  instead make a child of titleWidget-menu.

Bug: T114565
Change-Id: I033c83b249c710b6a2a54889501174ad56d971ce

resources/src/mediawiki.widgets/mw.widgets.TitleWidget.less

index ecd0824..2eb8c55 100644 (file)
@@ -5,7 +5,7 @@
  * @license The MIT License (MIT); see LICENSE.txt
  */
 
-.mw-widget-titleWidget {
+.mw-widget-titleWidget-menu {
        .mw-widget-titleOptionWidget {
                line-height: normal;
 
@@ -14,7 +14,7 @@
                }
        }
 
-       &-menu-withImages {
+       &-withImages {
                .mw-widget-titleOptionWidget {
                        -webkit-box-sizing: border-box;
                        -moz-box-sizing: border-box;
                }
        }
 
-       &-menu-withDescriptions {
+       &-withDescriptions {
                .mw-widget-titleOptionWidget {
                        > .oo-ui-labelElement-label {
                                line-height: 1.5em;
                        }
 
                        &-description {
+                               display: block;
                                white-space: nowrap;
                                text-overflow: ellipsis;
                                overflow: hidden;
@@ -69,7 +70,7 @@
                }
        }
 
-       &:not(&-menu-withDescriptions) {
+       &:not(&-withDescriptions) {
                .mw-widget-titleOptionWidget-description {
                        display: none;
                }