镜像自地址
https://github.com/wikimedia/mediawiki-extensions-GrowthExperiments.git
已同步 2024-06-03 02:40:34 +08:00
47da3bee8f
Bug: T296379 Change-Id: I133439d58c28bcb12622de5746b17d261923af2f
221 行
4.3 KiB
Plaintext
221 行
4.3 KiB
Plaintext
@import 'mediawiki.mixins';
|
|
@import '../../lib/wikimedia-ui-base/wikimedia-ui-base.less';
|
|
@import '../ext.growthExperiments.variables.less';
|
|
@import '../ext.growthExperiments.mixins.less';
|
|
|
|
.mw-ge-small-task-card {
|
|
display: flex;
|
|
width: 100%;
|
|
.box-sizing( border-box );
|
|
padding: 8px;
|
|
background-color: @wmui-color-base100;
|
|
box-shadow: 0 1px 0 0 @wmui-color-base80;
|
|
|
|
&:hover {
|
|
// Browser default is to underline links on hover, which looks weird when the
|
|
// whole card is a link.
|
|
text-decoration: none;
|
|
}
|
|
|
|
&-image {
|
|
width: 88px;
|
|
height: 88px;
|
|
flex-grow: 0;
|
|
flex-shrink: 0;
|
|
// background-image is set dynmically
|
|
background-repeat: no-repeat;
|
|
background-position: center;
|
|
background-size: cover;
|
|
|
|
&-placeholder {
|
|
/* @embed */
|
|
background: url( ../../../images/suggestededits/placeholder-image.svg ) no-repeat center/40px, @wmui-color-base80;
|
|
|
|
.mw-ge-tasktype-image-recommendation & {
|
|
/* @embed */
|
|
background: url( ../../../images/addimage/placeholder-with-question-mark.svg ) no-repeat center/40px, @wmui-color-base30;
|
|
}
|
|
}
|
|
|
|
&-skeleton {
|
|
.loading-animation (400ms);
|
|
|
|
&:before {
|
|
border-radius: 2px 2px 0 0;
|
|
}
|
|
}
|
|
}
|
|
|
|
&-text-container {
|
|
display: flex;
|
|
flex-direction: column;
|
|
flex-grow: 1;
|
|
justify-items: flex-start;
|
|
overflow: hidden;
|
|
padding: 0 0 0 16px;
|
|
|
|
.mw-ge-small-task-card-glue:first-of-type {
|
|
display: none;
|
|
}
|
|
}
|
|
|
|
&-title {
|
|
font-weight: bold;
|
|
margin-bottom: 4px;
|
|
color: @colorProgressive;
|
|
|
|
&:active {
|
|
color: @colorProgressiveActive;
|
|
}
|
|
}
|
|
|
|
&-description {
|
|
text-overflow: ellipsis;
|
|
overflow: hidden;
|
|
color: @wmui-color-base20;
|
|
|
|
&.skeleton {
|
|
.loading-animation (800ms);
|
|
|
|
&:before {
|
|
content: '\00a0';
|
|
}
|
|
}
|
|
}
|
|
|
|
&-glue {
|
|
flex-grow: 1;
|
|
}
|
|
|
|
&-metadata-container {
|
|
display: flex;
|
|
justify-content: flex-end;
|
|
}
|
|
|
|
&-pageviews {
|
|
flex: 1 0 0;
|
|
box-sizing: border-box;
|
|
justify-self: flex-start;
|
|
padding-right: 5px;
|
|
color: @wmui-color-base20;
|
|
text-overflow: ellipsis;
|
|
overflow: hidden;
|
|
white-space: nowrap;
|
|
|
|
.oo-ui-iconWidget {
|
|
margin-right: 8px;
|
|
opacity: 0.65;
|
|
}
|
|
|
|
&.skeleton {
|
|
.loading-animation (1200ms);
|
|
}
|
|
}
|
|
|
|
&-tasktype {
|
|
display: flex;
|
|
align-items: center;
|
|
overflow: hidden;
|
|
|
|
&-difficulty-easy {
|
|
color: @easyColor;
|
|
}
|
|
|
|
&-difficulty-medium {
|
|
color: @mediumColor;
|
|
}
|
|
|
|
&-difficulty-hard {
|
|
color: @hardColor;
|
|
}
|
|
|
|
&-taskname {
|
|
display: inline-block;
|
|
text-overflow: ellipsis;
|
|
overflow: hidden;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.oo-ui-iconWidget {
|
|
margin-right: 8px;
|
|
// Undoing parent's text-align:right which causes OOUI's invisible icon to be visible
|
|
text-align: initial;
|
|
// OOUI icons has 20px min width & height.
|
|
min-width: 16px;
|
|
min-height: unset;
|
|
width: 16px;
|
|
}
|
|
}
|
|
|
|
.mw-ge-small-task-card-desktop & {
|
|
&-title {
|
|
// limit to a single line
|
|
white-space: nowrap;
|
|
}
|
|
|
|
&-description {
|
|
// Show two lines of text, with an ellipsis.
|
|
// line-clamp has not been standardized, but most modern browsers understand the Webkit syntax.
|
|
display: -webkit-box;
|
|
-webkit-box-orient: vertical;
|
|
-webkit-line-clamp: 2;
|
|
line-height: 1.4;
|
|
// For IE 11 and various old browsers, limit height for the same effect, except
|
|
// for the ellipsis. Height is <# of lines> * <line height> * <font size>.
|
|
max-height: 2 * 1.4 * 13/14 * 1em;
|
|
font-size: 13/14 * 1em;
|
|
}
|
|
|
|
&-container {
|
|
font-size: 12.4/14 * 1em;
|
|
}
|
|
|
|
&-footer {
|
|
border-top: 1px solid @wmui-color-base70;
|
|
background-color: @wmui-color-base90;
|
|
|
|
// need win over OOUI-s four-class selector in specificity, but works out fine here
|
|
.oo-ui-buttonElement-button {
|
|
padding: 11px 20px 13px;
|
|
|
|
.oo-ui-labelElement-label {
|
|
line-height: 16/14 * 1em;
|
|
font-size: 14/14 * 1em;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
.mw-ge-small-task-card-mobile & {
|
|
&-title {
|
|
// Show two lines of text, with an ellipsis, with 16px font size.
|
|
// See &-description for desktop for explanation.
|
|
display: -webkit-box;
|
|
overflow: hidden;
|
|
-webkit-box-orient: vertical;
|
|
-webkit-line-clamp: 2;
|
|
line-height: 1;
|
|
max-height: 2 * 1.4 * 1em;
|
|
}
|
|
|
|
&-description {
|
|
// mobile does not have space for two lines
|
|
white-space: nowrap;
|
|
font-size: 13/16 * 1em;
|
|
}
|
|
|
|
&-container {
|
|
padding-top: 0;
|
|
}
|
|
|
|
&-image {
|
|
width: 72px;
|
|
height: 72px;
|
|
}
|
|
|
|
&-tasktype {
|
|
font-size: 13/16 * 1em;
|
|
}
|
|
}
|
|
}
|