riot-web/res/css/views/rooms/_LinkPreviewWidget.pcss

70 lines
1.8 KiB
Plaintext
Raw Normal View History

/*
Copyright 2024 New Vector Ltd.
Copyright 2015, 2016 OpenMarket Ltd
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only
Please see LICENSE files in the repository root for full details.
*/
.mx_LinkPreviewWidget {
Improve LinkPreviewWidget (#8881) * Use shorthand for margin values Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Merge style declarations Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Merge style declarations Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Include mx_MatrixChat_useCompactLayout in mx_LinkPreviewWidget Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Include in mx_LinkPreviewWidget Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * yarn run lint:style --fix Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Use spacing variables Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Use logical variables Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Prevent flex children blowout Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Wrap caption Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * yarn run lint:style --fix Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Set row-gap between image and caption Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Set column-gap between the caption and close button Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Rename the class name Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Decrease inline spacing Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2022-07-04 08:10:46 +02:00
margin: $spacing-16 0 $spacing-16 auto;
display: flex;
Improve LinkPreviewWidget (#8881) * Use shorthand for margin values Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Merge style declarations Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Merge style declarations Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Include mx_MatrixChat_useCompactLayout in mx_LinkPreviewWidget Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Include in mx_LinkPreviewWidget Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * yarn run lint:style --fix Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Use spacing variables Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Use logical variables Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Prevent flex children blowout Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Wrap caption Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * yarn run lint:style --fix Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Set row-gap between image and caption Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Set column-gap between the caption and close button Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Rename the class name Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Decrease inline spacing Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2022-07-04 08:10:46 +02:00
column-gap: $spacing-4;
border-inline-start: 2px solid $preview-widget-bar-color;
border-radius: 2px;
2021-11-29 13:52:09 +01:00
color: $info-plinth-fg-color;
Improve LinkPreviewWidget (#8881) * Use shorthand for margin values Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Merge style declarations Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Merge style declarations Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Include mx_MatrixChat_useCompactLayout in mx_LinkPreviewWidget Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Include in mx_LinkPreviewWidget Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * yarn run lint:style --fix Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Use spacing variables Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Use logical variables Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Prevent flex children blowout Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Wrap caption Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * yarn run lint:style --fix Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Set row-gap between image and caption Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Set column-gap between the caption and close button Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Rename the class name Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Decrease inline spacing Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2022-07-04 08:10:46 +02:00
.mx_MatrixChat_useCompactLayout & {
margin-top: 6px;
margin-bottom: 6px;
}
/* Exclude mx_LinkPreviewGroup_hide from wrapping */
Improve LinkPreviewWidget (#8881) * Use shorthand for margin values Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Merge style declarations Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Merge style declarations Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Include mx_MatrixChat_useCompactLayout in mx_LinkPreviewWidget Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Include in mx_LinkPreviewWidget Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * yarn run lint:style --fix Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Use spacing variables Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Use logical variables Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Prevent flex children blowout Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Wrap caption Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * yarn run lint:style --fix Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Set row-gap between image and caption Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Set column-gap between the caption and close button Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Rename the class name Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Decrease inline spacing Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2022-07-04 08:10:46 +02:00
.mx_LinkPreviewWidget_wrapImageCaption {
display: flex;
flex-wrap: wrap;
row-gap: $spacing-8;
flex: 1;
Improve LinkPreviewWidget (#8881) * Use shorthand for margin values Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Merge style declarations Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Merge style declarations Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Include mx_MatrixChat_useCompactLayout in mx_LinkPreviewWidget Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Include in mx_LinkPreviewWidget Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * yarn run lint:style --fix Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Use spacing variables Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Use logical variables Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Prevent flex children blowout Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Wrap caption Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * yarn run lint:style --fix Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Set row-gap between image and caption Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Set column-gap between the caption and close button Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Rename the class name Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Decrease inline spacing Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2022-07-04 08:10:46 +02:00
.mx_LinkPreviewWidget_image,
.mx_LinkPreviewWidget_caption {
margin-inline-start: $spacing-16;
min-width: 0; /* Prevent blowout */
Improve LinkPreviewWidget (#8881) * Use shorthand for margin values Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Merge style declarations Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Merge style declarations Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Include mx_MatrixChat_useCompactLayout in mx_LinkPreviewWidget Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Include in mx_LinkPreviewWidget Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * yarn run lint:style --fix Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Use spacing variables Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Use logical variables Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Prevent flex children blowout Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Wrap caption Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * yarn run lint:style --fix Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Set row-gap between image and caption Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Set column-gap between the caption and close button Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Rename the class name Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Decrease inline spacing Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2022-07-04 08:10:46 +02:00
}
Improve LinkPreviewWidget (#8881) * Use shorthand for margin values Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Merge style declarations Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Merge style declarations Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Include mx_MatrixChat_useCompactLayout in mx_LinkPreviewWidget Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Include in mx_LinkPreviewWidget Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * yarn run lint:style --fix Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Use spacing variables Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Use logical variables Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Prevent flex children blowout Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Wrap caption Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * yarn run lint:style --fix Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Set row-gap between image and caption Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Set column-gap between the caption and close button Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Rename the class name Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Decrease inline spacing Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2022-07-04 08:10:46 +02:00
.mx_LinkPreviewWidget_image {
flex: 0 0 100px;
text-align: center;
cursor: pointer;
}
Improve LinkPreviewWidget (#8881) * Use shorthand for margin values Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Merge style declarations Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Merge style declarations Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Include mx_MatrixChat_useCompactLayout in mx_LinkPreviewWidget Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Include in mx_LinkPreviewWidget Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * yarn run lint:style --fix Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Use spacing variables Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Use logical variables Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Prevent flex children blowout Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Wrap caption Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * yarn run lint:style --fix Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Set row-gap between image and caption Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Set column-gap between the caption and close button Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Rename the class name Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Decrease inline spacing Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2022-07-04 08:10:46 +02:00
.mx_LinkPreviewWidget_caption {
flex: 1;
overflow: hidden; /* cause it to wrap rather than clip */
Improve LinkPreviewWidget (#8881) * Use shorthand for margin values Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Merge style declarations Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Merge style declarations Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Include mx_MatrixChat_useCompactLayout in mx_LinkPreviewWidget Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Include in mx_LinkPreviewWidget Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * yarn run lint:style --fix Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Use spacing variables Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Use logical variables Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Prevent flex children blowout Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Wrap caption Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * yarn run lint:style --fix Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Set row-gap between image and caption Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Set column-gap between the caption and close button Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Rename the class name Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Decrease inline spacing Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2022-07-04 08:10:46 +02:00
}
Improve LinkPreviewWidget (#8881) * Use shorthand for margin values Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Merge style declarations Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Merge style declarations Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Include mx_MatrixChat_useCompactLayout in mx_LinkPreviewWidget Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Include in mx_LinkPreviewWidget Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * yarn run lint:style --fix Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Use spacing variables Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Use logical variables Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Prevent flex children blowout Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Wrap caption Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * yarn run lint:style --fix Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Set row-gap between image and caption Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Set column-gap between the caption and close button Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Rename the class name Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Decrease inline spacing Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2022-07-04 08:10:46 +02:00
.mx_LinkPreviewWidget_title,
.mx_LinkPreviewWidget_description {
display: -webkit-box;
-webkit-box-orient: vertical;
overflow: hidden;
white-space: normal;
}
.mx_LinkPreviewWidget_title {
font-weight: bold;
-webkit-line-clamp: 2;
.mx_LinkPreviewWidget_siteName {
font-weight: normal;
}
}
.mx_LinkPreviewWidget_description {
margin-top: $spacing-8;
word-wrap: break-word;
-webkit-line-clamp: 3;
}
}
}