2016-12-16 11:11:54 +00:00
|
|
|
@import 'mediawiki.mixins.less';
|
|
|
|
@import 'mediawiki.ui/variables';
|
2014-08-19 16:52:21 +00:00
|
|
|
|
2018-04-11 20:40:20 +00:00
|
|
|
// Code adapted from Yair Rand's NavPopupsRestyled.js
|
|
|
|
// https://en.wikipedia.org/wiki/User:Yair_rand/NavPopupsRestyled.js
|
|
|
|
//
|
|
|
|
// "Tall" terminology, although applied to the popup, refers only to the
|
|
|
|
// thumbnail and not the popup itself:
|
|
|
|
// Class Thumbnail Popup
|
|
|
|
// Tall Portrait Landscape
|
|
|
|
// Not tall Landscape Portrait
|
|
|
|
// Not tall Missing Landscape
|
2014-02-06 10:49:28 +00:00
|
|
|
|
2017-04-20 21:59:57 +00:00
|
|
|
@popupPadding: 16px;
|
2017-09-23 09:29:02 +00:00
|
|
|
@popupWidth: 320px;
|
2017-04-20 21:59:57 +00:00
|
|
|
@popupTallWidth: 215px;
|
|
|
|
@cogIconSize: 30px;
|
2017-05-31 20:13:36 +00:00
|
|
|
@lineHeight: 20px;
|
2017-04-20 21:59:57 +00:00
|
|
|
|
2018-04-23 21:07:51 +00:00
|
|
|
.mwe-popups-border-pokey-top( @size, @left, @color, @extra ) {
|
2014-02-28 03:53:13 +00:00
|
|
|
content: '';
|
|
|
|
position: absolute;
|
2014-11-18 10:20:55 +00:00
|
|
|
border: ( @size + @extra ) solid transparent;
|
2014-02-28 03:53:13 +00:00
|
|
|
border-top: 0;
|
2014-11-18 10:20:55 +00:00
|
|
|
border-bottom: ( @size + @extra ) solid @color;
|
2014-02-28 03:53:13 +00:00
|
|
|
top: -@size;
|
2014-03-28 18:27:42 +00:00
|
|
|
/* @noflip */
|
2014-02-28 03:53:13 +00:00
|
|
|
left: @left;
|
|
|
|
}
|
|
|
|
|
2018-04-23 21:07:51 +00:00
|
|
|
.mwe-popups-border-pokey-bottom( @size, @left, @color, @extra ) {
|
2014-04-30 11:13:05 +00:00
|
|
|
content: '';
|
|
|
|
position: absolute;
|
2014-11-18 10:20:55 +00:00
|
|
|
border: ( @size + @extra ) solid transparent;
|
2014-04-30 11:13:05 +00:00
|
|
|
border-bottom: 0;
|
2014-11-18 10:20:55 +00:00
|
|
|
border-top: ( @size + @extra ) solid @color;
|
2014-04-30 11:13:05 +00:00
|
|
|
bottom: -@size;
|
|
|
|
/* @noflip */
|
|
|
|
left: @left;
|
|
|
|
}
|
|
|
|
|
2014-02-06 10:49:28 +00:00
|
|
|
.mwe-popups {
|
2017-10-08 14:47:00 +00:00
|
|
|
background: #fff;
|
2014-02-06 10:49:28 +00:00
|
|
|
position: absolute;
|
2014-11-12 09:09:47 +00:00
|
|
|
z-index: 110;
|
2017-10-08 14:47:00 +00:00
|
|
|
.box-shadow( 0 30px 90px -20px rgba( 0, 0, 0, 0.3 ), 0 0 1px @colorGray10; );
|
2014-02-06 10:49:28 +00:00
|
|
|
padding: 0;
|
|
|
|
display: none;
|
2015-04-08 00:09:00 +00:00
|
|
|
font-size: 14px;
|
2017-05-31 20:13:36 +00:00
|
|
|
line-height: @lineHeight;
|
2014-02-06 10:49:28 +00:00
|
|
|
min-width: 300px;
|
2017-10-08 14:47:00 +00:00
|
|
|
border-radius: @borderRadius;
|
2014-02-06 10:49:28 +00:00
|
|
|
|
2018-03-19 18:24:38 +00:00
|
|
|
.mw-ui-icon {
|
|
|
|
// mw-ui-icon assumes a font size of 16px so we must declare it here
|
|
|
|
font-size: 16px;
|
|
|
|
margin: 21px 0 8px 0;
|
|
|
|
}
|
|
|
|
|
2016-11-29 12:14:38 +00:00
|
|
|
.mwe-popups-container {
|
2017-10-08 14:47:00 +00:00
|
|
|
color: @colorText;
|
2014-02-06 10:49:28 +00:00
|
|
|
margin-top: -9px;
|
|
|
|
padding-top: 9px;
|
2014-05-12 14:06:47 +00:00
|
|
|
text-decoration: none;
|
2014-02-06 10:49:28 +00:00
|
|
|
|
2016-11-29 12:14:38 +00:00
|
|
|
footer {
|
2017-04-20 21:59:57 +00:00
|
|
|
padding: @popupPadding;
|
2014-02-13 06:11:48 +00:00
|
|
|
margin: 0;
|
2015-04-17 07:20:50 +00:00
|
|
|
font-size: 10px;
|
2014-02-13 06:11:48 +00:00
|
|
|
position: absolute;
|
|
|
|
bottom: 0;
|
2014-03-28 18:27:42 +00:00
|
|
|
/* @noflip */
|
|
|
|
left: 0;
|
2014-02-06 10:49:28 +00:00
|
|
|
}
|
2014-06-17 11:08:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.mwe-popups-extract {
|
2017-03-06 18:46:36 +00:00
|
|
|
// T156800, T139297: "Pad" the extract horizontally using a margin so the
|
|
|
|
// SVG element is forced not to occlude the truncating pseudo-element and
|
|
|
|
// the settings cog in IE9-11.
|
2017-05-31 20:13:36 +00:00
|
|
|
margin: @popupPadding;
|
2017-03-06 18:46:36 +00:00
|
|
|
|
2014-06-17 11:08:05 +00:00
|
|
|
display: block;
|
2017-10-08 14:47:00 +00:00
|
|
|
color: @colorText;
|
2014-06-17 11:08:05 +00:00
|
|
|
text-decoration: none;
|
2016-11-25 07:45:38 +00:00
|
|
|
position: relative;
|
2014-06-17 11:08:05 +00:00
|
|
|
|
|
|
|
&:hover {
|
|
|
|
text-decoration: none;
|
|
|
|
}
|
2016-11-25 07:45:38 +00:00
|
|
|
|
|
|
|
&:after {
|
2016-12-16 11:11:54 +00:00
|
|
|
content: ' ';
|
2016-11-25 07:45:38 +00:00
|
|
|
position: absolute;
|
|
|
|
bottom: 0;
|
|
|
|
width: 25%;
|
2017-05-31 20:13:36 +00:00
|
|
|
height: @lineHeight;
|
2016-11-25 07:45:38 +00:00
|
|
|
background-color: transparent;
|
|
|
|
}
|
2017-01-19 03:58:16 +00:00
|
|
|
|
2017-03-20 14:41:14 +00:00
|
|
|
/* Stylelint rule broken for vendor prefixes: https://github.com/stylelint/stylelint/issues/1939 */
|
|
|
|
/* stylelint-disable function-linear-gradient-no-nonstandard-direction */
|
2018-02-04 22:09:45 +00:00
|
|
|
&[ dir='ltr' ]:after {
|
2017-02-26 14:58:52 +00:00
|
|
|
/* @noflip */
|
2017-01-19 03:58:16 +00:00
|
|
|
right: 0;
|
2017-03-17 21:56:54 +00:00
|
|
|
/* @noflip */
|
2017-02-27 11:32:40 +00:00
|
|
|
background-image: -webkit-linear-gradient( to right, rgba( 255, 255, 255, 0 ), rgba( 255, 255, 255, 1 ) 50% );
|
2017-03-17 21:56:54 +00:00
|
|
|
/* @noflip */
|
2017-02-27 11:32:40 +00:00
|
|
|
background-image: -moz-linear-gradient( to right, rgba( 255, 255, 255, 0 ), rgba( 255, 255, 255, 1 ) 50% );
|
2017-03-17 21:56:54 +00:00
|
|
|
/* @noflip */
|
2017-02-27 11:32:40 +00:00
|
|
|
background-image: -o-linear-gradient( to right, rgba( 255, 255, 255, 0 ), rgba( 255, 255, 255, 1 ) 50% );
|
2017-03-17 21:56:54 +00:00
|
|
|
/* @noflip */
|
2017-02-27 11:32:40 +00:00
|
|
|
background-image: linear-gradient( to right, rgba( 255, 255, 255, 0 ), rgba( 255, 255, 255, 1 ) 50% );
|
2017-01-19 03:58:16 +00:00
|
|
|
}
|
|
|
|
|
2018-02-04 22:09:45 +00:00
|
|
|
&[ dir='rtl' ]:after {
|
2017-02-26 14:58:52 +00:00
|
|
|
/* @noflip */
|
2017-01-19 03:58:16 +00:00
|
|
|
left: 0;
|
2017-03-17 21:56:54 +00:00
|
|
|
/* @noflip */
|
2017-02-27 11:32:40 +00:00
|
|
|
background-image: -webkit-linear-gradient( to left, rgba( 255, 255, 255, 0 ), rgba( 255, 255, 255, 1 ) 50% );
|
2017-03-17 21:56:54 +00:00
|
|
|
/* @noflip */
|
2017-02-27 11:32:40 +00:00
|
|
|
background-image: -moz-linear-gradient( to left, rgba( 255, 255, 255, 0 ), rgba( 255, 255, 255, 1 ) 50% );
|
2017-03-17 21:56:54 +00:00
|
|
|
/* @noflip */
|
2017-02-27 11:32:40 +00:00
|
|
|
background-image: -o-linear-gradient( to left, rgba( 255, 255, 255, 0 ), rgba( 255, 255, 255, 1 ) 50% );
|
2017-03-17 21:56:54 +00:00
|
|
|
/* @noflip */
|
2017-02-27 11:32:40 +00:00
|
|
|
background-image: linear-gradient( to left, rgba( 255, 255, 255, 0 ), rgba( 255, 255, 255, 1 ) 50% );
|
2017-01-19 03:58:16 +00:00
|
|
|
}
|
2017-03-20 14:41:14 +00:00
|
|
|
/* stylelint-enable function-linear-gradient-no-nonstandard-direction */
|
2017-06-20 20:11:22 +00:00
|
|
|
|
2017-06-30 18:49:15 +00:00
|
|
|
// Make the text fit in exactly as many lines as we want.
|
2017-06-20 20:11:22 +00:00
|
|
|
p {
|
|
|
|
margin: 0;
|
|
|
|
}
|
2017-06-30 18:49:15 +00:00
|
|
|
ul,
|
|
|
|
ol,
|
|
|
|
li,
|
|
|
|
dl,
|
|
|
|
dd,
|
|
|
|
dt {
|
|
|
|
margin-top: 0;
|
|
|
|
margin-bottom: 0;
|
|
|
|
}
|
2014-02-06 10:49:28 +00:00
|
|
|
}
|
|
|
|
|
2017-03-17 10:41:57 +00:00
|
|
|
svg {
|
|
|
|
overflow: hidden;
|
|
|
|
}
|
|
|
|
|
2014-02-18 07:00:50 +00:00
|
|
|
&.mwe-popups-is-tall {
|
2014-02-06 10:49:28 +00:00
|
|
|
width: 450px;
|
2014-02-18 07:00:50 +00:00
|
|
|
|
2014-06-17 11:08:05 +00:00
|
|
|
> div > a > svg {
|
2017-02-16 20:40:47 +00:00
|
|
|
vertical-align: middle;
|
2014-02-24 08:12:21 +00:00
|
|
|
}
|
|
|
|
|
2014-02-18 07:00:50 +00:00
|
|
|
.mwe-popups-extract {
|
2017-04-20 21:59:57 +00:00
|
|
|
width: @popupTallWidth;
|
2017-06-14 14:22:02 +00:00
|
|
|
height: 9 * @lineHeight;
|
2014-02-18 07:00:50 +00:00
|
|
|
overflow: hidden;
|
2014-03-28 18:27:42 +00:00
|
|
|
/* @noflip */
|
|
|
|
float: left;
|
|
|
|
}
|
|
|
|
|
2014-09-03 03:49:15 +00:00
|
|
|
footer {
|
2017-04-20 21:59:57 +00:00
|
|
|
width: @popupTallWidth;
|
2014-02-18 07:00:50 +00:00
|
|
|
}
|
2014-02-06 10:49:28 +00:00
|
|
|
}
|
|
|
|
|
2014-02-24 05:09:03 +00:00
|
|
|
&.mwe-popups-is-not-tall {
|
2017-04-20 21:59:57 +00:00
|
|
|
width: @popupWidth;
|
2014-02-22 07:17:33 +00:00
|
|
|
|
|
|
|
.mwe-popups-extract {
|
2018-03-09 17:02:01 +00:00
|
|
|
@minHeight: 2 * @lineHeight;
|
|
|
|
// On short summaries, we want to avoid an overlap with the gradient.
|
|
|
|
min-height: @minHeight;
|
2017-05-31 20:17:50 +00:00
|
|
|
max-height: 7 * @lineHeight;
|
2014-02-22 07:17:33 +00:00
|
|
|
overflow: hidden;
|
2018-03-09 17:02:01 +00:00
|
|
|
margin-bottom: @minHeight + 7px;
|
2014-05-19 16:18:37 +00:00
|
|
|
padding-bottom: 0;
|
2014-02-22 07:17:33 +00:00
|
|
|
}
|
2014-03-28 18:27:42 +00:00
|
|
|
|
2014-09-03 03:49:15 +00:00
|
|
|
footer {
|
2017-04-20 21:59:57 +00:00
|
|
|
width: @popupWidth - @cogIconSize;
|
2014-03-28 18:27:42 +00:00
|
|
|
}
|
2014-02-06 10:49:28 +00:00
|
|
|
}
|
2014-02-18 13:28:12 +00:00
|
|
|
|
2018-03-07 11:10:53 +00:00
|
|
|
&.mwe-popups-type-generic,
|
|
|
|
&.mwe-popups-type-disambiguation {
|
2016-11-29 12:34:52 +00:00
|
|
|
.mwe-popups-extract {
|
2018-03-07 11:10:53 +00:00
|
|
|
min-height: auto;
|
2016-11-29 12:34:52 +00:00
|
|
|
padding-top: 4px;
|
|
|
|
margin-bottom: 60px;
|
2018-03-07 11:10:53 +00:00
|
|
|
margin-top: 0;
|
2016-11-29 12:34:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.mwe-popups-read-link {
|
|
|
|
font-weight: bold;
|
|
|
|
font-size: 12px;
|
|
|
|
}
|
|
|
|
|
2018-01-11 14:57:41 +00:00
|
|
|
// When the user dwells on the "There was an issue displaying this preview"
|
|
|
|
// text, which is a link to the page, then highlight the "Go to this page"
|
|
|
|
// link too.
|
2016-11-29 12:34:52 +00:00
|
|
|
.mwe-popups-extract:hover + footer .mwe-popups-read-link {
|
|
|
|
text-decoration: underline;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-02-18 13:28:12 +00:00
|
|
|
/* Triangles/Pokeys */
|
2018-04-23 21:07:51 +00:00
|
|
|
&.mwe-popups-no-image-pokey {
|
2014-02-18 13:28:12 +00:00
|
|
|
&:after {
|
2018-04-23 21:07:51 +00:00
|
|
|
.mwe-popups-border-pokey-top( 7px, 7px, #fff, 4px );
|
2014-02-18 13:28:12 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&:before {
|
2018-04-23 21:07:51 +00:00
|
|
|
.mwe-popups-border-pokey-top( 8px, 10px, @colorGray10, 0px );
|
2014-02-18 13:28:12 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-04-23 21:07:51 +00:00
|
|
|
&.flipped_x.mwe-popups-no-image-pokey {
|
2014-02-24 08:12:21 +00:00
|
|
|
&:after {
|
2014-03-28 18:27:42 +00:00
|
|
|
/* @noflip */
|
2014-07-11 19:23:27 +00:00
|
|
|
left: auto;
|
2014-03-28 18:27:42 +00:00
|
|
|
/* @noflip */
|
2014-11-18 10:20:55 +00:00
|
|
|
right: 7px;
|
2014-02-24 08:12:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&:before {
|
2014-03-28 18:27:42 +00:00
|
|
|
/* @noflip */
|
2014-07-11 19:23:27 +00:00
|
|
|
left: auto;
|
2014-03-28 18:27:42 +00:00
|
|
|
/* @noflip */
|
2014-02-24 08:12:21 +00:00
|
|
|
right: 10px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-04-23 21:07:51 +00:00
|
|
|
&.mwe-popups-image-pokey {
|
2014-02-28 04:06:30 +00:00
|
|
|
&:before {
|
2014-11-12 09:09:47 +00:00
|
|
|
z-index: 111;
|
2018-04-23 21:07:51 +00:00
|
|
|
.mwe-popups-border-pokey-top( 9px, 9px, @colorGray10, 0px );
|
2014-02-28 04:06:30 +00:00
|
|
|
}
|
|
|
|
|
2014-03-22 01:14:09 +00:00
|
|
|
&:after {
|
2018-04-23 21:07:51 +00:00
|
|
|
.mwe-popups-border-pokey-top( 8px, 6px, #fff, 4px );
|
2014-11-12 09:09:47 +00:00
|
|
|
z-index: 112;
|
2014-03-22 01:14:09 +00:00
|
|
|
}
|
|
|
|
|
2014-04-30 11:13:05 +00:00
|
|
|
&.flipped_x {
|
2014-02-28 04:06:30 +00:00
|
|
|
&:before {
|
2014-11-12 09:09:47 +00:00
|
|
|
z-index: 111;
|
2018-04-23 21:07:51 +00:00
|
|
|
.mwe-popups-border-pokey-top( 9px, 273px, @colorGray10, 0px );
|
2014-02-28 04:06:30 +00:00
|
|
|
}
|
2014-03-22 01:14:09 +00:00
|
|
|
|
|
|
|
&:after {
|
2018-04-23 21:07:51 +00:00
|
|
|
.mwe-popups-border-pokey-top( 8px, 269px, #fff, 4px );
|
2014-11-12 09:09:47 +00:00
|
|
|
z-index: 112;
|
2014-03-22 01:14:09 +00:00
|
|
|
}
|
2014-02-28 04:06:30 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.mwe-popups-extract {
|
2014-06-17 11:08:05 +00:00
|
|
|
padding-top: 32px;
|
|
|
|
margin-top: 190px;
|
2014-02-28 04:06:30 +00:00
|
|
|
}
|
2014-02-18 13:28:12 +00:00
|
|
|
|
2014-06-17 11:08:05 +00:00
|
|
|
> div > a > svg {
|
2014-02-18 13:28:12 +00:00
|
|
|
margin-top: -8px;
|
2014-02-28 04:06:30 +00:00
|
|
|
position: absolute;
|
2014-11-12 09:09:47 +00:00
|
|
|
z-index: 113;
|
2014-03-28 18:27:42 +00:00
|
|
|
/* @noflip */
|
|
|
|
left: 0;
|
2014-02-18 13:28:12 +00:00
|
|
|
}
|
|
|
|
}
|
2014-02-24 08:12:21 +00:00
|
|
|
|
2014-04-30 11:13:05 +00:00
|
|
|
&.flipped_x.mwe-popups-is-tall {
|
2014-02-28 04:06:30 +00:00
|
|
|
min-height: 242px;
|
|
|
|
|
|
|
|
&:before {
|
2014-11-12 09:09:47 +00:00
|
|
|
z-index: 111;
|
2018-04-23 21:07:51 +00:00
|
|
|
.mwe-popups-border-pokey-top( 9px, 420px, @colorGray10, 0px );
|
2014-02-28 04:06:30 +00:00
|
|
|
}
|
|
|
|
|
2014-06-17 11:08:05 +00:00
|
|
|
> div > a > svg {
|
2014-02-24 08:12:21 +00:00
|
|
|
margin: 0;
|
2014-02-28 04:06:30 +00:00
|
|
|
margin-top: -8px;
|
2014-10-09 10:08:22 +00:00
|
|
|
margin-bottom: -7px;
|
2014-02-28 04:06:30 +00:00
|
|
|
position: absolute;
|
2014-11-12 09:09:47 +00:00
|
|
|
z-index: 113;
|
2014-03-28 18:27:42 +00:00
|
|
|
/* @noflip */
|
|
|
|
right: 0;
|
2014-02-24 08:12:21 +00:00
|
|
|
}
|
|
|
|
}
|
2014-04-30 11:13:05 +00:00
|
|
|
|
|
|
|
&.flipped_x_y {
|
|
|
|
&:before {
|
2014-11-12 09:09:47 +00:00
|
|
|
z-index: 111;
|
2018-04-23 21:07:51 +00:00
|
|
|
.mwe-popups-border-pokey-bottom( 9px, 272px, @colorGray10, 0px );
|
2014-04-30 11:13:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&:after {
|
2018-04-23 21:07:51 +00:00
|
|
|
.mwe-popups-border-pokey-bottom( 8px, 269px, #fff, 4px );
|
2014-11-12 09:09:47 +00:00
|
|
|
z-index: 112;
|
2014-04-30 11:13:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&.mwe-popups-is-tall {
|
|
|
|
min-height: 242px;
|
|
|
|
|
|
|
|
&:after {
|
2014-11-12 09:09:47 +00:00
|
|
|
z-index: 112;
|
2018-04-23 21:07:51 +00:00
|
|
|
.mwe-popups-border-pokey-bottom( 8px, 417px, #fff, 4px );
|
2014-04-30 11:13:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&:before {
|
2014-11-12 09:09:47 +00:00
|
|
|
z-index: 111;
|
2018-04-23 21:07:51 +00:00
|
|
|
.mwe-popups-border-pokey-bottom( 9px, 420px, @colorGray10, 0px );
|
2014-04-30 11:13:05 +00:00
|
|
|
}
|
|
|
|
|
2014-10-09 10:08:22 +00:00
|
|
|
> div > a > svg {
|
2014-04-30 11:13:05 +00:00
|
|
|
position: absolute;
|
2014-11-12 09:09:47 +00:00
|
|
|
z-index: 113;
|
2014-04-30 11:13:05 +00:00
|
|
|
margin: 0;
|
|
|
|
margin-bottom: -9px;
|
|
|
|
/* @noflip */
|
|
|
|
right: 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&.flipped_y {
|
|
|
|
&:after {
|
2018-04-23 21:07:51 +00:00
|
|
|
.mwe-popups-border-pokey-bottom( 7px, 7px, #fff, 4px );
|
2014-04-30 11:13:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&:before {
|
2018-04-23 21:07:51 +00:00
|
|
|
.mwe-popups-border-pokey-bottom( 8px, 10px, @colorGray10, 0px );
|
2014-04-30 11:13:05 +00:00
|
|
|
}
|
|
|
|
}
|
2014-02-06 10:49:28 +00:00
|
|
|
}
|