Cleaned, de-duplicated/DRYed and organized discourse.css (common, mobile and desktop)

This commit is contained in:
minusfive 2017-09-01 18:59:50 -04:00 committed by Robin Ward
parent db929e58fc
commit fd91e53e68
3 changed files with 819 additions and 726 deletions

View File

@ -1,45 +1,39 @@
img.avatar { // Common
border-radius: 50%; // 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
.container { // Animation Keyframes
@extend .clearfix; @keyframes ping {
} from {
transform: scale(0.25);
.wrap { opacity: 1;
@extend .clearfix; }
margin-right: auto; to {
margin-left: auto; transform: scale(2);
padding: 0 8px; opacity: 0;
.contents {
position: relative;
} }
} }
.full-width { @keyframes rotate-forever {
margin-left: 12px; 0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
} }
big { @keyframes background-fade-highlight {
font-size: 28px; 0% {
} background-color: $tertiary-low;
}
small { 100% {
font-size: 9px; background-color: transparent;
} }
//setting a static limit on big and small prevents nesting abuse
blockquote {
@include post-aside;
clear: both;
}
a.no-href {
cursor: pointer;
} }
// Base Elements
html { html {
height: 100%; height: 100%;
} }
@ -52,56 +46,170 @@ body {
@include clearfix; @include clearfix;
} }
h1, h2, h3, h4, h5, h6 { 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-top: 0;
margin-bottom: .5rem; margin-bottom: .5rem;
} }
button.ok { button {
background: $success; &.ok {
color: $secondary; background: $success;
@include hover {
background: lighten($success, 10%);
color: $secondary; color: $secondary;
@include hover {
background: lighten($success, 10%);
color: $secondary;
}
}
&.cancel {
background: $danger;
color: $secondary;
@include hover {
background: lighten($danger, 10%);
color: $secondary;
}
} }
} }
button.cancel { ul.breadcrumb {
background: $danger; margin: 0 10px 0 10px;
color: $secondary; }
@include hover {
background: lighten($danger, 10%); a.no-href {
color: $secondary; 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 // the default for table cells in topic list
// is scale-color($primary, $lightness: 50%) // is scale-color($primary, $lightness: 50%)
// numbers get dimmer as they get colder // numbers get dimmer as they get colder
.coldmap-high { .coldmap {
color: dark-light-choose(scale-color($primary, $lightness: 70%), scale-color($secondary, $lightness: 30%)) !important; &-high {
} color: dark-light-choose(scale-color($primary, $lightness: 70%), scale-color($secondary, $lightness: 30%)) !important;
.coldmap-med { }
color: dark-light-choose(scale-color($primary, $lightness: 60%), scale-color($secondary, $lightness: 40%)) !important;
} &-med {
.coldmap-low { color: dark-light-choose(scale-color($primary, $lightness: 60%), scale-color($secondary, $lightness: 40%)) !important;
color: dark-light-choose(scale-color($primary, $lightness: 50%), scale-color($secondary, $lightness: 50%)) !important; }
&-low {
color: dark-light-choose(scale-color($primary, $lightness: 50%), scale-color($secondary, $lightness: 50%)) !important;
}
} }
#loading-message { .top-space {
position: absolute;
font-size: 2.143em;
text-align: center;
top: 120px;
left: 500px;
color: $primary;
}
.top-space {
margin-top: 10px; margin-top: 10px;
} }
ul.breadcrumb {
margin: 0 10px 0 10px;
}
.message { .message {
@include border-radius-all(8px); @include border-radius-all(8px);
@ -113,18 +221,6 @@ ul.breadcrumb {
} }
} }
#footer {
.container {
height: 50px;
.contents {
padding-top: 10px;
a[href] {
color: $secondary;
}
}
}
}
.clear-transitions { .clear-transitions {
transition:none !important; transition:none !important;
} }
@ -139,10 +235,6 @@ ul.breadcrumb {
} }
} }
input[type].invalid {
background-color: dark-light-choose(scale-color($danger, $lightness: 80%), scale-color($danger, $lightness: -60%));
}
.d-editor-input { .d-editor-input {
resize: none; resize: none;
} }
@ -157,43 +249,6 @@ input[type].invalid {
top: 60px !important; top: 60px !important;
} }
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;
}
}
.radio, .checkbox {
min-height: 18px;
padding-left: 18px;
}
.radio input[type="radio"], .checkbox input[type="checkbox"] {
float: left;
margin-left: -18px;
}
.controls > {
.radio:first-child, .checkbox:first-child {
padding-top: 5px;
}
}
.radio.inline, .checkbox.inline {
display: inline-block;
padding-top: 5px;
margin-bottom: 0;
vertical-align: middle;
}
.radio.inline .radio.inline, .checkbox.inline .checkbox.inline {
margin-left: 10px;
}
.flex-center-align { .flex-center-align {
display: flex; display: flex;
align-items: center; align-items: center;
@ -202,7 +257,10 @@ input {
.unread-private-messages { .unread-private-messages {
color: $secondary; color: $secondary;
background: $success; background: $success;
&.badge-notification[href] {color: $secondary;}
&.badge-notification[href] {
color: $secondary;
}
} }
.ring-backdrop-spotlight { .ring-backdrop-spotlight {
@ -256,50 +314,12 @@ input {
-webkit-animation-name: ping; -webkit-animation-name: ping;
} }
@-webkit-keyframes ping {
from {
$scale: 0.25;
transform: scale($scale);
-ms-transform: scale($scale);
-webkit-transform: scale($scale);
-o-transform: scale($scale);
-moz-transform: scale($scale);
opacity: 1;
}
to {
$scale: 2;
transform: scale($scale);
-ms-transform: scale($scale);
-webkit-transform: scale($scale);
-o-transform: scale($scale);
-moz-transform: scale($scale);
opacity: 0;
}
}
.fade { .fade {
opacity: 0; opacity: 0;
transition: opacity 0.15s linear; transition: opacity 0.15s linear;
}
.fade.in { &.in {
opacity: 1; opacity: 1;
}
@-webkit-keyframes rotate-forever {
0% {
-webkit-transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(360deg);
}
}
@keyframes rotate-forever {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
} }
} }
@ -328,7 +348,6 @@ input {
} }
.content-list { .content-list {
h3 { h3 {
color: $primary-medium; color: $primary-medium;
font-size: 1.071em; font-size: 1.071em;
@ -340,50 +359,106 @@ input {
list-style: none; list-style: none;
margin: 0; margin: 0;
li:first-of-type {
border-top: 1px solid $primary-low;
}
li { li {
border-bottom: 1px solid $primary-low; border-bottom: 1px solid $primary-low;
}
li a { &:first-of-type {
display: block; border-top: 1px solid $primary-low;
padding: 10px;
color: $primary;
&:hover {
background-color: $primary-low;
color: $primary;
} }
&.active { a {
font-weight: bold; display: block;
padding: 10px;
color: $primary; color: $primary;
&:hover {
background-color: $primary-low;
color: $primary;
}
&.active {
font-weight: bold;
color: $primary;
}
} }
} }
} }
} }
// don't wrap relative dates, we want .form-vertical {
// input,
// Jul 26, '15 textarea,
// select,
// not .input-prepend,
// .input-append {
// Jul display: inline-block;
// 26, margin-bottom: 0;
// '15 }
//
span.relative-date { .control-group {
white-space:nowrap; @include clearfix;
}
.control-label {
font-weight: bold;
font-size: 1.2em;
line-height: 2;
}
.controls {
margin-left: 0;
}
} }
@keyframes background-fade-highlight { // Special elements
0% { // Special elements
background-color: $tertiary-low; #main {
img.avatar {
&.header {
width: 45px;
height: 45px;
}
&.medium {
width: 32px;
height: 32px;
}
&.small {
width: 25px;
height: 25px;
}
&.tiny {
width: 20px;
height: 20px;
}
} }
100% {
background-color: transparent; .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;
}
}
} }
} }

View File

@ -1,96 +1,43 @@
// Desktop
// global styles that apply to the Discourse application specifically // global styles that apply to the Discourse application specifically
// BEWARE: changing these styles implies they take effect anywhere they are seen // BEWARE: changing these styles implies they take effect anywhere they are seen
// throughout the Discourse application // throughout the Discourse application
@media all // Base Elements
and (max-width : 570px) { body.widget-dragging {
body { cursor: ns-resize;
min-width: 0;
}
.wrap,
.full-width {
min-width: 0;
}
} }
header { header {
margin-bottom: 15px; margin-bottom: 15px;
} }
body.widget-dragging { // Common classes
cursor: ns-resize; .boxed {
height: 100%;
} }
body { .grippie {
cursor: row-resize;
padding: 4px 0px;
.boxed { &:before {
height: 100%;
&.white {
background-color: $secondary;
}
}
#main {
a.star {
color: $secondary-medium;
&:before {
font-family: "FontAwesome";
content: "\f005";
}
@include hover {
opacity: 0.6;
}
&:active {
opacity: 1;
}
}
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;
}
}
}
$grippie-border-color: dark-light-choose(scale-color($primary, $lightness: 70%), scale-color($secondary, $lightness: 50%));
.grippie {
cursor: row-resize;
padding: 4px 0px;
}
.grippie:before {
content: ''; content: '';
display: block; display: block;
width: 27px; width: 27px;
margin: auto; margin: auto;
border-top: 3px double $grippie-border-color; border-top: 3px double dark-light-choose(scale-color($primary, $lightness: 70%), scale-color($secondary, $lightness: 50%));
} }
} }
.topic-statuses { .topic-statuses {
float: left; float: left;
padding: 0; padding: 0;
.topic-status { .topic-status {
padding: 0 2px 0 0; padding: 0 2px 0 0;
margin: 0; margin: 0;
i { i {
font-size: 1.071em; font-size: 1.071em;
} }
@ -101,406 +48,515 @@ body {
} }
} }
body {
.form-vertical input, .form-vertical textarea, .form-vertical select, .form-vertical .input-prepend, .form-vertical .input-append {
display: inline-block;
margin-bottom: 0;
}
.form-vertical { .form-vertical {
.control-group { .control-group {
margin-bottom: 24px; margin-bottom: 24px;
&:before {
display: table;
content: "";
}
&:after {
display: table;
content: "";
clear: both;
}
}
.control-label {
font-weight: bold;
font-size: 1.2em;
line-height: 2;
}
.controls {
margin-left: 0;
}
} }
} }
/***********************/
/* bootstrap carryover */ /* bootstrap carryover */
/***********************/
code,
pre {
font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace;
}
/* page not found styles */
h1.page-not-found {
line-height: 30px;
}
body { .page-not-found {
margin: 20px 0 40px 0;
input, textarea, select { &-search {
color: $primary;
}
code, pre {
font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace;
}
/* page not found styles */
h1.page-not-found {
line-height: 30px;
}
.page-not-found {
margin: 20px 0 40px 0;
}
.page-not-found-search {
margin-top: 20px; margin-top: 20px;
} }
.popular-topics-title, .recent-topics-title { &-topics .span8 {
margin-bottom: 10px;
}
.not-found-topic {
> a { margin-right: 10px; line-height: 2;}
}
.page-not-found-topics .span8 {
line-height: 1.5em; line-height: 1.5em;
margin-right: 20px; margin-right: 20px;
} }
}
// this removes the unwanted top margin on a paragraph under a heading .popular-topics-title,
h1+p, h2+p, h3+p, h4+p, h5+p, h6+p { .recent-topics-title {
margin-bottom: 10px;
}
.not-found-topic {
> a {
margin-right: 10px;
line-height: 2;
}
}
// this removes the unwanted top margin on a paragraph under a heading
h1,
h2,
h3,
h4,
h5,
h6 {
+ p {
margin-top:0px; margin-top:0px;
} }
}
form {
margin: 0 0 18px;
}
form { label,
margin: 0 0 18px; input,
button,
select,
textarea {
font-size: 0.929em;
font-weight: normal;
line-height: 18px;
}
input,
button,
select,
textarea {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
input,
select,
textarea {
color: $primary;
&[class*="span"] {
float: none;
margin-left: 0;
} }
label, input, button, select, textarea {
font-size: 0.929em; &[disabled],
font-weight: normal; &[readonly] {
line-height: 18px; cursor: not-allowed;
background-color: $primary-low;
border-color: $primary-low;
} }
input, button, select, textarea {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; &:focus:required:invalid {
color: $danger;
border-color: $danger;
} }
select, textarea {
&:focus:required:invalid:focus {
border-color: $danger;
box-shadow: 0 0 6px $danger;
}
}
select,
textarea {
display: inline-block;
padding: 4px;
margin-bottom: 9px;
font-size: 0.929em;
line-height: 18px;
color: $primary;
}
input {
width: 210px;
&[type="text"],
&[type="password"],
&[type="datetime"],
&[type="datetime-local"],
&[type="date"],
&[type="month"],
&[type="time"],
&[type="week"],
&[type="number"],
&[type="email"],
&[type="url"],
&[type="search"],
&[type="tel"],
&[type="color"] {
display: inline-block; display: inline-block;
height: 18px;
padding: 4px; padding: 4px;
margin-bottom: 9px; margin-bottom: 9px;
font-size: 0.929em; font-size: 0.929em;
line-height: 18px; line-height: 18px;
color: $primary; color: $primary;
} background-color: $secondary;
input { border: 1px solid $primary-low;
&[type="text"], &[type="password"], &[type="datetime"], &[type="datetime-local"], &[type="date"], &[type="month"], &[type="time"], &[type="week"], &[type="number"], &[type="email"], &[type="url"], &[type="search"], &[type="tel"], &[type="color"] {
display: inline-block;
height: 18px;
padding: 4px;
margin-bottom: 9px;
font-size: 0.929em;
line-height: 18px;
color: $primary;
}
}
input {
width: 210px;
}
textarea {
width: 210px;
height: auto;
background-color:$secondary;
border: 1px solid $primary-low;
border-radius: 3px; border-radius: 3px;
box-shadow: inset 0 1px 1px rgba(0,0,0, .3); box-shadow: inset 0 1px 1px rgba(0,0,0, .3);
}
input { &:focus {
&[type="text"], &[type="password"], &[type="datetime"], &[type="datetime-local"], &[type="date"], &[type="month"], &[type="time"], &[type="week"], &[type="number"], &[type="email"], &[type="url"], &[type="search"], &[type="tel"], &[type="color"] {
background-color: $secondary;
border: 1px solid $primary-low;
border-radius: 3px;
box-shadow: inset 0 1px 1px rgba(0,0,0, .3);
}
}
textarea:focus {
border-color: $tertiary;
outline: 0;
box-shadow: inset 0 1px 1px rgba(0,0,0, .3), 0 0 8px $tertiary;
}
input {
&[type="text"]:focus, &[type="password"]:focus, &[type="datetime"]:focus, &[type="datetime-local"]:focus, &[type="date"]:focus, &[type="month"]:focus, &[type="time"]:focus, &[type="week"]:focus, &[type="number"]:focus, &[type="email"]:focus, &[type="url"]:focus, &[type="search"]:focus, &[type="tel"]:focus, &[type="color"]:focus {
border-color: $tertiary; border-color: $tertiary;
outline: 0; outline: 0;
box-shadow: inset 0 1px 1px rgba(0,0,0, .3), 0 0 8px $tertiary; box-shadow: inset 0 1px 1px rgba(0,0,0, .3), 0 0 8px $tertiary;
} }
} }
}
select, input[type="file"] { textarea {
line-height: 28px; width: 210px;
} height: auto;
background-color:$secondary;
border: 1px solid $primary-low;
border-radius: 3px;
box-shadow: inset 0 1px 1px rgba(0,0,0, .3);
select { &:focus {
width: 220px; border-color: $tertiary;
border: 1px solid $primary-low; outline: 0;
&[multiple], &[size] { box-shadow: inset 0 1px 1px rgba(0,0,0, .3), 0 0 8px $tertiary;
height: auto;
}
} }
}
.input-xxlarge { select,
width: 530px; input[type="file"] {
line-height: 28px;
}
select {
width: 220px;
border: 1px solid $primary-low;
&[multiple],
&[size] {
height: auto;
} }
input[class*="span"], select[class*="span"], textarea[class*="span"] { }
float: none;
margin-left: 0; input,
} textarea {
.input-append { margin-left: 0;
input[class*="span"] { }
display: inline-block;
} input {
} &[type="radio"],
.input-prepend { &[type="checkbox"] {
input[class*="span"] { &[disabled],
display: inline-block; &[readonly] {
}
}
input, textarea {
margin-left: 0;
}
input[disabled], select[disabled], textarea[disabled], input[readonly], select[readonly], textarea[readonly] {
cursor: not-allowed;
background-color: $primary-low;
border-color: $primary-low;
}
input {
&[type="radio"][disabled], &[type="checkbox"][disabled], &[type="radio"][readonly], &[type="checkbox"][readonly] {
background-color: transparent; background-color: transparent;
} }
} }
.controls-dropdown { }
margin-bottom: 10px;
.input {
&-xxlarge {
width: 530px;
} }
.control-group {
margin-bottom: 9px; &-prepend,
&.warning { &-append {
> label { margin-bottom: 5px;
color: $danger;
input[class*="span"] {
display: inline-block;
}
input,
select {
position: relative;
margin-bottom: 0;
vertical-align: middle;
border-radius: 0 3px 3px 0;
&:focus {
z-index: 2;
} }
.checkbox, .radio, input, select, textarea { }
color: $danger;
border-color: $danger; .add-on {
display: inline-block;
width: auto;
height: 18px;
min-width: 16px;
padding: 4px 5px;
font-weight: normal;
line-height: 18px;
text-align: center;
vertical-align: middle;
background-color: $secondary;
border: 1px solid $primary-low;
}
.add-on,
.btn {
margin-left: -1px;
border-radius: 0;
}
.active {
background-color: scale-color($danger, $lightness: 30%);
border-color: $danger;
}
}
&-prepend {
.add-on,
.btn {
margin-right: -1px;
&:first-child {
border-radius: 3px 0 0 3px;
} }
.checkbox:focus, .radio:focus, input:focus, select:focus, textarea:focus { }
}
&-append {
input,
select {
border-radius: 3px 0 0 3px;
}
.add-on,
.btn {
&:last-child {
border-radius: 0 3px 3px 0;
}
}
}
}
.input-prepend.input-append {
input,
select {
border-radius: 0;
}
.add-on,
.btn {
&:first-child {
margin-right: -1px;
border-radius: 3px 0 0 3px;
}
}
.add-on,
.btn {
&:last-child {
margin-left: -1px;
border-radius: 0 3px 3px 0;
}
}
}
.controls-dropdown {
margin-bottom: 10px;
}
.control-group {
margin-bottom: 9px;
&.warning,
&.error {
> label {
color: $danger;
}
.checkbox,
.radio,
input,
select,
textarea {
color: $danger;
border-color: $danger;
&:focus {
border-color: scale-color($danger, $lightness: -30%); border-color: scale-color($danger, $lightness: -30%);
box-shadow: 0 0 6px $danger; box-shadow: 0 0 6px $danger;
} }
.input-prepend .add-on, .input-append .add-on { }
}
&.warning {
.input-prepend,
.input-append {
.add-on {
color: $danger; color: $danger;
background-color: $danger; background-color: $danger;
border-color: $danger; border-color: $danger;
} }
} }
&.error { }
> label {
color: $danger; &.error {
} .input-prepend,
.checkbox, .radio, input, select, textarea { .input-append {
color: $danger; .add-on {
border-color: $danger;
}
.checkbox:focus, .radio:focus, input:focus, select:focus, textarea:focus {
border-color: scale-color($danger, $lightness: -30%);
box-shadow: 0 0 6px $danger;
}
.input-prepend .add-on, .input-append .add-on {
color: $danger; color: $danger;
background-color: scale-color($danger, $lightness: 30%); background-color: scale-color($danger, $lightness: 30%);
border-color: scale-color($danger, $lightness: -20%); border-color: scale-color($danger, $lightness: -20%);
} }
} }
&.success { }
> label {
color: $success; &.success {
} > label {
.checkbox, .radio, input, select, textarea { color: $success;
color: $success; }
border-color: $success;
} .checkbox,
.checkbox:focus, .radio:focus, input:focus, select:focus, textarea:focus { .radio,
input,
select,
textarea {
color: $success;
border-color: $success;
&:focus {
border-color: $success; border-color: $success;
box-shadow: 0 0 6px $success; box-shadow: 0 0 6px $success;
} }
.input-prepend .add-on, .input-append .add-on { }
.input-prepend,
.input-append {
.add-on {
color: $success; color: $success;
background-color: scale-color($success, $lightness: 90%); background-color: scale-color($success, $lightness: 90%);
border-color: $success; border-color: $success;
} }
} }
} }
input:focus:required:invalid, textarea:focus:required:invalid, select:focus:required:invalid { }
color: $danger;
border-color: $danger;
}
input:focus:required:invalid:focus, textarea:focus:required:invalid:focus, select:focus:required:invalid:focus {
border-color: $danger;
box-shadow: 0 0 6px $danger;
}
.input-prepend, .input-append { .form-horizontal {
margin-bottom: 5px; .hide {
}
.input-prepend input, .input-append input, .input-prepend select, .input-append select {
position: relative;
margin-bottom: 0;
vertical-align: middle;
border-radius: 0 3px 3px 0;
}
.input-prepend input:focus, .input-append input:focus, .input-prepend select:focus, .input-append select:focus {
z-index: 2;
}
.input-prepend .add-on, .input-append .add-on {
display: inline-block;
width: auto;
height: 18px;
min-width: 16px;
padding: 4px 5px;
font-weight: normal;
line-height: 18px;
text-align: center;
vertical-align: middle;
background-color: $secondary;
border: 1px solid $primary-low;
}
.input-prepend .add-on, .input-append .add-on, .input-prepend .btn, .input-append .btn {
margin-left: -1px;
border-radius: 0;
}
.input-prepend .active, .input-append .active {
background-color: scale-color($danger, $lightness: 30%);
border-color: $danger;
}
.input-prepend {
.add-on, .btn {
margin-right: -1px;
}
.add-on:first-child, .btn:first-child {
border-radius: 3px 0 0 3px;
}
}
.input-append {
input, select {
border-radius: 3px 0 0 3px;
}
.add-on:last-child, .btn:last-child {
border-radius: 0 3px 3px 0;
}
}
.input-prepend.input-append {
input, select {
border-radius: 0;
}
.add-on:first-child, .btn:first-child {
margin-right: -1px;
border-radius: 3px 0 0 3px;
}
.add-on:last-child, .btn:last-child {
margin-left: -1px;
border-radius: 0 3px 3px 0;
}
}
.form-horizontal input, .form-horizontal textarea, .form-horizontal select, .form-horizontal .input-prepend, .form-horizontal .input-append {
display: inline-block;
margin-bottom: 0;
}
.form-horizontal .hide {
display: none; display: none;
} }
.form-horizontal { input,
.control-group { textarea,
margin-bottom: 18px; select,
&:before { .input-prepend,
display: table; .input-append {
content: ""; display: inline-block;
} margin-bottom: 0;
&:after {
display: table;
content: "";
clear: both;
}
}
.control-indent {
margin-left: 20px;
margin-bottom: 10px;
}
.control-label {
float: left;
width: 140px;
text-align: right;
font-weight: bold;
}
.controls {
margin-left: 160px;
}
} }
.bootbox.modal { .control-group {
.modal-footer { @include clearfix;
a.btn-primary { margin-bottom: 18px;
color: $secondary; }
}
.control-indent {
margin-left: 20px;
margin-bottom: 10px;
}
.control-label {
float: left;
width: 140px;
text-align: right;
font-weight: bold;
}
.controls {
margin-left: 160px;
}
}
.bootbox.modal {
.modal-footer {
a.btn-primary {
color: $secondary;
} }
} }
} }
/* bootstrap columns */ /* bootstrap columns */
.row {
.row:before, @include clearfix;
.row:after {
display: table;
content: "";
}
.row:after {
clear: both;
} }
.span24 { .span {
width: 1236px; &4 {
float: left; width: 196px;
margin-right: 12px;
float: left;
}
&6 {
width: 27.027%;
float: left;
}
&8 {
width: 404px;
float: left;
}
&10 {
width: 508px;
float: left;
}
&13 {
width: 59.8198%;
float: left;
}
&15 {
/* intentionally no width set here, do not add one */
margin-left: 12px;
float: left;
}
&24 {
width: 1236px;
float: left;
color: amarillo;
}
} }
.span15 {
/* intentionally no width set here, do not add one */ .offset {
margin-left: 12px; &2 {
float: left; margin-left: 116px;
}
&1 {
margin-left: 64px;
}
} }
.span13 {
width: 59.8198%; // Special elements
float: left; #main {
a.star {
color: $secondary-medium;
&:before {
font-family: "FontAwesome";
content: "\f005";
}
@include hover {
opacity: 0.6;
}
&:active {
opacity: 1;
}
}
} }
.span10 {
width: 508px; // Media Queries
float: left; @media all
} and (max-width : 570px) {
.span8 {
width: 404px; body {
float: left; min-width: 0;
} }
.span6 {
width: 27.027%; .wrap,
float: left; .full-width {
} min-width: 0;
.span4 { }
width: 196px;
margin-right: 12px;
float: left;
}
.offset2 {
margin-left: 116px;
}
.offset1 {
margin-left: 64px;
} }

View File

@ -1,98 +1,75 @@
// Mobile
// global styles that apply to the Discourse application specifically // global styles that apply to the Discourse application specifically
// BEWARE: changing these styles implies they take effect anywhere they are seen // BEWARE: changing these styles implies they take effect anywhere they are seen
// throughout the Discourse application // throughout the Discourse application
// Base Elements
body { body {
background-color: $secondary; background-color: $secondary;
textarea {
background-color:$secondary;
}
} }
// This sets the space between the application content and the edge of the textarea {
// screen. This value is required in 'mobile/header.scss' to set the position background-color:$secondary;
// of the drop-down menu.
$mobile-wrapper-padding: 10px;
.wrap {
padding: 0 $mobile-wrapper-padding;
}
body {
.boxed {
.contents {
padding: 10px 0 0 0;
}
&.white {
background-color: $secondary;
}
}
#main {
position: relative;
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;
}
}
}
.control-group {
margin-bottom: 9px;
}
} }
blockquote { blockquote {
/* 13px left is intentional here to properly align with post quotes */ /* 13px left is intentional here to properly align with post quotes */
padding: 10px 8px 10px 13px; padding: 10px 8px 10px 13px;
p { p {
margin: 0 0 10px 0; margin: 0 0 10px 0;
&:last-of-type {
margin-bottom:0;
}
} }
p:last-of-type {
margin-bottom:0; }
h1.page-not-found {
line-height: 24px;
margin: 5px 0 -5px 0;
}
h2 {
&.popular-topics-title {
margin-bottom: 6px;
font-size: 1.2em;
} }
&.recent-topics-title {
margin-bottom: 6px;
font-size: 1.2em;
}
}
// Common classes
.wrap {
padding: 0 10px;
}
.boxed {
.contents {
padding: 10px 0 0 0;
}
}
.control-group {
margin-bottom: 9px;
} }
.topic-statuses { .topic-statuses {
display: inline-block; display: inline-block;
.topic-status { .topic-status {
i { i {
color: $secondary-medium; color: $secondary-medium;
} }
} }
}
.topic-statuses:empty {
display: none;
}
// Styles used before the user is logged into discourse. For example, activating their &:empty {
// account or changing their email. display: none;
}
#simple-container {
width: 90%;
}
// somehow the image logo assumption inherits margins from earlier in the CSS stack
// we must remove margins for text site titles
h2#site-text-logo
{
margin: 0 0 0 10px;
} }
// categories should not be bold on mobile; they fight with the topic title too much // categories should not be bold on mobile; they fight with the topic title too much
@ -101,22 +78,6 @@ h2#site-text-logo
} }
.mobile-view .mobile-nav { .mobile-view .mobile-nav {
&.messages-nav, &.notifications-nav, &.activity-nav, &.preferences-nav {
position: absolute;
right: 0px;
top: -55px;
}
}
.mobile-view .mobile-nav {
a .fa {
margin-right: 8px;
color: dark-light-choose(scale-color($primary, $lightness: 50%), scale-color($secondary, $lightness: 50%));
}
a {
color: $primary;
}
margin: 0; margin: 0;
padding: 0; padding: 0;
background: $primary-low; background: $primary-low;
@ -125,6 +86,24 @@ h2#site-text-logo
position: relative; position: relative;
width: 45%; width: 45%;
&.messages-nav,
&.notifications-nav,
&.activity-nav,
&.preferences-nav {
position: absolute;
right: 0px;
top: -55px;
}
a {
color: $primary;
.fa {
margin-right: 8px;
color: dark-light-choose(scale-color($primary, $lightness: 50%), scale-color($secondary, $lightness: 50%));
}
}
> li > a { > li > a {
padding: 8px 10px; padding: 8px 10px;
height: 100%; height: 100%;
@ -132,6 +111,7 @@ h2#site-text-logo
box-sizing: border-box; box-sizing: border-box;
display: block; display: block;
} }
.d-icon-caret-down { .d-icon-caret-down {
position: absolute; position: absolute;
right: 0px; right: 0px;
@ -139,81 +119,63 @@ h2#site-text-logo
.drop { .drop {
display: none; display: none;
} &.expanded {
.drop.expanded { left: 0;
left: 0; display: block;
display: block; position: absolute;
position: absolute; z-index: 10000000;
z-index: 10000000; background-color: $secondary;
background-color: $secondary; width: 100%;
width: 100%; list-style: none;
list-style: none; margin: 0;
margin: 0; padding: 5px;
padding: 5px; border: 1px solid #eaeaea;
border: 1px solid #eaeaea; box-sizing: border-box;
box-sizing: border-box;
li { li {
margin: 5px 0; margin: 5px 0;
padding: 0; padding: 0;
a {
height: 100%; a {
display: block; height: 100%;
padding: 5px 8px; display: block;
padding: 5px 8px;
}
} }
} }
} }
} }
/* page not found styles */ /* page not found styles */
h1.page-not-found { .page-not-found {
line-height: 24px; &-topics a.badge-wrapper {
margin: 5px 0 -5px 0; margin-left: 8px;
}
&-search h2 {
font-size: 1.2em;
}
} }
.page-not-found-topics a.badge-wrapper {
margin-left: 8px;
}
h2.popular-topics-title {
margin-bottom: 6px;
font-size: 1.2em;
}
h2.recent-topics-title {
margin-bottom: 6px;
font-size: 1.2em;
}
.page-not-found-search h2 {
font-size: 1.2em;
}
.form-vertical { .form-vertical {
input, textarea, select, .input-prepend, .input-append {
display: inline-block;
margin-bottom: 0;
}
.control-group { .control-group {
margin-bottom: 12px; margin-bottom: 12px;
&:before {
display: table;
content: "";
}
&:after {
display: table;
content: "";
clear: both;
}
}
.control-label {
font-weight: bold;
font-size: 1.2em;
line-height: 2;
}
.controls {
margin-left: 0;
} }
} }
// Special elements
#main {
position: relative;
}
// Styles used before the user is logged into discourse. For example, activating
// their account or changing their email.
#simple-container {
width: 90%;
}
// somehow the image logo assumption inherits margins from earlier in the CSS
// stack we must remove margins for text site titles
h2#site-text-logo {
margin: 0 0 0 10px;
}