discourse/app/assets/stylesheets/desktop/discourse.scss

545 lines
12 KiB
SCSS
Raw Normal View History

2013-09-06 03:37:07 +08:00
// 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
html {font-size: 14px/19px;}
2013-09-06 03:37:07 +08:00
@include medium-width {
body {
min-width: $medium-width;
}
.container,
.full-width {
width: $medium-width;
}
}
@include small-width {
body {
min-width: 760px;
2013-09-06 03:37:07 +08:00
}
.container,
.full-width {
min-width: 760px;
2013-09-06 03:37:07 +08:00
}
}
2014-08-06 21:31:13 +08:00
@media all
and (max-width : 570px) {
body {
min-width: 0;
}
.container,
.full-width {
min-width: 0;
}
2014-08-06 21:31:13 +08:00
.d-header .current-username a {display: none;}
2014-08-06 21:31:13 +08:00
}
2013-09-06 03:37:07 +08:00
header {
margin-bottom: 15px;
}
body {
.boxed {
height: 100%;
@include border-radius-all(5px);
&.white {
background-color: $secondary;
2013-09-06 03:37:07 +08:00
}
}
#main {
2013-12-10 05:27:49 +08:00
.fa-star.starred {
color: $danger;
2013-09-06 03:37:07 +08:00
}
a.star {
2014-08-06 21:31:13 +08:00
color: dark-light-diff($secondary, $primary, 80%, -20%);
2013-09-06 03:37:07 +08:00
&:before {
font-family: "FontAwesome";
content: "\f005";
}
&.starred {
color: $danger;
2013-09-06 03:37:07 +08:00
@include hover {
opacity: 1;
&:before {
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;
}
}
}
2013-09-06 03:37:07 +08:00
.grippie {
width: 100%;
border: 1px solid scale-color-diff();
border-width: 1px 0;
2013-09-06 03:37:07 +08:00
cursor: row-resize;
height: 11px;
overflow: hidden;
background-color: scale-color-diff();
display:block;
background: image-url("grippie.png") scale-color-diff() no-repeat center 3px;
2013-09-06 03:37:07 +08:00
}
}
.topic-statuses {
float: left;
margin: 0 3px 0 0;
2013-09-06 03:37:07 +08:00
padding: 0;
.topic-status {
padding: 0 2px 0 0;
2013-09-06 03:37:07 +08:00
margin: 0;
i {
font-size: 15px;
}
2013-09-06 03:37:07 +08:00
}
}
/* bootstrap carryover */
body {
input, textarea, select {
color: $primary;
}
code, pre {
font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace;
}
h1, h2, h3, h4, h5, h6 {
margin: 0;
text-rendering: optimizelegibility;
}
2014-07-09 06:57:41 +08:00
/* page not found styles */
.page-not-found {
margin: 20px 0 40px 0;
}
.page-not-found-search {
margin-top: 20px;
}
2014-07-09 06:57:41 +08:00
.popular-topics-title, .recent-topics-title {
margin-bottom: 10px;
}
.page-not-found-topics .span8 {
line-height: 1.5em;
2014-07-16 01:56:51 +08:00
margin-right: 20px;
2014-07-09 06:57:41 +08:00
}
// this removes the unwanted top margin on a paragraph under a heading
h1+p, h2+p, h3+p, h4+p, h5+p, h6+p {
margin-top:0px;
}
form {
margin: 0 0 18px;
}
label, input, button, select, textarea {
font-size: 13px;
font-weight: normal;
line-height: 18px;
}
input, button, select, textarea {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
label {
display: block;
margin-bottom: 5px;
}
select, textarea {
display: inline-block;
padding: 4px;
margin-bottom: 9px;
font-size: 13px;
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"] {
display: inline-block;
height: 18px;
padding: 4px;
margin-bottom: 9px;
font-size: 13px;
line-height: 18px;
color: $primary;
}
}
input {
width: 210px;
}
textarea {
width: 210px;
height: auto;
background-color:$secondary;
border: 1px solid scale-color-diff();
border-radius: 3px;
2014-08-06 21:31:13 +08:00
box-shadow: inset 0 1px 1px rgba(0,0,0, .3);
-webkit-transition: border linear 0.2s, box-shadow linear 0.2s;
transition: border linear 0.2s, box-shadow linear 0.2s;
}
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 scale-color-diff();
border-radius: 3px;
2014-08-06 21:31:13 +08:00
box-shadow: inset 0 1px 1px rgba(0,0,0, .3);
-webkit-transition: border linear 0.2s, box-shadow linear 0.2s;
transition: border linear 0.2s, box-shadow linear 0.2s;
}
}
textarea:focus {
border-color: $tertiary;
outline: 0;
2014-08-06 21:31:13 +08:00
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;
2014-08-06 21:31:13 +08:00
box-shadow: inset 0 1px 1px rgba(0,0,0, .3), 0 0 8px $tertiary;
}
}
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;
}
}
select, input[type="file"] {
line-height: 28px;
}
select {
width: 220px;
border: 1px solid scale-color-diff();
&[multiple], &[size] {
height: 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;
}
.input-xxlarge {
width: 530px;
}
input[class*="span"], select[class*="span"], textarea[class*="span"] {
float: none;
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: scale-color-diff();
border-color: scale-color-diff();
}
input {
&[type="radio"][disabled], &[type="checkbox"][disabled], &[type="radio"][readonly], &[type="checkbox"][readonly] {
background-color: transparent;
}
}
2014-05-29 00:12:31 +08:00
.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;
2014-05-07 11:53:04 +08:00
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-prepend, .input-append {
margin-bottom: 5px;
}
.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 scale-color-diff();
}
.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;
}
.form-horizontal {
.control-group {
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 {
.modal-footer {
a.btn-primary {
color: $secondary;
}
}
}
}
/* bootstrap columns */
.row:before,
.row:after {
display: table;
content: "";
}
.row:after {
clear: both;
}
.span24 {
width: 1236px;
float: left;
}
.span15 {
2014-04-23 07:22:19 +08:00
/* 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 {
width: 196px;
margin-right: 12px;
float: left;
}
.offset2 {
margin-left: 116px;
}
.offset1 {
margin-left: 64px;
}