regexper-static/src/sass/main.scss
2014-12-29 18:01:10 -05:00

381 lines
6.6 KiB
SCSS

@import 'base';
@import 'open-iconic';
@import 'compass/reset';
@import 'compass/typography/lists/inline-block-list';
@import 'compass/typography/vertical_rhythm';
@import 'compass/css3/box-shadow';
@import 'compass/css3/border-radius';
@import 'compass/css3/user-interface';
@import 'compass/css3/animation';
@import 'compass/css3/transform';
@import 'compass/css3/images';
@import 'compass/typography/links/unstyled-link';
@import 'compass/utilities/general/clearfix';
@include establish-baseline;
body {
font-family: sans-serif;
background: $gray;
margin-bottom: rhythm(1);
}
a {
color: $black;
}
.oi.with-text[data-glyph]:before {
margin-right: rhythm(1/4);
}
h1 {
@include adjust-font-size-to(48px, 2);
}
ul.inline-list {
@include adjust-font-size-to(14px, 2/3);
@include inline-block-list;
li {
&::after {
content: '//';
padding: 0 rhythm(1/4);
}
&:last-child::after {
content: '';
}
}
}
#deprecation-notice {
@include background(linear-gradient(top, $green, $dark-green));
background-color: $green;
padding: rhythm(1);
margin: rhythm(1);
@include border-radius(20px);
@include box-shadow;
@include clearfix;
h1 {
font-family: 'Bangers', 'cursive';
}
p {
margin-top: rhythm(1);
}
}
header {
@include background(linear-gradient(top, $green, $dark-green));
background-color: $green;
padding: rhythm(1);
@include box-shadow;
@include clearfix;
.logo {
display: inline-block;
span {
color: $gray;
}
}
h1 {
font-family: 'Bangers', 'cursive';
}
nav {
@include adjust-font-size-to(18px, 1);
display: inline-block;
margin-left: rhythm(1/4);
padding-left: rhythm(1/4);
}
a {
@include unstyled-link;
}
}
#content {
padding: rhythm(1);
.copy {
background-color: $tan;
padding: rhythm(1/2);
}
.changelog {
dt {
font-weight: bold;
}
dd {
&::before {
content: '\00BB';
font-weight: bold;
margin-right: rhythm(1/2);
}
}
}
.error {
overflow: hidden;
h1 {
@include adjust-font-size-to($base-font-size * 2);
font-weight: bold;
float: left;
}
blockquote {
background-color: $green;
position: relative;
padding: rhythm(1);
display: inline-block;
font-style: italic;
float: right;
&::before {
@include adjust-font-size-to($base-font-size * 4);
content: '\201c';
position: absolute;
left: 0;
top: 0;
font-style: normal;
}
&::after {
@include adjust-font-size-to($base-font-size * 4);
content: '\201d';
position: absolute;
right: 0;
bottom: -0.5em;
font-style: normal;
}
}
p {
clear: left;
}
}
.documentation {
h1 {
@include adjust-font-size-to($base-font-size * 2);
font-weight: bold;
}
h2 {
@include adjust-font-size-to($base-font-size);
font-weight: bold;
}
h3 {
@include adjust-font-size-to($base-font-size);
&::before {
content: '\00BB';
font-weight: bold;
margin-right: rhythm(1/4);
}
}
h1, h2, h3 {
clear: both;
}
h2, h3 {
margin-bottom: rhythm(1);
}
section, div.section, p {
margin: rhythm(1) 0;
}
figure {
line-height: 0;
background: $white;
margin: rhythm(1/4);
@include box-shadow;
&.shift-right {
float: right;
margin-left: rhythm(1/2);
}
&.shift-left {
float: left;
margin-right: rhythm(1/2);
}
&.loading {
min-width: 100px;
.svg {
position: absolute;
top: -10000px;
}
}
.svg {
margin: 0;
text-align: center;
}
figcaption {
@include adjust-font-size-to($base-font-size);
background: $green;
font-weight: bold;
padding: 0 rhythm(1/4);
}
}
section, div {
overflow: hidden;
}
}
.application {
position: relative;
@include clearfix;
textarea {
@include adjust-font-size-to($base-font-size);
border: 0 none;
outline: none;
background: $tan;
padding: 0 0.5em;
width: 100% !important; // "!important" prevents user changing width
box-sizing: border-box;
font-family:Consolas,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New, monospace;
@include input-placeholder {
color: $gray;
}
}
button {
@include adjust-font-size-to($base-font-size);
width: 100px;
border: 0 none;
@include background(linear-gradient(top, $green, $dark-green));
background-color: $green;
float: left;
cursor: pointer;
}
ul {
float: right;
display: none;
body.has-results & {
display: inline-block;
}
}
}
.results {
margin-top: rhythm(1);
display: none;
body.has-results &, body.has-error &, body.is-loading & {
display: block;
}
}
}
#loading {
background: $white;
padding: rhythm(1/2) 0;
display: none;
body.is-loading & {
display: block;
}
}
.progress {
width: 50%;
height: rhythm(1/2);
border: 1px solid $dark-green;
overflow: hidden;
margin: rhythm(1) auto;
div {
background: $green;
@include background-image(linear-gradient(
-45deg,
$green 25%,
$light-green 25%,
$light-green 50%,
$green 50%,
$green 75%,
$light-green 75%,
$light-green 100%
));
background-size: rhythm(2) rhythm(2);
background-repeat: repeat-x;
height: 100%;
@include animation(progress 1.0s infinite linear);
}
}
@include keyframes(progress) {
0% { background-position-x: rhythm(2); }
100% { background-position-x: 0; }
}
#error {
background: $red;
color: $white;
padding: 0 0.5em;
white-space: pre;
font-family: monospace;
font-weight: bold;
display: none;
overflow-x: auto;
body.has-error & {
display: block;
}
}
#warnings {
@include adjust-font-size-to($base-font-size, 1);
font-weight: bold;
background-color: $yellow;
display: none;
li {
margin: rhythm(1/4);
}
body.has-results & {
display: block;
}
}
#regexp-render {
background: $white;
width: 100%;
overflow: auto;
text-align: center;
body.is-loading &, body.has-error & {
position: absolute;
top: -10000px;
}
}
footer {
padding: 0 rhythm(1);
img {
vertical-align: middle;
width: 80px;
height: 15px;
}
}