mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-12-26 15:32:38 -05:00
199 lines
4.2 KiB
SCSS
199 lines
4.2 KiB
SCSS
.names {
|
|
float: left;
|
|
.username {
|
|
font-weight: bold;
|
|
}
|
|
span {
|
|
font-size: 0.929em;
|
|
padding-right: 8px;
|
|
display: inline-block;
|
|
max-width: 280px;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
a {
|
|
color: scale-color($primary, $lightness: 30%);
|
|
}
|
|
}
|
|
.fa {
|
|
font-size: 11px;
|
|
margin-left: 3px;
|
|
color: scale-color($primary, $lightness: 40%);
|
|
}
|
|
.new_user a, .user-title, .user-title a {
|
|
color: scale-color($primary, $lightness: 50%);
|
|
}
|
|
}
|
|
|
|
// global styles for the cooked HTML content in posts (and preview)
|
|
.cooked, #wmd-preview {
|
|
word-wrap: break-word;
|
|
h1, h2, h3, h4, h5, h6 { margin: 30px 0 10px; }
|
|
h1 { line-height: 1em; } /* normalize.css sets h1 font size but not line height */
|
|
a { word-wrap: break-word; }
|
|
}
|
|
|
|
|
|
.cooked, #wmd-preview {
|
|
video {
|
|
max-width: 100%;
|
|
}
|
|
sup sup {
|
|
top: 0;
|
|
}
|
|
}
|
|
// we use aside to hold expandable quotes (versus, say, static blockquotes)
|
|
aside.quote {
|
|
margin-top: 1em;
|
|
margin-bottom: 1em;
|
|
|
|
.badge-wrapper { margin-left: 5px; }
|
|
|
|
.title {
|
|
border-left: 5px solid dark-light-diff($primary, $secondary, 90%, -65%);
|
|
background-color: dark-light-diff($primary, $secondary, 97%, -45%);
|
|
color: scale-color($primary, $lightness: 30%);
|
|
// IE will screw up the blockquote underneath if bottom padding is 0px
|
|
padding: 12px 12px 1px 12px;
|
|
// blockquote is underneath this and has top margin
|
|
.avatar { margin-right: 7px; }
|
|
img { margin-top: -4px; }
|
|
@include unselectable;
|
|
}
|
|
|
|
// blockquote is docked within aside for content
|
|
blockquote {
|
|
margin-top: 0;
|
|
}
|
|
}
|
|
|
|
.quote-controls, .quote-controls .back:before, .quote-controls .quote-other-topic:before {
|
|
color: scale-color($primary, $lightness: 60%);
|
|
}
|
|
|
|
.cooked .highlight {
|
|
background-color: dark-light-diff($tertiary, $secondary, 85%, -65%);
|
|
padding: 2px;
|
|
margin: -2px;
|
|
}
|
|
|
|
.post-action {
|
|
.undo-action, .act-action{
|
|
margin-left: 5px;
|
|
}
|
|
}
|
|
|
|
.post-hidden {
|
|
opacity: 0.5;
|
|
}
|
|
|
|
|
|
.quote-controls {
|
|
float: right;
|
|
a {
|
|
margin: 0;
|
|
}
|
|
|
|
.back:before, .quote-other-topic:before
|
|
{
|
|
display: inline-block;
|
|
margin-left: 8px;
|
|
font-family: "FontAwesome";
|
|
position: relative;
|
|
z-index: 20;
|
|
content: "\f062";
|
|
}
|
|
|
|
.quote-other-topic:before
|
|
{
|
|
content: "\f061";
|
|
}
|
|
}
|
|
|
|
.quote-button {
|
|
display: none;
|
|
position: absolute;
|
|
background-color: scale-color($primary, $lightness: 50%);
|
|
color: $secondary;
|
|
padding: 10px;
|
|
z-index: 401;
|
|
|
|
&:before {
|
|
font-family: "FontAwesome";
|
|
content: "\f10e\00a0\00a0";
|
|
}
|
|
|
|
&:hover {
|
|
background-color: scale-color($primary, $lightness: 40%);
|
|
cursor: pointer;
|
|
}
|
|
}
|
|
|
|
.wiki .topic-body {
|
|
background-color: dark-light-diff($wiki, $secondary, 95%, -50%);
|
|
}
|
|
|
|
// this ensures consistent top margin on topic posts even if the first line of a post
|
|
// is a top-margin-less element like a list or image.
|
|
.topic-body .contents {
|
|
margin-top: 15px;
|
|
}
|
|
|
|
.post-info {
|
|
&.wiki, &.via-email {
|
|
margin-right: 5px;
|
|
i.fa {
|
|
font-size: 1em;
|
|
}
|
|
}
|
|
&.wiki {
|
|
cursor: pointer;
|
|
color: $wiki;
|
|
}
|
|
&.via-email {
|
|
color: scale-color($primary, $lightness: 70%);
|
|
}
|
|
&.raw-email {
|
|
cursor: pointer;
|
|
}
|
|
}
|
|
|
|
pre {
|
|
code {
|
|
white-space: pre-wrap;
|
|
display: block;
|
|
padding: 5px 10px;
|
|
color: $primary;
|
|
background: dark-light-diff($primary, $secondary, 97%, -45%);
|
|
max-height: 500px;
|
|
}
|
|
}
|
|
|
|
kbd
|
|
{
|
|
background-color: $secondary;
|
|
border: 1px solid scale-color-diff();
|
|
border-radius: 3px;
|
|
box-shadow: 0 1px 0 rgba(0,0,0, .8);
|
|
color: $primary;
|
|
display: inline-block;
|
|
font-size: 0.857em;
|
|
line-height: 1.4;
|
|
margin: 0 .1em;
|
|
padding: .1em .6em;
|
|
|
|
// don't allow more than 3 nested elements to prevent FF from crashing
|
|
// cf. http://what.thedailywtf.com/t/nested-elements/7927
|
|
// 3 levels are needed to prevent highlighted words being hidden
|
|
// cf. https://meta.discourse.org/t/word-disappears-when-searched-and-in-details-summary-kbd-b/25741
|
|
* * * { display: none; }
|
|
}
|
|
|
|
// we assume blockquotes have their own margins, so all blockquotes
|
|
// will remove margins from first (top) and last (bottom) child elements
|
|
blockquote > *:first-child {
|
|
margin-top: 0 !important;
|
|
}
|
|
blockquote > *:last-child {
|
|
margin-bottom: 0 !important;
|
|
}
|