Skip to content
This repository has been archived by the owner on Dec 23, 2017. It is now read-only.

Commit

Permalink
Merge pull request #6 from 18F/new-styles
Browse files Browse the repository at this point in the history
New styles
  • Loading branch information
theresaanna committed Nov 19, 2014
2 parents 3df6cec + abe6f08 commit 722756f
Show file tree
Hide file tree
Showing 122 changed files with 1,840 additions and 934 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
"test": "mocha tests/unit",
"watch": "watchify static/js/init.js -o static/js/app.js --debug --verbose",
"build": "browserify static/js/init.js > static/js/app.js",
"sass-watch": "sass --watch static/styles/sass/styles.scss:static/styles/styles.css",
"sass-build": "sass static/styles/sass/styles.scss:static/styles/styles.css",
"sass-watch": "sass --watch static/styles/:static/styles/",
"sass-build": "sass static/styles/sass/:static/styles/",
"watch-all": "npm run watch & npm run sass-watch"
},
"repository": {
Expand Down
Binary file added static/img/brand.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/brand@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/mesh.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/mesh@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/us_flag_small.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions static/styles/_base/_base.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// Bitters v0.10.0
// http://bitters.bourbon.io

// Variables
@import 'variables';

// Mixins
@import 'mixins/flash';
@import 'mixins/icon';

// Extends
@import 'extends/button';
@import 'extends/clearfix';
@import 'extends/hide-text';

// Typography and Elements
@import 'typography';
@import 'forms';
@import 'tables';
@import 'lists';
@import 'flashes';
@import 'buttons';
46 changes: 46 additions & 0 deletions static/styles/_base/_buttons.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
@mixin button($bgcolor, $textcolor, $hoverbg, $hovertext) {
@include appearance(none);
@include transition(background-color .1s);
-webkit-font-smoothing: antialiased;
background-color: $bgcolor;
border-radius: $base-border-radius;
border: none;
display: inline-block;
color: $textcolor;
font-size: $base-font-size;
font-weight: bold;
line-height: 1;
padding: .75em 1em;
text-decoration: none;
cursor: pointer;
user-select: none;
vertical-align: middle;
white-space: nowrap;

&:hover {
background-color: $hoverbg;
color: $hovertext;
}

&:active,
&:focus {
@include appearance(none);
outline: none;
}
}

.button {
@include button($light-gray, $dark-gray, $dark-gray, #fff);
border: 1px solid $medium-gray;

}

button,
input[type="submit"],
.primary {
@include button($blue, #fff, $blue-2, #fff);

&:active {
background-color: $blue-2;
}
}
15 changes: 15 additions & 0 deletions static/styles/_base/_flashes.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
%flash-alert {
@include flash($alert-color);
}

%flash-error {
@include flash($error-color);
}

%flash-notice {
@include flash($notice-color);
}

%flash-success {
@include flash($success-color);
}
126 changes: 126 additions & 0 deletions static/styles/_base/_forms.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
fieldset {
background: lighten($base-border-color, 10);
border: 1px solid $base-border-color;
margin: 0 0 ($base-line-height / 2) 0;
padding: $base-line-height;
}

input,
label,
select {
display: block;
font-family: $form-font-family;
font-size: $form-font-size;
}

label {
margin-bottom: $base-line-height / 4;

&.required:after {
content: "*";
}

abbr {
display: none;
}
}

#{$all-text-inputs} {
height: 2rem;
}

textarea,
#{$all-text-inputs},
select[multiple=multiple] {
@include box-sizing(border-box);
@include transition(border-color);
background-color: white;
border-radius: $form-border-radius;
border: 1px solid $form-border-color;
box-shadow: $form-box-shadow;
font-family: $form-font-family;
font-size: $form-font-size;
padding: .5rem 1rem;
width: 100%;

&:hover {
border-color: $form-border-color-hover;
}

&:focus {
border-color: $form-border-color-focus;
box-shadow: $form-box-shadow-focus;
outline: none;
}
}

textarea {
resize: vertical;
}

input[type="search"] {
@include appearance(none);
}

input[type="checkbox"], input[type="radio"] {
display: inline;
margin-right: $base-line-height / 4;
}

input[type="file"] {
margin-bottom: $base-line-height / 2;
padding-bottom: ($base-line-height / 3);
width: 100%;
}

select {
width: auto;
max-width: 100%;
margin-bottom: $base-line-height;
}


// Custom form elements
.input-button-combo {
#{$all-text-inputs} {
width: 75%;
float: left;
border-radius: $base-border-radius 0 0 $base-border-radius;
}

input[type="submit"] {
width: 25%;
float: left;
border-radius: 0 $base-border-radius $base-border-radius 0;
}
}

// Overriding Chosen styles
// .chosen-container-single .chosen-single {
// background: #fff;
// border-radius: $base-border-radius;
// padding: .5rem 1rem;
// height: 2rem;
// font-size: $form-font-size;
// line-height: 1;
// color: $base-font-color;
//
// }
//
// .chosen-container-active.chosen-with-drop .chosen-single {
// background: #fff;
// }
//
// // Chosen select toggle
// .chosen-container-single .chosen-single div {
// width: 32px;
// background-color: $dark-gray;
//
// b {
// content: "\e62a";
// color: #fff;
// @include icon();
// background: none;
//
// }
// }
6 changes: 6 additions & 0 deletions static/styles/_base/_grid-settings.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// Neat Breakpoints
$medium-screen: em(640);
$large-screen: em(860);

$medium-screen-up: new-breakpoint(min-width $medium-screen 4);
$large-screen-up: new-breakpoint(min-width $large-screen 8);
38 changes: 38 additions & 0 deletions static/styles/_base/_lists.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
ul, ol {
margin: 0;
padding: 0;
list-style-type: none;

&%default-ul {
list-style-type: disc;
margin-bottom: $base-line-height / 2;
padding-left: $base-line-height;
}

&%default-ol {
list-style-type: decimal;
margin-bottom: $base-line-height / 2;
padding-left: $base-line-height;
}
}

%flat-list {
@include clearfix();

li {
float: left;
}
}

dl {
margin-bottom: $base-line-height / 2;

dt {
font-weight: bold;
margin-top: $base-line-height / 2;
}

dd {
margin: 0;
}
}
22 changes: 22 additions & 0 deletions static/styles/_base/_tables.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
table {
border-collapse: collapse;
margin: ($base-line-height / 2) 0;
table-layout: fixed;
width: 100%;
}

th {
border-bottom: 1px solid darken($base-border-color, 15%);
font-weight: bold;
padding: ($base-line-height / 2) 0;
text-align: left;
}

td {
border-bottom: 1px solid $base-border-color;
padding: ($base-line-height / 2) 0;
}

tr, td, th {
vertical-align: middle;
}
98 changes: 98 additions & 0 deletions static/styles/_base/_typography.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
body {
-webkit-font-smoothing: antialiased;
background-color: $base-background-color;
color: $base-font-color;
font-family: $base-font-family;
font-size: $base-font-size * .875;
line-height: $unitless-line-height;
}

h1, h2, h3, h4, h5, h6 {
font-family: $header-font-family;
line-height: $header-line-height;
margin: 0;
text-rendering: optimizeLegibility; // Fix the character spacing for headings
}

h1 {
font-size: $base-font-size * 3.125;
font-weight: 300;
}

h2 {
font-size: $base-font-size * 2.5;
font-weight: 300;
margin-bottom: 1rem;
}

h3 {
font-size: $base-font-size * 2;
font-weight: 400;
}

h4 {
font-size: $base-font-size * 1.25;
font-weight: 400;
}

h5 {
font-size: $base-font-size * 1.25; // 16 * 1.25 = 20px
}

h6 {
font-size: $base-font-size;
}

p {
margin: 0 0 ($base-line-height * .5);
}

a {
@include transition(color 0.1s linear);
color: $base-link-color;
text-decoration: none;

&:hover {
color: $hover-link-color;
}

&:active, &:focus {
color: $hover-link-color;
outline: none;
}
}

hr {
border-bottom: 1px solid $base-border-color;
border-left: none;
border-right: none;
border-top: none;
margin: $base-line-height 0;
}

img {
margin: 0;
max-width: 100%;
}

blockquote {
border-left: 2px solid $base-border-color;
color: lighten($base-font-color, 15);
margin: $base-line-height 0;
padding-left: $base-line-height / 2;
}

cite {
color: lighten($base-font-color, 25);
font-style: italic;

&:before {
content: '\2014 \00A0';
}
}

// Universal text classes

.lead-text {
font-size: $base-font-size * 1.125;
}
Loading

0 comments on commit 722756f

Please sign in to comment.