* Add a gap between thumbnails on mobile. * Adjust CSS for scores and vote buttons. * Include "Private favorites" as an incentive on the user upgrade page. * Fix vote buttons not being visible beneath thumbnails on mobile. * Fix the "Show scores" link not preserving the current page number. * Fix vote buttons being unintentionally enabled for all thumbnails by default. * Fix banned and restricted users being able to favorite posts by tagging them with `fav:self`. * Fix search engines being able to crawl /posts?view=score pages. * Fix broken tests.
133 lines
4.1 KiB
SCSS
133 lines
4.1 KiB
SCSS
@import "../../javascript/src/styles/base/000_vars.scss";
|
|
|
|
article.post-preview {
|
|
text-align: center;
|
|
display: inline-block;
|
|
position: relative;
|
|
overflow: hidden;
|
|
|
|
a {
|
|
display: inline-block;
|
|
position: relative;
|
|
|
|
.post-animation-icon {
|
|
color: var(--preview-icon-color);
|
|
background: var(--preview-icon-background);
|
|
}
|
|
}
|
|
|
|
&.captioned {
|
|
height: auto;
|
|
vertical-align: text-top;
|
|
}
|
|
|
|
&.post-preview-compact {
|
|
width: auto;
|
|
height: auto;
|
|
}
|
|
|
|
.desc {
|
|
font-size: var(--text-sm);
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
img {
|
|
margin: auto;
|
|
}
|
|
}
|
|
|
|
/* Avoid dead space around thumbnails in tables. */
|
|
table article.post-preview {
|
|
height: auto;
|
|
width: auto;
|
|
margin: 0;
|
|
}
|
|
|
|
.post-preview {
|
|
img {
|
|
border: 2px solid transparent;
|
|
}
|
|
|
|
&.post-status-has-children img {
|
|
border-color: var(--preview-has-children-color);
|
|
}
|
|
|
|
&.post-status-has-parent img {
|
|
border-color: var(--preview-has-parent-color);
|
|
}
|
|
|
|
&.post-status-has-children.post-status-has-parent img {
|
|
border-color: var(--preview-has-children-color) var(--preview-has-parent-color) var(--preview-has-parent-color) var(--preview-has-children-color);
|
|
}
|
|
|
|
&.post-status-deleted img {
|
|
border-color: var(--preview-deleted-color);
|
|
}
|
|
|
|
&.post-status-has-children.post-status-deleted img {
|
|
border-color: var(--preview-has-children-color) var(--preview-deleted-color) var(--preview-deleted-color) var(--preview-has-children-color);
|
|
}
|
|
|
|
&.post-status-has-parent.post-status-deleted img {
|
|
border-color: var(--preview-has-parent-color) var(--preview-deleted-color) var(--preview-deleted-color) var(--preview-has-parent-color);
|
|
}
|
|
|
|
&.post-status-has-children.post-status-has-parent.post-status-deleted img {
|
|
border-color: var(--preview-has-children-color) var(--preview-deleted-color) var(--preview-deleted-color) var(--preview-has-parent-color);
|
|
}
|
|
|
|
/* Pending and flagged posts have blue borders (except in the modqueue). */
|
|
&.post-status-pending:not(.mod-queue-preview) img,
|
|
&.post-status-flagged:not(.mod-queue-preview) img {
|
|
border-color: var(--preview-pending-color);
|
|
}
|
|
|
|
&.post-status-has-children.post-status-pending:not(.mod-queue-preview) img,
|
|
&.post-status-has-children.post-status-flagged:not(.mod-queue-preview) img {
|
|
border-color: var(--preview-has-children-color) var(--preview-pending-color) var(--preview-pending-color) var(--preview-has-children-color);
|
|
}
|
|
|
|
&.post-status-has-parent.post-status-pending:not(.mod-queue-preview) img,
|
|
&.post-status-has-parent.post-status-flagged:not(.mod-queue-preview) img {
|
|
border-color: var(--preview-has-parent-color) var(--preview-pending-color) var(--preview-pending-color) var(--preview-has-parent-color);
|
|
}
|
|
|
|
&.post-status-has-children.post-status-has-parent.post-status-pending:not(.mod-queue-preview) img,
|
|
&.post-status-has-children.post-status-has-parent.post-status-flagged:not(.mod-queue-preview) img {
|
|
border-color: var(--preview-has-children-color) var(--preview-pending-color) var(--preview-pending-color) var(--preview-has-parent-color);
|
|
}
|
|
}
|
|
|
|
/* Flagged posts have red borders for approvers. */
|
|
body[data-current-user-can-approve-posts="true"] .post-preview {
|
|
&.post-status-flagged img {
|
|
border-color: var(--preview-flagged-color);
|
|
}
|
|
|
|
&.post-status-has-children.post-status-flagged img {
|
|
border-color: var(--preview-has-children-color) var(--preview-flagged-color) var(--preview-flagged-color) var(--preview-has-children-color);
|
|
}
|
|
|
|
&.post-status-has-parent.post-status-flagged img {
|
|
border-color: var(--preview-has-parent-color) var(--preview-flagged-color) var(--preview-flagged-color) var(--preview-has-parent-color);
|
|
}
|
|
|
|
&.post-status-has-children.post-status-has-parent.post-status-flagged img {
|
|
border-color: var(--preview-has-children-color) var(--preview-flagged-color) var(--preview-flagged-color) var(--preview-has-parent-color);
|
|
}
|
|
}
|
|
|
|
@media screen and (min-width: 660px) {
|
|
article.post-preview {
|
|
width: 154px;
|
|
margin: 0 10px 10px 0;
|
|
vertical-align: top;
|
|
}
|
|
}
|
|
|
|
@media screen and (max-width: 660px) {
|
|
article.post-preview img {
|
|
border: none !important;
|
|
}
|
|
}
|