discourse/app/assets/stylesheets/application/topic-post.css.scss

829 lines
16 KiB
SCSS
Raw Normal View History

2013-02-05 14:16:51 -05:00
@import "foundation/variables";
@import "foundation/mixins";
@include small-width {
#selected-posts {
display: none;
}
.topic-body {
width: 670px;
}
}
@include medium-width {
#selected-posts {
margin-left: 330px;
width: 12%;
p {
font-size: 13px;
}
}
}
@include large-width {
#selected-posts {
margin-left: 275px;
width: 20%;
}
}
#selected-posts {
position: fixed;
z-index: 1000;
left: 50%;
@include border-radius-all(4px);
background-color: lighten($blue, 52%);
border: 1px solid lighten($blue, 40%);
padding: 5px;
margin-bottom: 5px;
button {
width: 160px;
margin: 4px auto;
display: inline-block;
text-align: left;
}
2013-02-05 14:16:51 -05:00
&.hidden {
display: none;
}
.controls {
margin-top: 10px;
}
p {
margin: 0 0 10px 0;
}
p.cancel {
margin: 10px 0 0 0;
}
h3 {
font-size: 25px;
color: $black;
margin-bottom: 5px;
i {
margin-right: 7px;
}
}
}
@include small-width {
.topic-post {
.gutter {
width: 100px;
}
}
}
@include medium-width {
.topic-post {
.gutter {
width: 160px;
}
}
}
.topic-post {
margin-bottom: 8px;
pre code {
max-height: 690px;
}
@include hover {
.gutter {
.reply-new,
.track-link {
opacity:1;
2013-02-05 14:16:51 -05:00
}
}
}
.gutter {
.reply-new{
.discourse-no-touch & {
opacity: 0;
}
2013-03-15 04:35:26 -04:00
.discourse-touch & {
opacity: 1;
}
transition:opacity 1s linear;
-webkit-transition:opacity 1s linear;
}
2013-02-05 14:16:51 -05:00
.reply-new,
.track-link {
display: inline-block;
color: #808080;
font-size: 13px;
text-shadow: 0 1px 0 $white;
.discourse-touch & {
visibility: visible;
}
&:hover {
color: #2eaee5;
}
&:active {
color: #1d92c5;
}
i {
position: relative;
width: 19px;
margin-right: 6px;
border: 1px solid #b9b9b9;
font-size: 14px;
line-height: 19px;
text-align: center;
background-color: #fafafa;
padding: 1px 2px;
2013-02-05 14:16:51 -05:00
@include border-radius-all(20px);
&:after {
display: block;
position: absolute;
top: 9px;
left: -13px;
width: 12px;
height: 0;
content: "";
border-top: 1px solid #ccc;
}
}
}
.reply-new i {
padding-top: 2px;
padding-left: 3px;
padding-right: 3px;
2013-02-05 14:16:51 -05:00
line-height: 17px;
color: $attention_fg;
background-color: $attention_bg;
}
.post-links {
margin: 0;
list-style: none;
> li {
margin-bottom: 10px;
}
.incoming .icon-arrow-right:before {
content: "\f060";
}
}
}
// Moderator post colours
&.moderator {
article.boxed {
.topic-body {
.contents {
background-color: #eef0ff;
&:after {
display: none;
}
}
&:after{
border-right-color: #eef0ff;
}
}
}
}
img[alt=hidden] {
display: none;
}
ul {
li {
font-size: 14px;
}
}
.multi-select & {
section.post-menu-area {
display: none !important;
}
}
@include hover {
section.post-menu-area {
display: block;
}
}
section.post-menu-area {
.discourse-no-touch & {
opacity: 0.2;
@include fade-soft(1s);
2013-02-05 14:16:51 -05:00
}
}
&:hover section.post-menu-area {
opacity: 1;
}
button.show-replies {
span.badge-posts {
margin-right: 6px;
}
i.icon {
margin-left: 6px;
font-size: 10px;
}
color: $controls;
border: none;
background: none;
padding: 8px 10px;
border-right: 1px solid $inner_border;
}
.contents:not(.bottom-round) .show-replies {
position: absolute;
padding-bottom: 9px;
border-right-color: #b9b9b9;
background-color: #e9e6e6;
}
section.post-menu-area {
2013-04-08 17:43:52 -04:00
@include unselectable;
2013-02-25 11:42:20 -05:00
background-color: $post_footer;
2013-02-05 14:16:51 -05:00
overflow: hidden;
@include box-shadow(inset 0 -4px 4px -4px rgba($black, 0.14));
nav.post-controls {
2013-04-08 17:43:52 -04:00
@include unselectable;
2013-02-05 14:16:51 -05:00
padding: 0px;
button {
border: none;
color: $nav-button-color;
background: $post_footer;
font-size: 15px;
padding: 8px 10px;
2013-07-09 13:11:13 -04:00
border-left: 1px solid lighten($inner_border, 3%);
2013-02-05 14:16:51 -05:00
vertical-align: top;
@include box-shadow(inset 0 -4px 4px -4px rgba($black, 0.14));
&:hover {
color: $nav-button-color-hover;
background-color: $nav-button-background-color-hover;
}
&:active {
color: $nav-button-color-active;
background-color: $nav-button-background-color-active;
}
&.hidden {
display: none;
}
&.like, &.edit, &.flag, &.delete, &.share, &.bookmark, &.create {
float: right;
}
.read-icon {
&:before {
font-family: "FontAwesome";
content: "\f02e";
}
&.unseen {
&:before {
content: "\f097";
}
}
&.last-read {
color: $red;
}
&.bookmarked {
&:before {
color: $bookmarkColor;
}
}
}
2013-02-05 14:16:51 -05:00
}
button.create {
color: $attention_fg;
font-weight:bold;
background-color: $attention_bg;
&:hover {
color: darken($attention_fg, 4%);
background-color: darken($attention_bg, 4%);
}
&:active {
color: darken($attention_fg, 8%);
background-color: darken($attention_bg, 8%);
}
i {
font-size: 13px;
margin-right: 4px;
}
}
button.delete {
&:hover {
color: white;
background-color: $btn-danger-background-color;
}
2013-02-05 14:16:51 -05:00
}
2013-02-05 14:16:51 -05:00
button.like {
&:hover {
color: $nav-like-button-color-hover;
background-color: $nav-like-button-background-color-hover;
}
&:active {
color: $nav-like-button-color-active;
background-color: $nav-like-button-background-color-active;
}
}
&.toggled {
display: block;
}
.post-number {
// display: inline-block;
display: none;
line-height: 8px;
margin-left: 3px;
font-size: 14px;
.discourse-touch & {
margin-right: 29px;
}
}
}
}
.bottom-round > .post-menu-area {
border-bottom-left-radius: 4px;
border-bottom-right-radius: 4px;
}
.topic-meta-data {
.contents {
text-align: center;
padding: 0 10px 0 0;
h3 {
margin: 3px 0 0;
font-size: 13px;
2013-02-05 14:16:51 -05:00
line-height: 18px;
}
2013-02-06 17:36:07 -05:00
.staff a {
@include border-radius-all(3px);
2013-07-30 19:25:18 -04:00
padding: 1px 3px;
2013-02-06 17:36:07 -05:00
background-color: #ffe;
border: 1px solid #ffd;
}
h3.new-user a[href] {
color: $dark_gray;
}
2013-02-05 14:16:51 -05:00
div {
display: block;
}
.score {
font-size: 12px;
}
.user-title {
font-size: 11px;
margin-top: 2px;
line-height: 15px;
color: #555;
}
2013-02-05 14:16:51 -05:00
}
}
.topic-meta-data-inside {
float: right;
z-index: 490;
margin-left: 20px;
.post-info {
font-size: 12px;
display: inline-block;
margin-right: 12px;
&.edits {
a, a:visited {
color: #aaa;
}
}
}
.post-date {
color: #aaa;
}
}
2013-02-05 14:16:51 -05:00
.reply-to-tab {
z-index: 490;
2013-02-05 14:16:51 -05:00
font-size: 12px;
color: $darkish_gray;
display: block;
padding: 5px 5px 5px 8px;
@include border-radius-bottom(4px);
text-decoration: none;
position: absolute;
left: 120px;
background-color: #fafafa;
border: 1px solid #DDD;
margin-top: -1px;
@include box-shadow(1px 1px 2px rgba($black, 0.07));
img {
margin-left: 6px;
}
@include hover {
background-color: mix($gray, $light_gray, 5%);
}
}
.embedded-posts.bottom {
@include border-radius-bottom(4px);
border-bottom: 1px solid #b9b9b9;
display: none;
overflow: hidden;
.arrow {
float: right;
margin: 3px 0 3px 0;
}
2013-02-05 14:16:51 -05:00
}
.embedded-posts.top {
@include border-radius-top(4px);
border-top: 1px solid #b9b9b9;
overflow: hidden;
}
.embedded-posts {
background-color: #e9e6e6;
.topic-meta-data-inside {
margin: 3px -8px 3px 20px;
}
2013-02-05 14:16:51 -05:00
div.reply {
border-left: 1px solid #b9b9b9;
border-right: 1px solid #b9b9b9;
padding: 10px;
margin: 0;
background-clip: padding-box;
.topic-meta-data {
.contents {
border: 0;
color: rgba(#323232, 0.9);
font-size: 10px;
line-height: 12px;
background-color: transparent;
@include box-shadow(none);
h5 {
margin-top: 1px;
font-size: 11px;
line-height: 13px;
}
}
}
.topic-body {
z-index: 10;
border: 1px solid #b9b9b9;
padding: 0 8px;
color: black;
background-color: $white;
background-clip: padding-box;
@include border-radius-all(4px);
@include box-shadow(0 1px 2px rgba($black, 0.07));
&:before {
left: -10px;
}
&:after {
left: -9px;
}
2013-02-15 15:17:57 -05:00
a.arrow {
color: grey;
2013-02-15 15:17:57 -05:00
}
2013-02-05 14:16:51 -05:00
}
.about {
.contents {
padding: 0;
}
}
}
}
&.selected {
article.boxed {
.post-select {
background-color: $blue;
color: $white;
}
.topic-body {
.contents {
@include box-shadow(0px 0px 7px $blue);
}
.contents:after {
display: none;
}
}
}
}
article.boxed {
position: relative;
font-size: 16px;
line-height: 20px;
2013-02-05 14:16:51 -05:00
.post-select {
@include border-radius-all(4px);
background-color: $light_gray;
border-top: 1px solid $white;
border-left: 1px solid $white;
border-bottom: 1px solid $gray;
border-right: 1px solid $gray;
color: $darkish_gray;
top: 4px;
position: absolute;
right: 5px;
2013-02-05 14:16:51 -05:00
font-size: 12px;
padding: 2px 5px;
z-index: 490;
}
2013-02-05 14:16:51 -05:00
img {
max-width: 100%;
}
video {
max-width: 100%;
height: auto;
}
audio {
max-width: 100%;
}
2013-02-05 14:16:51 -05:00
.topic-body {
position: relative;
.contents {
.cooked {
2013-06-19 14:30:05 -04:00
padding: 10px 10px 0;
2013-02-05 14:16:51 -05:00
}
position: relative;
padding: 0;
background-color: $white;
word-wrap: break-word;
@include border-radius-top(4px);
.calc {
background-color: $highlight;
margin-bottom: 10px;
padding: 4px 8px;
display: none;
p {
font-size: 12px;
margin: 0 0 5px 0;
}
}
}
.contents.bottom-round {
overflow: hidden;
2013-02-25 11:42:20 -05:00
background-clip: padding-box;
2013-02-05 14:16:51 -05:00
@include border-radius-bottom(4px);
@include box-shadow(0 1px 2px rgba($black, 0.07));
}
.contents.avoid-tab {
.topic-meta-data-inside {
position: relative;
top: -30px;
}
2013-02-05 14:16:51 -05:00
padding-top: 30px;
.cooked {
padding-top: 10px;
}
2013-02-05 14:16:51 -05:00
}
.post-actions {
2013-04-17 02:32:23 -04:00
padding: 3px 0 0px 15px;
2013-02-05 14:16:51 -05:00
font-size: 12px;
img {
margin-right: 2px;
}
}
footer {
padding-left: 35px;
}
}
section {
font-size: 14px;
color: $dark_gray;
}
}
&.replies-above .boxed .topic-body .contents {
@include border-radius-top(0);
}
}
2013-02-05 14:16:51 -05:00
.topic-body {
position: relative;
// this removes the topmost margin;
// if we don't have this, all posts would have extra space at the top
.cooked > *:first-child {
margin-top: 0px !important;
}
// ditto for blockquotes, no extra margin for first element inside please
.cooked > blockquote *:first-child {
margin-top: 0px !important;
}
.cooked {
// set up proper header margins in posts
h1, h2, h3, h4, h5, h6 {
margin: 20px 0 10px;
}
2013-03-24 05:26:54 -04:00
}
2013-03-24 05:01:07 -04:00
// this is the little pointy bit of the speech bubble on the post, on the left side
2013-02-05 14:16:51 -05:00
&:before,
&:after {
position: absolute;
width: 0;
height: 0;
content: "";
border-style: solid;
border-color: transparent;
pointer-events: none;
}
&:before {
top: 12px;
left: -9px;
border-width: 10px 10px 10px 0;
border-right-color: #dfdfdf;
2013-02-05 14:16:51 -05:00
}
&:after {
top: 13px;
left: -8px;
border-width: 9px 9px 9px 0;
border-right-color: $white;
}
}
.topic-post.hidden {
2013-02-25 11:42:20 -05:00
display: block;
2013-02-05 14:16:51 -05:00
opacity: 0.4;
}
.topic-post.deleted {
opacity: 0.8;
article.boxed {
.topic-body .contents {
2013-02-25 11:42:20 -05:00
background-color: #ffcece;
2013-02-05 14:16:51 -05:00
}
.topic-body::after {
border-right-color: #ffcece;
}
}
}
// Topic summary
// --------------------------------------------------
.topic-summary {
margin-top: 8px;
background-color: darken($white, 3%);
@include border-radius-all(4px);
@include box-shadow(0 1px 2px rgba($black, 0.07));
h3 {
margin-bottom: 4px;
color: #323232;
line-height: 23px;
}
h4 {
2013-03-24 05:07:37 -04:00
margin: 0 0 3px 0;
2013-02-05 14:16:51 -05:00
color: #6c7376;
font-weight: normal;
font-size: 12px;
line-height: 15px;
}
p,
.participants {
margin: 0 0 7px;
}
ul {
margin: 0;
list-style: none;
}
.avatars {
> div {
float: left;
position: relative;
margin: 3px 0;
}
.post-count {
position: absolute;
top: 2px;
right: 6px;
padding: 0 4px;
color: $white;
font-weight: normal;
font-size: 11px;
line-height: 14px;
background-color: rgba($black, 0.5);
@include border-radius-all(2px);
}
}
.avatar {
float: left;
margin-right: 4px;
}
.poster.toggled .avatar {
2013-02-23 10:37:06 -05:00
@include box-shadow(0 0 6px 1px desaturate(lighten($link_color, 18%), 35%));
2013-02-05 14:16:51 -05:00
}
.summary {
border-bottom: 1px solid #d1d1d2;
&.collapsed {
border-bottom: 0;
}
li {
float: left;
border-right: 1px solid #e6e6e6;
padding: 7px 14px;
&:last-of-type {
border-right: 0;
}
}
a,
.number {
font-weight: bold;
line-height: 20px;
}
.number {
color: #445a62;
}
.avatar + a {
float: left;
}
}
.avatars,
.links,
.information {
padding: 7px 14px;
color: #000;
}
.information {
border-top: 1px solid #d1d1d2;
}
.topic-links {
.badge-notification {
margin: 0 0 4px;
}
}
.buttons {
2013-04-08 17:43:52 -04:00
@include unselectable;
2013-02-05 14:16:51 -05:00
float: right;
.btn {
border: 0;
border-left: 1px solid #e6e6e6;
padding: 0 23px;
color: #4c666f;
background: #eaf2f5;
text-shadow: 0 1px 0 rgba($white, 0.28);
@include border-radius-all(0 2px 0 0);
@include box-shadow(none);
&:hover {
background: darken(#eaf2f5, 5%);
}
&.collapsed {
@include border-radius-all(0 2px 2px 0);
}
.icon {
margin: 0;
font-size: 18px;
line-height: 52px;
}
}
}
}
// Custom Gutter Glyphs
2013-02-05 14:16:51 -05:00
// --------------------------------------------------
.private_message .gutter {
position: relative;
&:before {
display: block;
position: absolute;
top: 0;
left: 0;
color: rgba($black, 0.05);
font: 90px/1 FontAwesome;
content: "\f0e0";
2013-02-05 14:16:51 -05:00
}
}
.deleted-topic .gutter {
position: relative;
&:before {
display: block;
position: absolute;
top: 0;
left: 0;
color: rgba($black, 0.05);
font: 90px/1 FontAwesome;
content: "\f05c";
}
}
.secure_category .gutter {
position: relative;
&:before {
display: block;
position: absolute;
top: 0;
left: 0;
color: rgba($black, 0.05);
font: 90px/1 FontAwesome;
content: "\f0c0";
}
}