mediawiki-extensions-Popups/resources/ext.popups.core.less
Prateek Saxena 240e469d9c Add Triangle/Pokey to the NavigationPopups
* Triangles using the border hack for the white part of the popups
* SVG clipPath on FF and Chrome, using SVG <image>
* Fallback to <img> on browsers with not SVG support

Change-Id: I3b1226051436652edbffe4642176c9a0e405243c
2014-02-24 21:55:09 +05:30

138 lines
2.2 KiB
Plaintext

/* Code adapted from Yair Rand's NavPopupsRestyled.js
* https://en.wikipedia.org/wiki/User:Yair_rand/NavPopupsRestyled.js
*/
.mwe-popups {
position: absolute;
z-index: 5;
background: #fff;
border: 1px solid #bbb;
padding: 0;
display: none;
font-size: 0.8em;
line-height: 1.5em;
cursor: pointer;
min-width: 300px;
> a {
display: block;
margin-top: -9px;
padding-top: 9px;
color: #000;
&:hover {
text-decoration: none;
}
> div {
padding: 16px;
padding-bottom: 48px;
h3 {
margin-top: 0;
padding: 0;
font-family: Georgia, Times, serif;
font-style: normal;
}
> div.mwe-popups-redirect {
color: #c9c9c9;
font-style: italic;
margin-bottom: 3px;
}
}
> div.mwe-popups-is-tall{
float: right;
height: 250px;
width: 200px;
padding: 0;
background-size: cover;
background-repeat: no-repeat;
overflow: hidden;
img {
min-height: 100%;
min-width: 100%;
-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
filter: alpha(opacity=0);
opacity: 0
}
}
> img.mwe-popups-is-not-tall{
width: 300px;
float: initial;
}
> div.mwe-popups-timestamp-older, div.mwe-popups-timestamp-recent{
padding: 16px;
margin: 0;
font-size: 0.85em;
position: absolute;
bottom: 0;
}
> div.mwe-popups-timestamp-older{
color: #555;
}
> div.mwe-popups-timestamp-recent{
color: #00af89;
}
}
&.mwe-popups-is-tall {
width: 450px;
.mwe-popups-extract {
float: left;
width: 215px;
height: 125px;
overflow: hidden;
}
}
&.mwe-popups-is-not-tall{
width: 300px;
.mwe-popups-extract {
max-height: 120px;
overflow: hidden;
margin-bottom: 3.84em;
padding-bottom: 1.28em;
}
}
/* Triangles/Pokeys */
&.mwe-popups-no-image-tri {
&:after {
content: '';
position: absolute;
border: 7px solid transparent;
border-top: 0;
border-bottom: 7px solid #FFF;
top: -7px;
left: 11px;
}
&:before {
content: '';
position: absolute;
border: 8px solid transparent;
border-top: 0;
border-bottom: 8px solid #bbb;
top: -8px;
left: 10px;
}
}
&.mwe-popups-image-tri {
border-top: none;
> a > svg {
margin-top: -8px;
}
}
}