/* Code adapted from Yair Rand's NavPopupsRestyled.js * https://en.wikipedia.org/wiki/User:Yair_rand/NavPopupsRestyled.js */ .mwe-popups-border-triangle ( @size, @left, @color ) { content: ''; position: absolute; border: @size solid transparent; border-top: 0; border-bottom: @size solid @color; top: -@size; left: @left; } .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: 0; margin: 16px; padding-bottom: 48px; > div.mwe-popups-redirect { color: #555; font-size: 0.85em; margin-bottom: 3px; h3 { margin-top: 0; padding: 0; font: 2em Georgia, Times, serif; font-weight: normal; font-style: normal; } } } > div.mwe-popups-is-tall { float: right; height: 250px; width: 200px; padding: 0; background-size: cover; background-repeat: no-repeat; overflow: hidden; } > div.mwe-popups-is-not-tall { float: right; height: 200px; width: 300px; padding: 0; background-size: cover; background-position: center; background-repeat: no-repeat; overflow: hidden; } > 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; > a > svg { margin-bottom: -6px; } .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 { .mwe-popups-border-triangle( 7px, 11px, #fff); } &:before { .mwe-popups-border-triangle( 8px, 10px, #bbb); } } &.flipped.mwe-popups-no-image-tri { &:after { left: initial; right: 11px; } &:before { left: initial; right: 10px; } } &.mwe-popups-image-tri { &:before { .mwe-popups-border-triangle( 9px, 9px, #bbb); z-index: 90; } &.flipped { &:before { .mwe-popups-border-triangle( 9px, 273px, #bbb); z-index: 90; } } .mwe-popups-extract { margin-top: 206px; } > a > svg { margin-top: -8px; position: absolute; z-index: 100; } } &.flipped.mwe-popups-is-tall { min-height: 242px; &:before { .mwe-popups-border-triangle( 9px, 420px, #bbb); z-index: 90; } > a > svg { margin: 0; margin-top: -8px; margin-bottom: -5px; position: absolute; right: 0; z-index: 100; } } }