2023-04-18 18:19:46 +00:00
|
|
|
@import 'mediawiki.skin.variables.less';
|
2017-06-06 23:38:57 +00:00
|
|
|
@import 'mediawiki.mixins';
|
|
|
|
|
|
|
|
@baseFontSize: 1em;
|
|
|
|
@thumbWidth: 80px;
|
|
|
|
@cardBorder: 1px solid rgba( 0, 0, 0, 0.2 );
|
|
|
|
|
|
|
|
.ext-related-articles-card-list {
|
|
|
|
.flex-display();
|
|
|
|
flex-flow: row wrap;
|
|
|
|
font-size: @baseFontSize;
|
|
|
|
list-style: none;
|
|
|
|
overflow: hidden;
|
|
|
|
position: relative;
|
2019-06-20 13:29:29 +00:00
|
|
|
padding-left: 0;
|
2017-06-06 23:38:57 +00:00
|
|
|
|
|
|
|
h3 {
|
|
|
|
@fontSize: 1em;
|
|
|
|
@lineHeight: 1.3;
|
|
|
|
@lineHeightEm: @lineHeight * @fontSize;
|
|
|
|
font-family: inherit;
|
|
|
|
font-size: @fontSize;
|
|
|
|
// max 2 lines
|
|
|
|
max-height: 2 * @lineHeightEm;
|
|
|
|
line-height: @lineHeight;
|
|
|
|
margin: 0;
|
|
|
|
overflow: hidden;
|
|
|
|
padding: 0;
|
|
|
|
position: relative;
|
|
|
|
font-weight: 500;
|
|
|
|
|
|
|
|
a {
|
2023-04-18 18:19:46 +00:00
|
|
|
color: @color-emphasized;
|
2017-06-06 23:38:57 +00:00
|
|
|
}
|
|
|
|
|
2023-03-28 20:19:23 +00:00
|
|
|
&::after {
|
2017-06-06 23:38:57 +00:00
|
|
|
content: ' ';
|
|
|
|
position: absolute;
|
|
|
|
right: 0;
|
|
|
|
bottom: 0;
|
|
|
|
width: 25%;
|
|
|
|
height: @lineHeightEm;
|
|
|
|
background-color: transparent;
|
|
|
|
background-image: linear-gradient( to right, rgba( 255, 255, 255, 0 ), rgba( 255, 255, 255, 1 ) 50% );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-01-17 03:26:36 +00:00
|
|
|
// flex-item
|
|
|
|
.ext-related-articles-card {
|
2023-04-18 18:19:46 +00:00
|
|
|
background-color: @background-color-base;
|
2019-01-17 03:26:36 +00:00
|
|
|
box-sizing: border-box;
|
|
|
|
margin: 0;
|
|
|
|
height: @thumbWidth;
|
|
|
|
position: relative;
|
|
|
|
width: 100%;
|
|
|
|
border: @cardBorder;
|
|
|
|
|
|
|
|
& + .ext-related-articles-card {
|
|
|
|
border-top: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Apply radius to top & bottom cards when stacked
|
|
|
|
&:first-child {
|
2022-11-06 22:46:34 +00:00
|
|
|
border-radius: @border-radius-base @border-radius-base 0 0;
|
2019-01-17 03:26:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&:last-child {
|
2022-11-06 22:46:34 +00:00
|
|
|
border-radius: 0 0 @border-radius-base @border-radius-base;
|
2019-01-17 03:26:36 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.ext-related-articles-card > a {
|
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
right: 0;
|
|
|
|
bottom: 0;
|
|
|
|
left: 0;
|
|
|
|
z-index: 1;
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
box-shadow: 0 1px 1px rgba( 0, 0, 0, 0.1 );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-06-06 23:38:57 +00:00
|
|
|
.ext-related-articles-card-detail {
|
|
|
|
// Vertically center the element using the technique described at
|
|
|
|
// http://zerosixthree.se/vertical-align-anything-with-just-3-lines-of-css/.
|
|
|
|
//
|
|
|
|
// This technique is ideal because:
|
|
|
|
// * it's easy to reason about,
|
|
|
|
// * `position: relative` means that the element is laid out as if it weren't
|
|
|
|
// positioned, allowing for `text-overflow: ellipsis` to work (see below)
|
|
|
|
// * it supports more browsers than flexbox does, and
|
2022-03-30 18:25:56 +00:00
|
|
|
// * we don't deliver RelatedArticles assets to those browsers that don't
|
2017-06-06 23:38:57 +00:00
|
|
|
// support CSS 2D transforms
|
|
|
|
position: relative;
|
|
|
|
top: 50%;
|
|
|
|
transform: translateY( -50% );
|
|
|
|
}
|
|
|
|
|
|
|
|
.ext-related-articles-card-extract {
|
2023-04-18 18:19:46 +00:00
|
|
|
color: @color-subtle;
|
2017-06-06 23:38:57 +00:00
|
|
|
font-size: 0.8em;
|
|
|
|
white-space: nowrap;
|
|
|
|
overflow: hidden;
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
margin-top: 2px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.ext-related-articles-card-thumb {
|
2023-04-18 18:19:46 +00:00
|
|
|
background-color: #eaecf0;
|
2017-06-06 23:38:57 +00:00
|
|
|
background-repeat: no-repeat;
|
2019-06-05 23:55:20 +00:00
|
|
|
background-position: center center;
|
2019-08-02 18:54:41 +00:00
|
|
|
background-size: cover;
|
2017-06-06 23:38:57 +00:00
|
|
|
float: left;
|
|
|
|
height: 100%;
|
|
|
|
width: @thumbWidth;
|
|
|
|
margin-right: 10px;
|
|
|
|
}
|
2019-08-02 18:54:41 +00:00
|
|
|
|
|
|
|
.ext-related-articles-card-thumb-placeholder {
|
2020-07-24 05:12:35 +00:00
|
|
|
background-image: url( article.svg );
|
2019-08-02 18:54:41 +00:00
|
|
|
background-size: 40px 40px;
|
|
|
|
}
|
2017-06-06 23:38:57 +00:00
|
|
|
}
|
|
|
|
|
2023-11-08 22:06:26 +00:00
|
|
|
@media all and ( min-width: @min-width-breakpoint-tablet ) {
|
2017-06-06 23:38:57 +00:00
|
|
|
.ext-related-articles-card-list {
|
|
|
|
border-top: 0;
|
2019-01-17 03:26:36 +00:00
|
|
|
|
2017-06-06 23:38:57 +00:00
|
|
|
.ext-related-articles-card {
|
|
|
|
border: @cardBorder;
|
2017-05-25 18:02:33 +00:00
|
|
|
@rightMargin: 1%;
|
|
|
|
margin-right: @rightMargin;
|
|
|
|
margin-bottom: 10px;
|
|
|
|
// max space is 100-2/3
|
|
|
|
width: ( 100 - ( 2 * @rightMargin ) ) / 3;
|
2017-06-06 23:38:57 +00:00
|
|
|
|
|
|
|
// Individual border-radius when cards side by side (not stacked)
|
|
|
|
&,
|
|
|
|
&:first-child,
|
|
|
|
&:last-child {
|
2022-11-06 22:46:34 +00:00
|
|
|
border-radius: @border-radius-base;
|
2017-06-06 23:38:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&:last-child {
|
|
|
|
margin-right: 0;
|
|
|
|
}
|
2019-01-17 03:26:36 +00:00
|
|
|
|
2017-06-06 23:38:57 +00:00
|
|
|
& + .ext-related-articles-card {
|
|
|
|
border: @cardBorder;
|
|
|
|
}
|
2019-01-17 03:26:36 +00:00
|
|
|
|
2017-05-25 18:02:33 +00:00
|
|
|
// every 3rd child drop the right margin
|
|
|
|
&:nth-child( 3n+3 ) {
|
|
|
|
margin-right: 0;
|
|
|
|
}
|
2017-06-06 23:38:57 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|