app/assets/stylesheets/main.css.scss
$dark: #0063A5;
$light: #0090D2;
$error: #E42020;
$success: #37A359;
@mixin break-after {
&:after {
content: ".";
display: block;
height: 0;
clear: both;
visibility: hidden;
}
}
@mixin border-box {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
-o-box-sizing: border-box;
box-sizing: border-box;
}
@mixin gradient-top($from, $to) {
background: $from;
background: -moz-linear-gradient(top, $from 0%, $to 30%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,$from), color-stop(30%,$to));
background: -webkit-linear-gradient(top, $from 0%,$to 30%);
background: -o-linear-gradient(top, $from 0%,$to 30%);
background: -ms-linear-gradient(top, $from 0%,$to 30%);
background: linear-gradient(to bottom, $from 0%,$to 30%);
}
body {
font-family: 'Cabin', sans-serif;
text-rendering: optimizelegibility;
margin: 0;
}
body > div:not([class]), .box {
// no op that allows content inside to be placed relatively to the
// container
position: relative;
top: 0;
left: 0;
margin: 20px auto;
border: 1px solid #888;
box-shadow: 0 0 10px rgba(40, 40, 40, 0.4);
background: #fff;
padding: 20px;
width: 90%;
max-width: 1400px;
@include border-box;
& h2:first-child, h3:first-child {
margin-top: 0;
}
&.wrong {
@include gradient-top(#FFE4E3, #fff);
}
&.correct {
@include gradient-top(#E6FFE9, #fff);
}
}
#header {
background: $dark;
/* undo body > div rules. Thanks Internet Explorer! */
box-shadow: none;
margin: 0;
max-width: 100%;
padding: 0;
position: static;
width: 100%;
height: 122px;
}
#header + div, noscript + div, noscript div {
margin-top: 0 !important;
border-top: 0 !important;
}
h1 {
color: #fff;
font-family: 'Yanone Kaffeesatz', sans-serif;
font-size: 45px;
text-shadow: 1px 1px 1px #000;
padding: 10px 20px;
margin: 0px auto;
width: 90%;
max-width: 1400px;
height: 72px;
overflow: hidden;
white-space: nowrap;
@include border-box;
}
#nav {
padding: 5px 15px;
background: $light;
box-shadow: 0 0 10px rgba(40, 40, 40, 0.4);
border: 1px solid #004A6B;
border-bottom: 0;
font-family: 'Yanone Kaffeesatz', sans-serif;
color: #fff;
text-shadow: 1px 1px rgba(55, 55, 55, 0.7);
font-size: 23px;
margin: 0px auto;
width: 90%;
max-width: 1400px;
@include border-box;
a, span {
color: inherit;
display: inline-block;
padding: 5px;
font-weight: bold;
}
> span {
font-weight: normal;
}
> span, > a {
float: right;
}
ul {
list-style-type: none;
display: inline-block;
margin: 0;
padding: 0;
li {
display: inline-block;
}
}
}
a {
text-decoration: none;
color: #0090D2;
cursor: pointer;
&:hover {
text-decoration: underline;
}
}
td {
vertical-align: top;
a + a {
margin-left: 10px;
}
}
h2 {
margin: 10px 0;
}
h2, h3, h4, h5 {
small {
color: #888;
}
}
.chooser {
margin: 0;
padding: 0;
list-style-type: none;
li {
margin: 5px 0;
}
a.button {
width: 120px;
margin-right: 5px;
}
}
.inline-chooser {
margin: 0;
padding: 0;
list-style-type: none;
ul {
margin: 0;
padding: 0;
list-style-type: none;
display: table;
li {
padding-bottom: 15px;
display: table-row;
}
li > div {
display: table-cell;
vertical-align: middle;
> .button {
width: 100%;
@include border-box;
}
}
li > .tex {
padding-left: 10px;
padding-top: 10px;
padding-bottom: 10px;
}
}
}
p {
&.left {
display: table-cell;
padding-right: 5px;
}
&.right {
display: table-cell;
margin: 0;
}
}
form {
clear: both;
@include break-after;
line-height: 30px;
}
label {
width: 122px;
font-weight: bold;
float: left;
clear: left;
cursor: pointer;
margin: 5px 0;
}
.field_with_errors label {
color: $error;
}
input + span, select + span, textarea + span, .field_with_errors + span {
float: left;
display: block;
margin-left: 8px;
color: #777;
line-height: 23px;
padding-top: 4px;
}
input[type=checkbox] + span {
margin-top: -1px;
}
input[type="checkbox"] {
margin-top: 8px;
}
input, textarea {
@include border-box;
float: left;
display: block;
min-width: 320px;
padding: 4px;
margin: 4px 0;
border: 1px solid #aaa;
background: #fff;
color: #000;
&:focus {
border-color: $dark !important;
box-shadow: 0 0 2px $light;
outline: none;
}
&[disabled] {
color: #666;
font-style: italic;
}
&[type=submit] {
clear: both;
margin: 8px 0;
min-width: 0;
}
}
.field_with_errors input {
border-color: #B01E1E;
}
textarea {
min-width: 600px;
height: 150px;
}
select {
@include border-box;
float: left;
min-width: 320px;
margin: 4px 0;
padding-left: 4px;
padding-top: 3px;
border: 1px solid #aaa;
background: #fff;
&:focus {
border-color: $dark !important;
box-shadow: 0 0 2px $light;
outline: none;
}
option {
background: #fff;
color: #000;
line-height: 30px;
padding-bottom: 4px;
padding-left: 4px;
}
}
.smallform {
input, textarea, select {
min-width: 100px;
width: 100px;
}
}
.error {
ul {
margin-top: 0;
padding-left: 16px;
}
}
.flash {
ul {
margin: 0;
}
}
.alert-error, td .wrong {
color: $error;
}
.alert-success, td .correct {
color: $success;
}
table {
margin-top: 20px;
&.spaced {
th, td {
padding: 2px 10px;
}
}
&.evenodd tr:nth-child(even) {
background: #f7f7f7;
}
}
th {
text-align: left;
vertical-align: top;
}
img {
vertical-align: middle;
}
img.latex-block {
display: block;
margin: 5px 0;
}
.tex {
font-size: 17px;
line-height: 19px;
img {
vertical-align: text-bottom;
}
}
.clear, #preview, #preview > div {
clear: both;
&:after {
content: "";
display: block;
clear: both;
}
}
#preview {
border-top: 1px solid #AAAAAA;
border-bottom: 1px solid #AAAAAA;
margin-left: 100px;
}
.toggle {
width:100% !important;
min-width:100% !important;
}
.toggle-head {
cursor: pointer;
&:after {
color: #777;
padding-left: 10px;
}
}
.toggle-closed {
&:after {
content: "▾";
}
}
.toggle-opened {
&:after {
content: "▴";
}
}
body {
counter-reset: count;
}
.count:after {
counter-increment: count;
content: " " counter(count);
}
.strike {
text-decoration: line-through;
}
.star, .topright {
position: absolute;
top: 20px;
right: 20px;
}
.dotimg {
max-width: 100%;
}
hr {
color: #ddd;
background-color: #ddd;
height: 1px;
border: 0;
}
.okay-state {
width: 50px;
height: 50px;
margin-right: 10px;
margin-bottom: 10px;
float:left;
line-height: 50px;
vertical-align: top;
font-size: 50px;
text-align: center;
}
.traceToRootLine {
color: #777;
margin-bottom: 20px;
display: block;
}
.traceToRootSplitter {
border-left: 1px solid #ccc;
margin-left: 5px;
padding-left: 5px;
display: inline-block;
vertical-align: top;
}
.columnize {
-moz-columns: auto 18em;
-webkit-columns: auto 18em;
columns: auto 18em;
a {
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
width: 18em;
display: inline-block;
}
b {
display: inline-block;
width: 18em;
}
}
.alternating.even {
background: #efefef;
margin: 20px -20px;
padding: 20px;
}