docbrown/app/assets/stylesheets/article-show.scss
ludwiczakpawel cb1f03ce9f
[deploy] CSS fixes (#8764)
* flare tag line height

* .

* fix editor overflow issue

* fix editor overflow issue

* themable actions colors

* name position
2020-06-18 09:16:13 -04:00

1057 lines
19 KiB
SCSS

@import 'variables';
@import 'mixins';
@import 'config/import';
.unpublished {
background: $red;
display: block;
text-align: center;
position: relative;
padding: calc(10px + 1.3vw) 10px;
color: white;
font-family: var(--ff-default);
@media screen and (min-width: 380px) {
font-size: 1.2em;
line-height: 1.5em;
}
&:hover {
opacity: 0.92;
color: white;
}
em {
display: inline-block;
font-weight: bold;
}
}
.blank-space {
height: 10px;
}
.mod-actions-menu {
position: fixed;
top: var(--header-height);
right: 0;
height: calc(100vh - var(--header-height));
z-index: 100;
transform: translateX(360px);
transition: var(--transition-props);
iframe {
height: 100%;
border: none;
width: 360px;
}
&.showing {
transform: initial;
iframe {
box-shadow: -4px 0px 15px rgba(0, 0, 0, 0.1);
}
}
}
.mod-actions-menu-btn {
position: fixed;
bottom: var(--su-7);
right: var(--su-7);
z-index: 201;
cursor: pointer;
transition: 0.3s all ease;
border-radius: 50px;
@media (max-width: $breakpoint-m) {
bottom: 68px;
right: 8px;
padding: 0;
svg {
height: 42px;
width: 42px;
}
}
}
.mod-actions-menu-btn {
transition: 0.3s all ease;
}
.flag-user-modal {
.flag-user-modal-header {
padding-left: var(--su-4);
h2 {
font-weight: var(--fw-bold);
font-size: var(--fs-l);
line-height: var(--lh-tight);
}
.modal-header-close-icon {
border-radius: 100%;
background: var(--base-10);
}
}
.flag-user-modal-body {
padding: var(--su-6);
span {
font-size: var(--fs-base);
line-height: var(--lh-base);
color: var(--base-90);
}
.crayons-fields {
margin-top: var(--su-4);
.abuse-report-link {
margin: var(--su-4) 0 0 var(--su-7);
}
}
.buttons-container {
margin-top: var(--su-8);
}
}
}
.video-player-header {
background: $black;
margin-top: 0;
max-width: 1050px;
margin: auto;
margin-bottom: 15px;
height: 56.25vw;
overflow: hidden;
@media screen and (min-width: 880px) {
height: 492px;
}
@media screen and (min-width: 950px) {
border-top-left-radius: 2px;
border-top-right-radius: 2px;
}
}
body.default-navbar-config {
.article .body [id] {
scroll-margin-top: var(--header-height);
}
}
article {
padding: 0 0;
position: relative;
.image {
position: relative;
width: 100%;
margin: auto;
max-width: 1024px;
z-index: 2;
height: 42vw;
@media screen and (min-width: 880px) {
height: 370px;
}
@media screen and (min-width: 950px) {
border-top-left-radius: 2px;
border-top-right-radius: 2px;
}
}
.category-banner {
height: 250px;
background: #45525c;
}
}
.home .container {
@media screen and (min-width: $max-width) {
margin-left: 16px;
}
}
.container {
width: 880px;
max-width: 100%;
margin: 0 auto 20px;
text-align: left;
@include dev-card;
@media screen and (min-width: 950px) {
border-radius: 3px;
margin-top: 24px;
}
&.article {
position: relative;
z-index: 5;
}
.title {
z-index: 6;
position: relative;
width: 81%;
font-family: var(--ff-default);
@media screen and (max-width: 750px) {
width: 90%;
}
@media screen and (max-width: 430px) {
width: 93%;
}
max-width: 710px;
margin: auto;
.org-branded-title-link {
color: var(--card-color-secondary);
.org-branded-title {
font-size: calc(0.9em + 0.3vw);
padding: 8px 0 6px;
margin-bottom: -8px;
@media screen and (min-width: 1600px) {
font-size: 20px;
}
.org-pic {
height: calc(27px + 0.5vw);
width: calc(27px + 0.5vw);
display: inline;
vertical-align: calc(-8px - 0.1vw);
border-radius: 100px;
margin-right: 0.2vw;
background: $light-gray;
}
}
}
h1 {
margin: 0 auto;
padding: 14px 0 7px;
font-weight: 700;
min-height: 40px;
font-size: calc(2vw + 26px);
word-break: break-word;
line-height: 1.28em;
@media screen and (min-width: 1600px) {
font-size: 57px;
}
.article-title-preamble {
display: block;
color: var(--base-60);
font-size: calc(16px + 0.2vw);
margin-bottom: -1.25vw;
@media screen and (min-width: 1600px) {
font-size: 18px;
margin-bottom: -18px;
}
}
.title-block {
display: inline-block;
}
&.medium {
font-size: calc(1.82vw + 25px);
@media screen and (min-width: 1600px) {
font-size: 47px;
}
}
&.long {
font-size: calc(1.48vw + 23px);
@media screen and (min-width: 1600px) {
font-size: 46px;
}
}
&.longer {
font-size: calc(1.44vw + 22px);
@media screen and (min-width: 1600px) {
font-size: 45px;
}
}
&.longest {
font-size: calc(1.42vw + 22px);
@media screen and (min-width: 1600px) {
font-size: 42px;
}
}
}
h3 {
margin: 2px auto;
padding: 0;
padding: 0 3px 16px;
font-weight: 500;
color: var(--card-color-tertiary);
font-size: 13.5px;
line-height: 1.8em;
@media screen and (min-width: 430px) {
font-size: 15px;
}
.profile-pic {
width: 28px;
height: 28px;
border-radius: 50px;
display: inline-block;
vertical-align: -9px;
margin-right: 2px;
background: $light-gray;
}
a {
color: var(--card-color-tertiary);
text-decoration: none;
}
.icon-img,
.reader-image-tiny {
opacity: 0.5;
width: 18px;
height: 18px;
vertical-align: -4px;
margin: 0 1px;
&:hover {
opacity: 0.6;
}
}
.published-at {
margin-right: 0;
display: inline-block;
}
.posted-date-inline {
display: inline-block;
}
.action-space {
padding: 0 0 0 0;
display: inline-flex;
min-width: 44px;
a {
display: inline-block;
background: $green;
color: $black;
padding: 2px 12px 3px;
border-radius: 3px;
line-height: 1.1em;
font-family: $helvetica-condensed;
font-stretch: condensed;
margin-right: 4px;
@media screen and (max-width: 376px) {
padding: 2px 6px 3px;
margin-left: 3px;
margin-left: 5px;
.post-word {
display: none;
}
}
}
}
}
.tags {
.tag {
display: inline-block;
border-radius: 3px;
font-size: 13px;
font-weight: bold;
padding: 2px 5px 3px;
border-radius: 2px;
background: #d6d9e0;
color: #606570;
&:hover {
opacity: 0.9;
}
}
}
}
.article-collection-wrapper {
font-family: var(--ff-default);
font-size: 16px;
border-radius: 5px;
border: 1px solid $light-medium-gray;
width: 92%;
max-width: 500px;
margin: calc(1.1vw + 5px) auto 1vw;
box-shadow: $bold-shadow;
p {
margin: 0px auto;
padding: calc(0.1vw + 9px);
font-weight: bold;
font-size: 0.96em;
}
.article-collection {
user-select: none;
font-size: 16px;
overflow: hidden;
position: relative;
z-index: 8;
a {
color: var(--body-color);
padding: calc(0.1vw + 9px);
display: block;
position: relative;
z-index: 4;
border-top: 1px solid $light-medium-gray;
font-size: 0.88em;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
&:last-child {
border-bottom-left-radius: 5px;
border-bottom-right-radius: 5px;
}
&.current-article {
background: var(--accent-brand-lighter);
color: var(--body-color-inverted);
}
&.coming-soon {
pointer-events: none;
color: lighten($black, 78%);
}
&.collection-link-hidden {
display: none;
}
}
}
&.article-collection-wrapper-bottom {
margin-bottom: 3vw;
p {
margin-top: 5px;
}
}
}
.body {
margin: auto;
width: 82%;
font-family: Palatino, 'Palatino Linotype', 'Palatino LT STD',
'Book Antiqua', Georgia, serif;
font-size: 21px;
line-height: 32px;
background: var(--card-bg);
position: relative;
z-index: 5;
padding: 5px 0px;
overflow-wrap: break-word;
a {
code {
color: $sky-blue;
}
&.anchor {
padding-top: 0;
margin-top: 0;
top: -50px;
display: block;
visibility: hidden;
position: relative;
}
}
h1,
h2,
h3,
h4,
h5,
h6 {
font-family: var(--ff-default);
margin: 0.3em auto;
padding-left: 4px;
padding-right: 4px;
}
h1 {
font-size: 1.85em;
line-height: 1.14em;
font-weight: 400;
}
h2 {
font-size: 1.7em;
font-weight: 400;
line-height: 1.14em;
padding-bottom: 0;
margin-bottom: 0.5em;
}
h3 {
font-size: 1.32em;
font-weight: 400;
}
hr {
width: calc(25% + 12px);
opacity: 0.1;
border-width: 1px;
border-style: solid;
border-color: var(--body-color);
margin: 1.3em auto 1.5em;
}
p {
margin: 0.95em 0 1.2em;
padding: 0.2em;
}
ul,
ol {
padding-left: 6px;
margin: 0.8em 0.7em 0.8em 1.9em;
}
ol {
br {
line-height: 0;
margin: 0;
padding: 0;
}
}
ul {
list-style-type: square;
br {
line-height: 0;
margin: 0;
padding: 0;
}
p {
margin: 0;
padding: 0;
}
ul {
margin: 0 0.7em 0 1.9em;
list-style-type: circle;
}
}
li {
margin: 0.3em auto;
}
figure {
margin: 0;
}
figcaption {
font-style: italic;
text-align: center;
font-size: 0.8em;
line-height: 1.4em;
color: var(--body-color);
display: block;
}
p + figcaption {
margin-top: -0.8em;
}
@media screen and (max-width: 750px) {
width: 92%;
}
@media screen and (max-width: 430px) {
font-size: 17.5px;
line-height: 26px;
width: 94%;
margin-left: 3%;
ul,
ol {
margin: 0.8em 0.7em 0.8em 1.4em;
}
h1 {
font-size: 1.6em;
}
h2 {
font-size: 1.4em;
}
h3 {
font-size: 1.16em;
}
}
blockquote {
border-left: calc(0.2vw + 2px) solid $dark-gray;
padding: 0.1% 6% 0.1% 4%;
margin: 1.6em 1vw;
font-size: 0.92em;
line-height: 1.4em;
p {
padding: 0;
margin: 0.95em 0 0.95em;
}
&.twitter-tweet {
font-family: var(--ff-default);
background: white;
max-width: 456px;
border: 1px solid #e9eef2;
font-size: 0.75em;
line-height: 1.35em;
border-radius: 5px;
margin: 1.6em auto;
padding: 60px 10px 18px;
color: white;
min-height: 60px;
padding: 33px 15px 8px;
a {
color: white;
}
@media screen and (min-width: 360px) {
padding: 60px 22px 18px;
min-height: 105px;
}
}
}
code {
margin: auto;
background: rgba(0, 0, 0, 0.1);
padding: 0.1em 0.3em 0;
border-radius: 2px;
font-size: 0.84em;
vertical-align: 0;
max-width: 100%;
line-height: 1.6em;
}
kbd {
display: inline-block;
padding: 3px 5px;
font-size: 11px;
line-height: 10px;
color: #444d56;
vertical-align: middle;
background-color: #fafbfc;
border: solid 1px #c6cbd1;
border-bottom-color: #959da5;
border-radius: 3px;
box-shadow: inset 0 -1px 0 #959da5;
}
pre {
background: #29292e;
border-radius: 2px;
overflow-x: auto;
color: #eff0f9;
line-height: 1.42em;
padding-left: 4%;
padding-right: 7%;
font-size: 0.7em;
width: 97%;
margin-left: -3%;
padding-top: 6%;
padding-bottom: 6%;
border-radius: 0;
overflow-wrap: normal;
@media screen and (min-width: 430px) {
width: 111%;
margin-left: -11%;
padding-left: 9%;
padding-right: 2%;
}
code {
background: #29292e;
color: #eff0f9;
white-space: pre;
}
}
img {
height: auto;
position: relative;
display: block;
margin: auto;
left: -4%;
max-width: 108%;
max-height: calc(50vh + 180px);
@media screen and (min-width: 430px) {
left: -6px;
max-width: calc(100% + 12px);
}
}
a.article-body-image-wrapper {
cursor: zoom-in;
}
iframe {
width: 100%;
border: 0;
margin: 1.2em 0;
}
.fluidvids {
margin: 1em 0;
iframe {
margin: 0;
}
}
.table-wrapper-paragraph {
width: 100%;
margin-left: 0%;
overflow-x: auto;
@media screen and (min-width: 430px) {
width: 108%;
margin-left: -4%;
}
@media screen and (min-width: 800px) {
width: 110%;
margin-left: -5%;
}
}
table {
font-family: var(--ff-default);
border-collapse: collapse;
font-size: 0.78em;
margin: 0.8em auto 1.2em;
table-layout: fixed;
@media screen and (min-width: 500px) {
font-size: 0.9em;
}
th {
border: 1px solid $light-medium-gray;
padding: 5px 1vw;
background: var(--body-bg);
text-align: left;
}
td {
border: 1px solid $light-medium-gray;
padding: 5px 1vw;
box-sizing: border-box;
}
}
.twitter-tweet {
margin: auto;
}
}
.about-the-author {
margin: auto;
width: calc(100% - 5px);
position: relative;
overflow: hidden;
padding: 0px 0px 5px;
background: var(--card-bg);
font-family: var(--ff-default);
a {
color: var(--body-color);
}
@media screen and (min-width: 520px) {
width: 82%;
}
.left-column {
text-align: center;
float: left;
width: 90px;
padding-top: 8px;
.profile-pic {
width: 70px;
height: 70px;
border-radius: 100px;
display: inline-block;
background: no-repeat center center;
background-size: cover;
margin-right: 2px;
margin-bottom: 12px;
}
}
.main-content {
margin: auto;
width: calc(100% - 92px);
float: left;
h4 {
margin: 13px 0 0;
font-size: 28px;
text-align: left;
font-weight: 400;
button {
background: $green;
color: $black;
font-family: $helvetica-condensed;
font-stretch: condensed;
border: 0;
font-size: 15px;
border-radius: 5px;
vertical-align: 2px;
padding: 4px 7px;
display: none;
margin-left: 6px;
&.showing {
display: inline-block;
}
}
}
p {
margin: 2px 0;
padding-left: 0;
line-height: 22px;
font-size: 0.88em;
}
.social {
font-size: 0.85em;
a {
color: var(--card-color-tertiary);
margin-right: 6px;
display: inline-block;
}
}
}
}
.html-variant-wrapper {
width: 88%;
margin: 0 auto 25px;
display: none;
@media screen and (min-width: 500px) {
width: 82%;
}
}
}
.showpage-reaction-cta {
width: 390px;
max-width: 78%;
margin: 30px auto;
padding: 20px 10px;
position: relative;
box-shadow: 3px 4px 0 darken($green, 25%);
display: none;
.down-arrow {
position: absolute;
bottom: -20px;
left: 30px;
width: 0;
height: 0;
border-left: 20px solid transparent;
border-right: 20px solid transparent;
border-top: 27px solid $green;
}
}
.show-comments-header {
// width: 800px;
// max-width: 90%;
margin: auto;
margin-bottom: -50px;
text-align: center;
font-family: var(--ff-default);
}
.primary-sticky-nav {
display: none;
}
.article-actions {
display: none;
}
.show-comments-footer {
// width: 800px;
// max-width: 98%;
margin: auto;
text-align: center;
.full-discussion-button {
padding: calc(0.6vw + 6px) 0;
border-radius: 3px;
display: block;
width: 100%;
margin: 7.5vw auto calc(1vw + 5px);
max-width: 450px;
background: $green;
color: $black;
font-family: $helvetica-condensed;
font-stretch: condensed;
@media screen and (min-width: 500px) {
font-size: 1.1em;
}
&:hover {
opacity: 0.96;
}
}
}
.org-branding {
font-family: var(--ff-default);
text-align: center;
margin-top: 20px;
margin-bottom: 0;
padding-bottom: 20px;
a {
color: var(--body-color);
}
.inner {
width: 800px;
max-width: calc(100% - 40px);
overflow: hidden;
padding: 24px 20px 0;
margin: auto;
}
.content {
font-size: calc(0.45vw + 16px);
@media screen and (min-width: 520px) {
float: left;
width: calc(100% - 150px);
text-align: left;
}
.name {
font-size: 2.2em;
font-weight: 500;
}
.summary {
padding-top: 5px;
padding-right: 10px;
padding-bottom: 8px;
font-weight: 400;
font-size: 0.9em;
@media screen and (min-width: 520px) {
font-size: 17px;
}
}
.social {
font-size: 0.9em;
margin: 4px 0;
@media screen and (min-width: 520px) {
font-size: 18px;
}
a {
margin-right: 10px;
opacity: 0.85;
&:hover {
opacity: 1;
}
}
}
}
.profile-image {
text-align: center;
width: 100%;
float: left;
padding-top: 6px;
@media screen and (min-width: 520px) {
width: 150px;
}
img {
height: 100px;
width: 100px;
border-radius: 5px;
border-radius: 140px;
border: 3px solid $light-gray;
background: $light-gray;
}
}
}
.comments-container-container {
padding-bottom: 20px;
border-bottom-left-radius: 3px;
border-bottom-right-radius: 3px;
}
@keyframes fade-in {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
@keyframes SHW {
from {
bottom: -80px;
}
to {
bottom: 0;
}
}
@keyframes image-reaction-animation {
0% {
}
30% {
transform: rotate(-15deg);
}
100% {
}
}