mediawiki-extensions-Popups/src/ui/templates/referencePreview/referencePreview.less
Thiemo Kreuz 34cf1f0764 Allow text selection on all fade-outs, not only on references
The last line in all popups ends with a fade-out gradient to white.
The text in this last line can currently not be selected because it is
covered by this partially transparent container, and the container
consumes all mouse events.

This patch here moves the existing solution from "reference previews
only" (where this was a much more serious problem that on page
previews) to the top-level .less file that is for all popup types.
This is not strictly required, but I feel the code belongs there.

Bug: T220200
Change-Id: Iedf667ead453c9e72025d5fdc7af34756456e68a
2019-04-25 19:31:54 +02:00

59 lines
1.3 KiB
Plaintext

.mwe-popups.mwe-popups-type-reference {
.mwe-popups-title {
margin-top: @popupPadding;
.mw-ui-icon {
vertical-align: middle;
&.mw-ui-icon-element {
min-width: @iconSize;
width: @iconSize;
&:before {
margin: 0;
}
}
&.mw-ui-icon-reference-generic {
/* align narrow icon with the text */
margin-left: -2px;
}
}
}
.mwe-popups-extract {
margin-bottom: 2.75 * @lineHeight;
// Reference previews should have a "lighter" appearence than page previews, where the
// maximum is 7 lines.
max-height: 5 * @lineHeight;
// Reference previews can be smaller than page previews, where the minimum is 2 lines.
min-height: @lineHeight;
&:after {
width: 100%;
bottom: -@lineHeight;
background-color: transparent;
background-image: -webkit-linear-gradient( top, rgba( 255, 255, 255, 0 ), rgba( 255, 255, 255, 1 ) );
background-image: -moz-linear-gradient( top, rgba( 255, 255, 255, 0 ), rgba( 255, 255, 255, 1 ) );
background-image: linear-gradient( rgba( 255, 255, 255, 0 ), rgba( 255, 255, 255, 1 ) );
.transition( bottom 250ms ease );
}
&.mwe-popups-fade-out {
&:after {
bottom: 0;
}
}
.mw-parser-output {
max-height: inherit;
overflow: auto;
}
}
.mwe-popups-read-link {
// Same font size as the read link in disambiguation popups
font-size: 12px;
}
}