Avoid overflowing of unbreakable words in interwiki search results
[lhc/web/wiklou.git] / resources / src / mediawiki.special / mediawiki.special.search.interwikiwidget.styles.less
index 8d63902..3f23dc4 100644 (file)
@@ -1,11 +1,6 @@
 /* interwiki search results */
 /*==========================*/
 
-#mw-interwiki-results {
-       float: right;
-       width: 30%;
-}
-
 .iw-headline {
        font-weight: bold;
        font-size: 1rem;
@@ -25,6 +20,7 @@
        width: 100%;
        float: left;
        list-style-type: none;
+       word-break: break-word;
 }
 
 /* clearfix */
@@ -32,7 +28,7 @@
        visibility: hidden;
        display: block;
        font-size: 0;
-       content: " ";
+       content: ' ';
        clear: both;
        height: 0;
 }
@@ -76,7 +72,6 @@ to resemble a traditional dictionary definition */
 }
 
 .iw-result__title a.extiw {
-       color: #252525;
        font-weight: bold;
 }
 
@@ -84,7 +79,7 @@ to resemble a traditional dictionary definition */
        visibility: hidden;
        display: block;
        font-size: 0;
-       content: " ";
+       content: ' ';
        clear: both;
        height: 0;
 }
@@ -154,7 +149,7 @@ to resemble a traditional dictionary definition */
        left: 0;
        text-align: center;
        color: #fff;
-       text-shadow: 0 0 10px rgba( 0, 0, 0, 0.4 ); /* improves legibility on white background*/
+       text-shadow: 0 0 10px rgba( 0, 0, 0, 0.4 ); /* improves legibility on white background */
        font-size: 0.8em;
        padding: 5px;
        background-color: rgba( 0, 0, 0, 0.5 );
@@ -183,42 +178,20 @@ to resemble a traditional dictionary definition */
        text-align: right;
 }
 
-/* no results
-span the interwiki results across the bottom of the page.
-*/
+/* desktop only */
 
-.mw-search-nonefound ~ #mw-search-interwiki {
-       width: 100%;
-}
+@media only screen and ( min-width: @deviceWidthTablet ) {
 
-.mw-search-nonefound ~ #mw-search-interwiki .iw-resultset {
-       width: 30%;
-       max-width: 300px;
-       margin-left: 0.5em;
-       margin-right: 0.5em;
-}
-
-/* mobile */
-@media only screen and ( max-width: 768px ) {
        #mw-interwiki-results {
-               width: 100%;
-       }
-       .mw-search-results {
-               max-width: none !important;
+               width: 30%;
+               display: inline-block; /* used to align iw sidebar with the top of the main search results */
+               margin-left: 10%;
        }
-       .iw-resultset {
-               width: 45% !important;
-               margin-left: 0.5em !important;
-               margin-right: 0.5em !important;
+       .searchresults .mw-search-createlink,
+       .searchresults .mw-search-nonefound,
+       .searchresults .mw-search-results {
+               float: left;
+               width: 60%;
        }
 
 }
-
-@media only screen and ( max-width: 600px ) {
-       .iw-resultset {
-               width: 100% !important;
-               margin-left: 0 !important;
-               margin-right: 0 !important;
-               max-width: none !important;
-       }
-}