mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 05:47:31 +08:00
465 lines
7.3 KiB
SCSS
465 lines
7.3 KiB
SCSS
// Common
|
|
// global styles that apply to the Discourse application specifically
|
|
// BEWARE: changing these styles implies they take effect anywhere they are seen
|
|
// throughout the Discourse application
|
|
|
|
// Animation Keyframes
|
|
@keyframes ping {
|
|
from {
|
|
transform: scale(0.25);
|
|
opacity: 1;
|
|
}
|
|
to {
|
|
transform: scale(2);
|
|
opacity: 0;
|
|
}
|
|
}
|
|
|
|
@keyframes rotate-forever {
|
|
0% {
|
|
transform: rotate(0deg);
|
|
}
|
|
100% {
|
|
transform: rotate(360deg);
|
|
}
|
|
}
|
|
|
|
@keyframes background-fade-highlight {
|
|
0% {
|
|
background-color: $tertiary-low;
|
|
}
|
|
100% {
|
|
background-color: transparent;
|
|
}
|
|
}
|
|
|
|
// Base Elements
|
|
html {
|
|
height: 100%;
|
|
}
|
|
|
|
body {
|
|
background-attachment: fixed;
|
|
background-size: cover;
|
|
min-height: 100%;
|
|
|
|
@include clearfix;
|
|
}
|
|
|
|
big {
|
|
font-size: 28px;
|
|
}
|
|
|
|
small {
|
|
font-size: 9px;
|
|
}
|
|
|
|
//setting a static limit on big and small prevents nesting abuse
|
|
blockquote {
|
|
@include post-aside;
|
|
clear: both;
|
|
}
|
|
|
|
h1,
|
|
h2,
|
|
h3,
|
|
h4,
|
|
h5,
|
|
h6 {
|
|
margin-top: 0;
|
|
margin-bottom: .5rem;
|
|
}
|
|
|
|
button {
|
|
&.ok {
|
|
background: $success;
|
|
color: $secondary;
|
|
|
|
@include hover {
|
|
background: lighten($success, 10%);
|
|
color: $secondary;
|
|
}
|
|
}
|
|
|
|
&.cancel {
|
|
background: $danger;
|
|
color: $secondary;
|
|
|
|
@include hover {
|
|
background: lighten($danger, 10%);
|
|
color: $secondary;
|
|
}
|
|
}
|
|
}
|
|
|
|
ul.breadcrumb {
|
|
margin: 0 10px 0 10px;
|
|
}
|
|
|
|
a.no-href {
|
|
cursor: pointer;
|
|
}
|
|
|
|
img.avatar {
|
|
border-radius: 50%;
|
|
}
|
|
|
|
// don't wrap relative dates; we want Jul 26, '15, not: Jul
|
|
// 26,
|
|
// '15
|
|
span.relative-date {
|
|
white-space:nowrap;
|
|
}
|
|
|
|
label {
|
|
display: block;
|
|
margin-bottom: 5px;
|
|
}
|
|
|
|
input {
|
|
&[type="radio"],
|
|
&[type="checkbox"] {
|
|
margin: 3px 0;
|
|
line-height: normal;
|
|
cursor: pointer;
|
|
}
|
|
&[type="submit"],
|
|
&[type="reset"],
|
|
&[type="button"],
|
|
&[type="radio"],
|
|
&[type="checkbox"] {
|
|
width: auto;
|
|
}
|
|
|
|
&.invalid {
|
|
background-color: dark-light-choose(scale-color($danger, $lightness: 80%), scale-color($danger, $lightness: -60%));
|
|
}
|
|
|
|
.radio &[type="radio"],
|
|
.checkbox &[type="checkbox"] {
|
|
float: left;
|
|
margin-left: -18px;
|
|
}
|
|
}
|
|
|
|
// Common Classes
|
|
.radio,
|
|
.checkbox {
|
|
min-height: 18px;
|
|
padding-left: 18px;
|
|
|
|
.controls > &:first-child {
|
|
padding-top: 5px;
|
|
}
|
|
|
|
&.inline {
|
|
display: inline-block;
|
|
padding-top: 5px;
|
|
margin-bottom: 0;
|
|
vertical-align: middle;
|
|
}
|
|
}
|
|
|
|
.radio.inline .radio.inline,
|
|
.checkbox.inline .checkbox.inline {
|
|
margin-left: 10px;
|
|
}
|
|
|
|
.container {
|
|
@extend .clearfix;
|
|
}
|
|
|
|
.wrap {
|
|
@extend .clearfix;
|
|
margin-right: auto;
|
|
margin-left: auto;
|
|
padding: 0 8px;
|
|
|
|
.contents {
|
|
position: relative;
|
|
}
|
|
}
|
|
|
|
.boxed {
|
|
&.white {
|
|
background-color: $secondary;
|
|
}
|
|
}
|
|
|
|
.full-width {
|
|
margin-left: 12px;
|
|
}
|
|
|
|
// the default for table cells in topic list
|
|
// is scale-color($primary, $lightness: 50%)
|
|
// numbers get dimmer as they get colder
|
|
.coldmap {
|
|
&-high {
|
|
color: dark-light-choose(scale-color($primary, $lightness: 70%), scale-color($secondary, $lightness: 30%)) !important;
|
|
}
|
|
|
|
&-med {
|
|
color: dark-light-choose(scale-color($primary, $lightness: 60%), scale-color($secondary, $lightness: 40%)) !important;
|
|
}
|
|
|
|
&-low {
|
|
color: dark-light-choose(scale-color($primary, $lightness: 50%), scale-color($secondary, $lightness: 50%)) !important;
|
|
}
|
|
}
|
|
|
|
.top-space {
|
|
margin-top: 10px;
|
|
}
|
|
|
|
.message {
|
|
@include border-radius-all(8px);
|
|
background-color: $secondary;
|
|
padding: 14px;
|
|
|
|
h2 {
|
|
margin-bottom: 20px;
|
|
}
|
|
}
|
|
|
|
.clear-transitions {
|
|
transition:none !important;
|
|
}
|
|
|
|
.tip {
|
|
display: inline-block;
|
|
&.good {
|
|
color: $success;
|
|
}
|
|
&.bad {
|
|
color: $danger;
|
|
}
|
|
}
|
|
|
|
.d-editor-input {
|
|
resize: none;
|
|
}
|
|
|
|
.avatar-wrapper {
|
|
background-color: $secondary;
|
|
display: inline-block;
|
|
border-radius: 50%;
|
|
}
|
|
|
|
.profiler-results.profiler-left {
|
|
top: 60px !important;
|
|
}
|
|
|
|
.flex-center-align {
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
|
|
.unread-private-messages {
|
|
color: $secondary;
|
|
background: $success;
|
|
|
|
&.badge-notification[href] {
|
|
color: $secondary;
|
|
}
|
|
}
|
|
|
|
.ring-backdrop-spotlight {
|
|
position: absolute;
|
|
width: 80px;
|
|
height: 80px;
|
|
top: -18px;
|
|
right: -18px;
|
|
background-image: radial-gradient(40px at 50% 50% , transparent 95%, $primary 100%);
|
|
opacity: 0.85;
|
|
}
|
|
|
|
.ring-backdrop {
|
|
position: absolute;
|
|
width: 80px;
|
|
height: 80px;
|
|
top: -18px !important;
|
|
right: -18px !important;
|
|
box-shadow: 0 0 0 9999px rgba($primary, 0.85);
|
|
z-index: 1040;
|
|
}
|
|
|
|
.ring-first-notification {
|
|
position: absolute;
|
|
color: $secondary;
|
|
text-align: left;
|
|
right: 70px;
|
|
top: 60px;
|
|
width: 230px;
|
|
line-height: 30px;
|
|
}
|
|
|
|
.ring {
|
|
$gradient-start: transparent;
|
|
$gradient-end: #090;
|
|
background: -webkit-radial-gradient($gradient-start, $gradient-end);
|
|
background: -o-radial-gradient($gradient-start, $gradient-end);
|
|
background: -moz-radial-gradient($gradient-start, $gradient-end);
|
|
background: radial-gradient($gradient-start, $gradient-end);
|
|
top: -11px !important;
|
|
right: 23.5px !important;
|
|
border-radius: 100%;
|
|
width: 20px;
|
|
height: 20px;
|
|
-moz-animation-iteration-count: infinite;
|
|
-webkit-animation-iteration-count: infinite;
|
|
-webkit-transform-origin: center;
|
|
-moz-animation-duration: 3s;
|
|
-webkit-animation-duration: 3s;
|
|
-moz-animation-name: ping;
|
|
-webkit-animation-name: ping;
|
|
}
|
|
|
|
.fade {
|
|
opacity: 0;
|
|
transition: opacity 0.15s linear;
|
|
|
|
&.in {
|
|
opacity: 1;
|
|
}
|
|
}
|
|
|
|
.inline-spinner {
|
|
display: inline-block;
|
|
margin: 0;
|
|
}
|
|
|
|
.spinner {
|
|
margin: 20px auto 20px auto;
|
|
position: relative;
|
|
-webkit-animation: rotate-forever 1s infinite linear;
|
|
animation: rotate-forever 1s infinite linear;
|
|
height: 30px;
|
|
width: 30px;
|
|
border: 4px solid blend-primary-secondary(50%);
|
|
border-right-color: transparent;
|
|
border-radius: 50%;
|
|
|
|
&.small {
|
|
width: 10px;
|
|
height: 10px;
|
|
margin: 0;
|
|
display: inline-block;
|
|
}
|
|
}
|
|
|
|
.content-list {
|
|
h3 {
|
|
color: $primary-medium;
|
|
font-size: 1.071em;
|
|
padding-left: 5px;
|
|
margin-bottom: 10px;
|
|
}
|
|
|
|
ul {
|
|
list-style: none;
|
|
margin: 0;
|
|
|
|
li {
|
|
border-bottom: 1px solid $primary-low;
|
|
|
|
&:first-of-type {
|
|
border-top: 1px solid $primary-low;
|
|
}
|
|
|
|
a {
|
|
display: block;
|
|
padding: 10px;
|
|
color: $primary;
|
|
|
|
&:hover {
|
|
background-color: $primary-low;
|
|
color: $primary;
|
|
}
|
|
|
|
&.active {
|
|
font-weight: bold;
|
|
color: $primary;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
.form-vertical {
|
|
input,
|
|
textarea,
|
|
select,
|
|
.input-prepend,
|
|
.input-append {
|
|
display: inline-block;
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.control-group {
|
|
@include clearfix;
|
|
}
|
|
|
|
.control-label {
|
|
font-weight: bold;
|
|
font-size: 1.2em;
|
|
line-height: 2;
|
|
}
|
|
|
|
.controls {
|
|
margin-left: 0;
|
|
}
|
|
}
|
|
|
|
// Special elements
|
|
// Special elements
|
|
#main {
|
|
img.avatar {
|
|
&.header {
|
|
width: 45px;
|
|
height: 45px;
|
|
}
|
|
|
|
&.medium {
|
|
width: 32px;
|
|
height: 32px;
|
|
}
|
|
|
|
&.small {
|
|
width: 25px;
|
|
height: 25px;
|
|
}
|
|
|
|
&.tiny {
|
|
width: 20px;
|
|
height: 20px;
|
|
}
|
|
}
|
|
|
|
.user-list {
|
|
.user {
|
|
padding-bottom: 5px;
|
|
}
|
|
}
|
|
}
|
|
|
|
#loading-message {
|
|
position: absolute;
|
|
font-size: 2.143em;
|
|
text-align: center;
|
|
top: 120px;
|
|
left: 500px;
|
|
color: $primary;
|
|
}
|
|
|
|
#footer {
|
|
.container {
|
|
height: 50px;
|
|
.contents {
|
|
padding-top: 10px;
|
|
a[href] {
|
|
color: $secondary;
|
|
}
|
|
}
|
|
}
|
|
}
|