philomena/assets/css/views/_images.scss

332 lines
5.9 KiB
SCSS
Raw Normal View History

2019-08-18 02:43:44 +02:00
.image-flex-grid {
padding-right: 0;
padding-bottom: 0;
}
.media-box__header {
2019-12-06 16:47:56 +01:00
span.favorites,
span.comments_count {
2019-08-18 02:43:44 +02:00
padding-left: 4px;
}
span.score {
padding: 0 4px;
}
}
.media-box__header--small {
2019-12-06 16:47:56 +01:00
span.favorites,
span.comments_count {
2019-08-18 02:43:44 +02:00
padding-left: 2px;
}
span.score {
padding: 0 2px;
}
}
a.interaction--fave {
color: $fave_color;
2019-12-06 16:47:56 +01:00
&.active,
&:hover {
2019-08-18 02:43:44 +02:00
background: $fave_color;
color: $text_light_color;
}
}
a.interaction--upvote {
color: $vote_up_color;
2019-12-06 16:47:56 +01:00
&.active,
&:hover {
2019-08-18 02:43:44 +02:00
background: $vote_up_color;
color: $text_light_color;
}
}
a.interaction--downvote {
color: $vote_down_color;
2019-12-06 16:47:56 +01:00
&.active,
&:hover {
2019-08-18 02:43:44 +02:00
background: $vote_down_color;
color: $text_light_color;
}
}
a.interaction--hide {
color: $hide_color;
2019-12-06 16:47:56 +01:00
&.active,
&:hover {
2019-08-18 02:43:44 +02:00
background: $hide_color;
color: $text_light_color;
}
}
a.interaction--comments {
color: $link_hover_color;
&:hover {
background: $link_hover_color;
color: $background_color;
}
}
2019-12-06 16:47:56 +01:00
2019-08-18 02:43:44 +02:00
/* Disable spoilered image downvoting (see the interactions script) */
2019-12-06 16:47:56 +01:00
2019-08-18 02:43:44 +02:00
.interaction--downvote.disabled,
.interaction--downvote.disabled:hover {
cursor: default;
color: $downvote_disabled_color;
background: $media_box_color;
}
.tag-info__image {
border: $border;
text-align: center;
font-size: 12px;
}
2019-12-06 16:47:56 +01:00
2019-08-18 02:43:44 +02:00
/* Images rendered using the 'images/image_container' partial (image lists, comment list previews, gallery thumbs) */
2019-12-06 16:47:56 +01:00
2019-08-18 02:43:44 +02:00
div.image-container {
position: relative;
display: inline-block;
2019-12-06 16:47:56 +01:00
overflow: hidden;
/* prevent .media-box__overlay from overflowing the container */
2019-08-18 02:43:44 +02:00
text-align: center;
a::before {
content: "";
display: inline-block;
height: 100%;
vertical-align: middle;
}
2019-12-06 16:47:56 +01:00
img,
video {
2019-08-18 02:43:44 +02:00
vertical-align: middle;
max-width: 100%;
max-height: 100%;
}
/* Make the link cover the whole container if the image is oblong */
a {
width: 100%;
height: 100%;
display: inline-block;
text-align: center;
vertical-align: middle;
}
}
2019-12-06 16:47:56 +01:00
/* spoilered images inside communications */
span.spoiler div.image-container {
display: block;
}
2019-08-18 02:43:44 +02:00
/* .image-container sizes, set by the partial. */
2019-12-06 16:47:56 +01:00
2019-08-18 02:43:44 +02:00
.thumb {
max-width: 250px;
max-height: 250px;
}
.thumb_small {
max-width: 150px;
max-height: 150px;
}
.thumb_tiny {
width: 50px;
height: 50px;
}
2019-12-06 16:47:56 +01:00
2019-08-18 02:43:44 +02:00
/* Used for elements that wrap .image-container */
2019-12-06 16:47:56 +01:00
2019-08-18 02:43:44 +02:00
.thumb-tiny-container {
width: 50px;
height: 50px;
}
//embedded images. kinda like image-container, but this one also shows a text, link to filter page, etc
.image-show-container {
color: $foreground_color;
display: inline-block;
max-width: 100%;
padding-bottom: 6px;
span.spoileredtag,
span.hiddentag {
font-weight: bold;
}
a {
color: $image_show_link_color;
}
&:hover a:hover {
color: $image_show_link_hover_color;
}
}
2019-12-06 16:47:56 +01:00
2019-08-18 02:43:44 +02:00
/* This and the one above needed for older browsers for some reason, appears to be a bug */
2019-12-06 16:47:56 +01:00
.image-target {
2019-08-18 02:43:44 +02:00
max-width: 100%;
}
2019-12-06 16:47:56 +01:00
2019-08-18 02:43:44 +02:00
/* Resizes large images to fit in a smaller container; width and height are defined inline */
2019-12-06 16:47:56 +01:00
2019-08-18 02:43:44 +02:00
.image-constrained {
display: flex;
justify-content: center;
align-items: center;
img {
max-width: 100%;
max-height: 100%;
}
}
.image-scaled {
max-width: 100%;
max-height: 100%;
/* Due to the address bar hiding/reappearing in mobile browsers, viewport
* units are only reliable in desktop browsers. */
@media (min-width: $min_px_width_for_desktop_layout) {
max-height: 80vh;
}
}
.image-partscaled {
max-width: 100%;
}
.image-description {
overflow: auto;
2019-08-18 02:43:44 +02:00
img {
max-width: 100%;
}
}
.image-size {
white-space: nowrap;
}
.js-source-link {
2021-02-02 19:58:22 +01:00
word-wrap: break-word;
}
#image-source > p {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
2019-08-18 02:43:44 +02:00
}
.interaction-user-list-item {
display: inline-block;
padding: 2px;
padding-right: 7px;
}
.image_menu {
padding-left: 0;
margin: 1em 0 0 0;
}
.horizontal-list {
margin: 0;
padding-left: 0;
list-style: none;
li {
display: inline-block;
}
2019-12-06 16:47:56 +01:00
li+li {
2019-08-18 02:43:44 +02:00
margin-left: 1em;
}
}
.dnp-warning {
padding: 0.5em;
border: 3px solid $vote_down_color;
background: $admin_links_color;
a {
color: $vote_down_color;
font-weight: bold;
&:hover {
color: $dnp_warning_hover_color;
}
}
h4 {
margin-top: 0.3em;
margin-bottom: 0.2em;
}
}
.derpy__2fa {
width: 25%;
min-width: 200px;
}
.derpy__login {
margin-left: 8px;
align-self: flex-end;
}
#js-image-upload-previews {
display: flex;
flex-flow: row wrap;
justify-content: flex-start;
align-items: center;
&:empty {
display: none;
}
2021-10-06 03:31:50 +02:00
img, video {
2019-08-18 02:43:44 +02:00
max-height: 200px;
max-width: 200px;
}
.scraper-preview--label {
cursor: pointer;
margin: 0 8px 8px 0;
.scraper-preview--image-wrapper {
display: inline-block;
padding: 9px;
border: 1px solid transparent;
opacity: .6;
}
.scraper-preview--image {
background: url(data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeD0iMHB4IiB5PSIwcHgiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMTYgMTYiIHhtbDpzcGFjZT0icHJlc2VydmUiPjxyZWN0IGZpbGw9IiNGRkZGRkYiIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIvPjxyZWN0IGZpbGw9IiNFRkVGRUYiIHdpZHRoPSI4IiBoZWlnaHQ9IjgiLz48cmVjdCBmaWxsPSIjRUZFRkVGIiB3aWR0aD0iOCIgaGVpZ2h0PSI4IiB4PSI4IiB5PSI4Ii8+PC9zdmc+Cg==) repeat top left;
background-size: 16px;
}
.scraper-preview--input {
display: none;
}
2019-12-06 16:47:56 +01:00
&.checked>.scraper-preview--image-wrapper,
.scraper-preview--input:checked+.scraper-preview--image-wrapper {
2019-08-18 02:43:44 +02:00
opacity: 1;
border-color: $input_border_active;
background-color: $input_color_active;
}
}
}
.detail-link {
margin-right: 8px;
}
.full-height {
height: 100%;
2021-02-02 19:58:22 +01:00
}
2021-11-13 18:53:35 +01:00
.image_sources {
display: grid;
grid-template-columns: 2em auto;
}
.image_source__icon, .image_source__link {
padding: 0.5em;
overflow: hidden;
2021-11-13 18:53:35 +01:00
}
.image_source__icon {
justify-self: center;
}