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 {
border-radius: 50%;
}
// 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
.container {
@extend .clearfix;
}
.wrap {
@extend .clearfix;
margin-right: auto;
margin-left: auto;
padding: 0 8px;
.contents {
position: relative;
// Animation Keyframes
@keyframes ping {
from {
transform: scale(0.25);
opacity: 1;
}
to {
transform: scale(2);
opacity: 0;
}
}
.full-width {
margin-left: 12px;
@keyframes rotate-forever {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
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;
}
a.no-href {
cursor: pointer;
@keyframes background-fade-highlight {
0% {
background-color: $tertiary-low;
}
100% {
background-color: transparent;
}
}
// Base Elements
html {
height: 100%;
}
@ -52,56 +46,170 @@ body {
@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-bottom: .5rem;
}
button.ok {
button {
&.ok {
background: $success;
color: $secondary;
@include hover {
background: lighten($success, 10%);
color: $secondary;
}
}
}
button.cancel {
&.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 {
.coldmap {
&-high {
color: dark-light-choose(scale-color($primary, $lightness: 70%), scale-color($secondary, $lightness: 30%)) !important;
}
.coldmap-med {
}
&-med {
color: dark-light-choose(scale-color($primary, $lightness: 60%), scale-color($secondary, $lightness: 40%)) !important;
}
.coldmap-low {
}
&-low {
color: dark-light-choose(scale-color($primary, $lightness: 50%), scale-color($secondary, $lightness: 50%)) !important;
}
}
#loading-message {
position: absolute;
font-size: 2.143em;
text-align: center;
top: 120px;
left: 500px;
color: $primary;
}
.top-space {
.top-space {
margin-top: 10px;
}
ul.breadcrumb {
margin: 0 10px 0 10px;
}
.message {
@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 {
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 {
resize: none;
}
@ -157,43 +249,6 @@ input[type].invalid {
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 {
display: flex;
align-items: center;
@ -202,7 +257,10 @@ input {
.unread-private-messages {
color: $secondary;
background: $success;
&.badge-notification[href] {color: $secondary;}
&.badge-notification[href] {
color: $secondary;
}
}
.ring-backdrop-spotlight {
@ -256,50 +314,12 @@ input {
-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 {
opacity: 0;
transition: opacity 0.15s linear;
}
.fade.in {
&.in {
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 {
h3 {
color: $primary-medium;
font-size: 1.071em;
@ -340,14 +359,14 @@ input {
list-style: none;
margin: 0;
li:first-of-type {
border-top: 1px solid $primary-low;
}
li {
border-bottom: 1px solid $primary-low;
&:first-of-type {
border-top: 1px solid $primary-low;
}
li a {
a {
display: block;
padding: 10px;
color: $primary;
@ -363,27 +382,83 @@ input {
}
}
}
}
// don't wrap relative dates, we want
//
// Jul 26, '15
//
// not
//
// Jul
// 26,
// '15
//
span.relative-date {
white-space:nowrap;
}
@keyframes background-fade-highlight {
0% {
background-color: $tertiary-low;
}
100% {
background-color: transparent;
}
}
.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;
}
}
}
}

View File

@ -1,96 +1,43 @@
// Desktop
// 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
@media all
and (max-width : 570px) {
body {
min-width: 0;
}
.wrap,
.full-width {
min-width: 0;
}
// Base Elements
body.widget-dragging {
cursor: ns-resize;
}
header {
margin-bottom: 15px;
}
body.widget-dragging {
cursor: ns-resize;
// Common classes
.boxed {
height: 100%;
}
body {
.boxed {
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 {
.grippie {
cursor: row-resize;
padding: 4px 0px;
}
.grippie:before {
&:before {
content: '';
display: block;
width: 27px;
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 {
float: left;
padding: 0;
.topic-status {
padding: 0 2px 0 0;
margin: 0;
i {
font-size: 1.071em;
}
@ -101,102 +48,140 @@ 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 {
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 */
body {
input, textarea, select {
color: $primary;
}
code, pre {
/***********************/
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 {
/* page not found styles */
h1.page-not-found {
line-height: 30px;
}
}
.page-not-found {
.page-not-found {
margin: 20px 0 40px 0;
}
.page-not-found-search {
&-search {
margin-top: 20px;
}
.popular-topics-title, .recent-topics-title {
margin-bottom: 10px;
}
.not-found-topic {
> a { margin-right: 10px; line-height: 2;}
}
.page-not-found-topics .span8 {
&-topics .span8 {
line-height: 1.5em;
margin-right: 20px;
}
}
// this removes the unwanted top margin on a paragraph under a heading
h1+p, h2+p, h3+p, h4+p, h5+p, h6+p {
.popular-topics-title,
.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;
}
}
form {
form {
margin: 0 0 18px;
}
label, input, button, select, textarea {
}
label,
input,
button,
select,
textarea {
font-size: 0.929em;
font-weight: normal;
line-height: 18px;
}
input, button, select, textarea {
}
input,
button,
select,
textarea {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
input,
select,
textarea {
color: $primary;
&[class*="span"] {
float: none;
margin-left: 0;
}
select, textarea {
&[disabled],
&[readonly] {
cursor: not-allowed;
background-color: $primary-low;
border-color: $primary-low;
}
&:focus:required:invalid {
color: $danger;
border-color: $danger;
}
&: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 {
&[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"] {
}
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;
height: 18px;
padding: 4px;
@ -204,164 +189,90 @@ body {
font-size: 0.929em;
line-height: 18px;
color: $primary;
background-color: $secondary;
border: 1px solid $primary-low;
border-radius: 3px;
box-shadow: inset 0 1px 1px rgba(0,0,0, .3);
&:focus {
border-color: $tertiary;
outline: 0;
box-shadow: inset 0 1px 1px rgba(0,0,0, .3), 0 0 8px $tertiary;
}
}
input {
width: 210px;
}
textarea {
}
textarea {
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);
}
input {
&[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;
outline: 0;
box-shadow: inset 0 1px 1px rgba(0,0,0, .3), 0 0 8px $tertiary;
}
}
select, input[type="file"] {
&:focus {
border-color: $tertiary;
outline: 0;
box-shadow: inset 0 1px 1px rgba(0,0,0, .3), 0 0 8px $tertiary;
}
}
select,
input[type="file"] {
line-height: 28px;
}
}
select {
select {
width: 220px;
border: 1px solid $primary-low;
&[multiple], &[size] {
&[multiple],
&[size] {
height: auto;
}
}
}
.input-xxlarge {
width: 530px;
}
input[class*="span"], select[class*="span"], textarea[class*="span"] {
float: none;
input,
textarea {
margin-left: 0;
}
.input-append {
input[class*="span"] {
display: inline-block;
}
}
.input-prepend {
input[class*="span"] {
display: inline-block;
}
}
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] {
}
input {
&[type="radio"],
&[type="checkbox"] {
&[disabled],
&[readonly] {
background-color: transparent;
}
}
.controls-dropdown {
margin-bottom: 10px;
}
.control-group {
margin-bottom: 9px;
&.warning {
> label {
color: $danger;
}
.checkbox, .radio, input, select, textarea {
color: $danger;
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;
background-color: $danger;
border-color: $danger;
}
}
&.error {
> label {
color: $danger;
}
.checkbox, .radio, input, select, textarea {
color: $danger;
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;
background-color: scale-color($danger, $lightness: 30%);
border-color: scale-color($danger, $lightness: -20%);
}
}
&.success {
> label {
color: $success;
}
.checkbox, .radio, input, select, textarea {
color: $success;
border-color: $success;
}
.checkbox:focus, .radio:focus, input:focus, select:focus, textarea:focus {
border-color: $success;
box-shadow: 0 0 6px $success;
}
.input-prepend .add-on, .input-append .add-on {
color: $success;
background-color: scale-color($success, $lightness: 90%);
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 {
&-xxlarge {
width: 530px;
}
.input-prepend, .input-append {
&-prepend,
&-append {
margin-bottom: 5px;
input[class*="span"] {
display: inline-block;
}
.input-prepend input, .input-append input, .input-prepend select, .input-append select {
input,
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 {
&:focus {
z-index: 2;
}
.input-prepend .add-on, .input-append .add-on {
}
.add-on {
display: inline-block;
width: auto;
height: 18px;
@ -374,133 +285,278 @@ body {
background-color: $secondary;
border: 1px solid $primary-low;
}
.input-prepend .add-on, .input-append .add-on, .input-prepend .btn, .input-append .btn {
.add-on,
.btn {
margin-left: -1px;
border-radius: 0;
}
.input-prepend .active, .input-append .active {
.active {
background-color: scale-color($danger, $lightness: 30%);
border-color: $danger;
}
.input-prepend {
.add-on, .btn {
}
&-prepend {
.add-on,
.btn {
margin-right: -1px;
}
.add-on:first-child, .btn:first-child {
&:first-child {
border-radius: 3px 0 0 3px;
}
}
.input-append {
input, select {
}
&-append {
input,
select {
border-radius: 3px 0 0 3px;
}
.add-on:last-child, .btn:last-child {
.add-on,
.btn {
&:last-child {
border-radius: 0 3px 3px 0;
}
}
.input-prepend.input-append {
input, select {
}
}
.input-prepend.input-append {
input,
select {
border-radius: 0;
}
.add-on:first-child, .btn:first-child {
.add-on,
.btn {
&:first-child {
margin-right: -1px;
border-radius: 3px 0 0 3px;
}
.add-on:last-child, .btn:last-child {
}
.add-on,
.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;
.controls-dropdown {
margin-bottom: 10px;
}
.control-group {
margin-bottom: 9px;
&.warning,
&.error {
> label {
color: $danger;
}
.form-horizontal .hide {
.checkbox,
.radio,
input,
select,
textarea {
color: $danger;
border-color: $danger;
&:focus {
border-color: scale-color($danger, $lightness: -30%);
box-shadow: 0 0 6px $danger;
}
}
}
&.warning {
.input-prepend,
.input-append {
.add-on {
color: $danger;
background-color: $danger;
border-color: $danger;
}
}
}
&.error {
.input-prepend,
.input-append {
.add-on {
color: $danger;
background-color: scale-color($danger, $lightness: 30%);
border-color: scale-color($danger, $lightness: -20%);
}
}
}
&.success {
> label {
color: $success;
}
.checkbox,
.radio,
input,
select,
textarea {
color: $success;
border-color: $success;
&:focus {
border-color: $success;
box-shadow: 0 0 6px $success;
}
}
.input-prepend,
.input-append {
.add-on {
color: $success;
background-color: scale-color($success, $lightness: 90%);
border-color: $success;
}
}
}
}
.form-horizontal {
.hide {
display: none;
}
.form-horizontal {
input,
textarea,
select,
.input-prepend,
.input-append {
display: inline-block;
margin-bottom: 0;
}
.control-group {
@include clearfix;
margin-bottom: 18px;
&:before {
display: table;
content: "";
}
&: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 {
.bootbox.modal {
.modal-footer {
a.btn-primary {
color: $secondary;
}
}
}
}
/* bootstrap columns */
.row:before,
.row:after {
display: table;
content: "";
}
.row:after {
clear: both;
.row {
@include clearfix;
}
.span24 {
width: 1236px;
float: left;
}
.span15 {
/* intentionally no width set here, do not add one */
margin-left: 12px;
float: left;
}
.span13 {
width: 59.8198%;
float: left;
}
.span10 {
width: 508px;
float: left;
}
.span8 {
width: 404px;
float: left;
}
.span6 {
width: 27.027%;
float: left;
}
.span4 {
.span {
&4 {
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;
}
}
.offset2 {
.offset {
&2 {
margin-left: 116px;
}
.offset1 {
}
&1 {
margin-left: 64px;
}
}
// Special elements
#main {
a.star {
color: $secondary-medium;
&:before {
font-family: "FontAwesome";
content: "\f005";
}
@include hover {
opacity: 0.6;
}
&:active {
opacity: 1;
}
}
}
// Media Queries
@media all
and (max-width : 570px) {
body {
min-width: 0;
}
.wrap,
.full-width {
min-width: 0;
}
}

View File

@ -1,98 +1,75 @@
// Mobile
// 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
// Base Elements
body {
background-color: $secondary;
textarea {
}
textarea {
background-color:$secondary;
}
}
// This sets the space between the application content and the edge of the
// screen. This value is required in 'mobile/header.scss' to set the position
// 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 {
/* 13px left is intentional here to properly align with post quotes */
padding: 10px 8px 10px 13px;
p {
margin: 0 0 10px 0;
}
p:last-of-type {
&: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 {
display: inline-block;
.topic-status {
i {
color: $secondary-medium;
}
}
}
.topic-statuses:empty {
&:empty {
display: none;
}
// 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;
}
}
// 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 {
&.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;
padding: 0;
background: $primary-low;
@ -125,6 +86,24 @@ h2#site-text-logo
position: relative;
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 {
padding: 8px 10px;
height: 100%;
@ -132,6 +111,7 @@ h2#site-text-logo
box-sizing: border-box;
display: block;
}
.d-icon-caret-down {
position: absolute;
right: 0px;
@ -139,8 +119,7 @@ h2#site-text-logo
.drop {
display: none;
}
.drop.expanded {
&.expanded {
left: 0;
display: block;
position: absolute;
@ -152,9 +131,11 @@ h2#site-text-logo
padding: 5px;
border: 1px solid #eaeaea;
box-sizing: border-box;
li {
margin: 5px 0;
padding: 0;
a {
height: 100%;
display: block;
@ -162,58 +143,39 @@ h2#site-text-logo
}
}
}
}
}
/* page not found styles */
h1.page-not-found {
line-height: 24px;
margin: 5px 0 -5px 0;
}
.page-not-found-topics a.badge-wrapper {
.page-not-found {
&-topics a.badge-wrapper {
margin-left: 8px;
}
}
h2.popular-topics-title {
margin-bottom: 6px;
&-search h2 {
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 {
input, textarea, select, .input-prepend, .input-append {
display: inline-block;
margin-bottom: 0;
}
.control-group {
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;
}