mediawiki-skins-Citizen/skinStyles/extensions/Popups/ext.popups.main.less

254 lines
5.1 KiB
Plaintext
Raw Normal View History

2019-12-29 18:45:17 +00:00
/*
* Citizen
*
* SkinStyles for Extension:Popups
* Module: ext.popups.main
2022-11-29 03:04:07 +00:00
* Version: REL1_39 a40ebc1
*
2022-11-29 03:04:07 +00:00
* Date: 2022-11-28
2019-12-29 18:45:17 +00:00
*/
@import '../../../resources/variables.less';
2022-11-29 03:04:07 +00:00
/* popup.less */
2019-12-29 18:45:17 +00:00
.mwe-popups {
2022-11-29 03:04:07 +00:00
// See FIXME below
// border-radius: var( --border-radius--medium );
background: var( --color-surface-1 );
box-shadow: var( --box-shadow-dialog );
2019-12-29 18:45:17 +00:00
2022-11-29 03:04:07 +00:00
.mwe-popups-container {
color: var( --color-base );
}
2022-11-29 03:04:07 +00:00
.mwe-popups-settings-icon {
border-radius: var( --border-radius--small );
opacity: var( --opacity-icon-base );
2022-11-29 03:04:07 +00:00
&:hover {
background-color: var( --background-color-quiet--hover );
opacity: var( --opacity-icon-base--hover );
}
2022-11-29 03:04:07 +00:00
&:active {
background-color: var( --background-color-quiet--active );
opacity: var( --opacity-icon-base--active );
}
2021-01-29 16:17:10 +00:00
}
.mwe-popups-extract {
color: var( --color-base );
&[ dir='ltr' ]::after {
/* @noflip */
background-image: linear-gradient( to right, transparent, var( --color-surface-1 ) 50% );
}
2021-01-29 16:17:10 +00:00
&[ dir='rtl' ]::after {
/* @noflip */
background-image: linear-gradient( to left, transparent, var( --color-surface-1 ) 50% );
}
2019-12-29 18:45:17 +00:00
blockquote::after {
2022-11-29 03:04:07 +00:00
/* @noflip */
background-image: linear-gradient( to bottom, transparent, var( --color-surface-1 ) 75% );
2019-12-29 18:45:17 +00:00
}
2022-11-29 03:04:07 +00:00
&.mwe-popups-type-generic,
&.mwe-popups-type-disambiguation {
.mwe-popups-read-link {
font-weight: var( --font-weight-semibold );
}
2021-01-29 16:17:10 +00:00
}
2022-11-29 03:04:07 +00:00
&.mwe-popups-no-image-pointer {
&::before {
2022-11-29 03:04:07 +00:00
border-bottom-color: var( --border-color-base );
}
2019-12-29 18:45:17 +00:00
&::after {
2022-11-29 03:04:07 +00:00
border-bottom-color: var( --color-surface-1 );
}
2019-12-29 18:45:17 +00:00
}
2020-05-17 23:40:16 +00:00
2022-11-29 03:04:07 +00:00
&.mwe-popups-image-pointer {
&::before {
border-bottom-color: var( --border-color-base );
}
&::after {
border-bottom-color: var( --color-surface-1 );
}
2020-05-17 23:40:16 +00:00
2022-11-29 03:04:07 +00:00
&.flipped-x {
&::before {
2022-11-29 03:04:07 +00:00
border-bottom-color: var( --border-color-base );
}
2020-05-17 23:40:16 +00:00
&::after {
2022-11-29 03:04:07 +00:00
border-bottom-color: var( --color-surface-1 );
}
}
}
2020-05-17 23:40:16 +00:00
2022-11-29 03:04:07 +00:00
&.flipped-x.mwe-popups-is-tall {
&::before {
2022-11-29 03:04:07 +00:00
border-bottom-color: var( --border-color-base );
}
2021-01-29 16:17:10 +00:00
}
2022-11-29 03:04:07 +00:00
&.flipped-x-y {
&::before {
2022-11-29 03:04:07 +00:00
border-top-color: var( --border-color-base );
}
&::after {
border-top-color: var( --color-surface-1 );
}
2020-05-17 23:40:16 +00:00
2022-11-29 03:04:07 +00:00
&.mwe-popups-is-tall {
&::before {
2022-11-29 03:04:07 +00:00
border-top-color: var( --border-color-base );
}
&::after {
2022-11-29 03:04:07 +00:00
border-top-color: var( --color-surface-1 );
}
}
}
&.flipped-y {
&::before {
border-top-color: var( --border-color-base );
}
2020-05-17 23:40:16 +00:00
&::after {
2022-11-29 03:04:07 +00:00
border-top-color: var( --color-surface-1 );
}
2021-01-29 16:17:10 +00:00
}
2022-11-29 03:04:07 +00:00
}
2022-11-29 03:04:07 +00:00
/* preview.less */
.mwe-popups-title {
font-weight: var( --font-weight-semibold );
2019-12-29 18:45:17 +00:00
}
/* referencePreview.less */
&.mwe-popups-type-reference {
.mwe-popups-extract {
.mwe-popups-fade {
background-image: linear-gradient( transparent, var( --color-surface-1 ) );
}
2022-11-29 03:04:07 +00:00
}
2022-11-29 03:04:07 +00:00
.mwe-collapsible-placeholder {
font-weight: var( --font-weight-semibold );
}
}
2022-11-29 03:04:07 +00:00
}
2022-11-29 03:04:07 +00:00
@supports ( clip-path: polygon( 1px 1px ) ) {
.mwe-popups {
.mwe-popups-container {
background: var( --color-surface-1 );
// FIXME: Come up with a clip path that works with increased border radius
// Popups is using polygon to clip the card
// So the thumbnail corner would look weird if we adjust the border radius
// --pseudo-radius: var( --border-radius--medium );
}
}
2022-11-29 03:04:07 +00:00
}
2022-11-29 03:04:07 +00:00
/* settingsDialog.less */
#mwe-popups-settings {
border-color: var( --border-color-base );
border-radius: var( --border-radius--medium );
background: var( --color-surface-1 );
box-shadow: var( --box-shadow-dialog );
header {
border-bottom-color: var( --border-color-base );
h1 {
font-family: var( --font-family-base );
font-weight: var( --font-weight-semibold );
}
}
2022-11-29 03:04:07 +00:00
.mwe-ui-icon-popups-close {
opacity: var( --opacity-icon-base );
&:hover {
opacity: var( --opacity-icon-base--hover );
}
2022-11-29 03:04:07 +00:00
&:active {
opacity: var( --opacity-icon-base--active );
}
}
2022-11-29 03:04:07 +00:00
main#mwe-popups-settings-form {
p {
color: var( --color-base--subtle );
}
form {
label {
> span {
color: var( --color-base--emphasized );
font-weight: var( --font-weight-semibold );
}
}
}
}
}
2022-11-29 03:04:07 +00:00
/* settingsDialogRenderer.less */
.mwe-popups-overlay {
background-color: var( --background-color-overlay );
2019-12-29 18:45:17 +00:00
}
// Responsive support
@media ( max-width: @width-breakpoint-tablet ) {
.mwe-popups {
position: fixed;
top: auto !important;
right: 0 !important;
bottom: 0 !important;
left: 0 !important;
overflow: hidden; // Hide pointer and also rounded corners
width: auto !important;
border-radius: var( --border-radius--medium ) var( --border-radius--medium ) 0 0;
// Top aligned cards
&.flipped-x-y,
&.flipped-y {
top: 0 !important;
bottom: auto !important;
border-radius: 0 0 var( --border-radius--medium ) var( --border-radius--medium );
}
.mwe-popups-container {
margin-bottom: 0 !important; // cancel negative margin as we have no pointers
// Hide footer
footer {
display: none;
}
}
// Vertical card
&.mwe-popups-is-not-tall {
.mwe-popups-thumbnail {
width: 100%;
}
.mwe-popups-extract {
min-height: auto;
max-height: 58px;
margin-bottom: var( --space-xl );
}
}
}
}