Skip to content

Commit

Permalink
Merge pull request #1 from PopulateTools/css-reorg
Browse files Browse the repository at this point in the history
Basic CSS reorg in components
  • Loading branch information
furilo committed Oct 26, 2016
2 parents 2623d7e + e6f0b38 commit 4efc491
Show file tree
Hide file tree
Showing 17 changed files with 1,483 additions and 1,517 deletions.
1,578 changes: 61 additions & 1,517 deletions app/assets/stylesheets/gobierto_budgets/application.scss

Large diffs are not rendered by default.

118 changes: 118 additions & 0 deletions app/assets/stylesheets/gobierto_budgets/comp-breadcrumbs.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
/*
* Breadcrumbs
*
*/
.breadcrumb {
margin: 0 0 2em 0;
background: #FFF;
// border-bottom: 1px solid #DFDFDF;
padding: 1em 0;
a,span {
margin: 0 .5em;
font-size: 1.15em;
}
a:first-child {
margin-left: 0
}
}
.breadcrumb.is_stuck {
z-index: 10000;
@include box-shadow(0,3px,6px,rgba(0, 0, 0, 0.2));
}

.breadcrumb.year_only {
margin-bottom: 0;
.bread_hover {
max-width: 100px;
}
.bread_hover {
display: inline-block;
}
.bread_links {
background: transparentize($color_main, .9);
padding: .3em .75em;
@include border-radius(4px);
font-weight: 200;
a {
text-decoration: none;
color: $color_text;
}
.fa {
vertical-align: middle;
margin-top: -10px;
color: $color_main;
}
}
.line_browser {
padding: calc(1.5em - 1px) 2em 2em 2em;
.col {
padding: 0;
width: 100%;
font-size: 1.2em;
font-weight: 200;
a {
display: block;
}
}
}
}
.header_block_inline {
h2 {
margin: .8em 0 2em 0;
}
}

.line_browser {
z-index: 100;
overflow: hidden;
white-space: nowrap;
display: none;
position: absolute;
background: #FFF;
padding: 2em 1em 1em 2em;
margin-left: calc( -2em - 1px);
margin-top: calc( -3.5em - 1px);
border: 1px solid #DFDFDF;
@include border-radius(4px);
box-sizing: border-box;
@include box-shadow(0,3px,6px,rgba(0, 0, 0, 0.2));
.col {
display: inline-block;
display: none;
float: left;
padding: 0 1em 0 0;
}
.col[data-level='0'] {
display: block;
}
.bread_links {
margin: 0 0 1em 0;
}
table {
font-size: .85em;
}
td.selected, td.selected_no_children {
border-left: 2px solid rgba($color_main, .5);
position: relative;
}
td.selected::after {
content: ' ';
height: 0;
position: absolute;
width: 0;
border-style: solid;
border-width: 6px 0 6px 11.3px;
border-color: transparent transparent transparent rgba($color_main, .5);
top: 38%;
left: 100%;
}
}
.bread_links {
display: inline-block;
}
.open_line_browser, .close_line_browser {
opacity: .5;
color: $color_main;
cursor: pointer;
margin: 0 1em 0 0;
}
75 changes: 75 additions & 0 deletions app/assets/stylesheets/gobierto_budgets/comp-filters.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
/*
* Filter
*
*/
.filter {
font-size: .75em;
a {
display: inline-block;
padding: .35em 1.25em .25em;
margin: 0 .75em 0 0;
@include border-radius(2em);
background: rgba($color_main, .2);
text-decoration: none;
}
a:hover {
background: rgba($color_main, .3);
text-decoration: none;
}
a.active, a.active:hover {
border: 1px solid rgba($color_main, .2);
background: $color_main_negative;
}
a.active {
cursor: default;
}
a.help {
font-weight: bold;
padding: .35em 1em .25em;
}
.separator_v {
margin: -.25em 2em 0 2em;
}
span.label {
padding: 0 1em;
}
}

/* comparator version, pending to unify */
.form_filters {
display: inline-block;
float: right;
font-size: 12px;
margin: 1em 0;

.group {
display: inline-block;
margin: 0 0 0 1em;
}
ul, li {
margin: 0;
padding: 0;
list-style-type: none;
display: inline-block;
}
ul {
@include border-radius(2em);
background: #EFF8F9;
padding: 0 10px;
margin: 0;
}
li a {
display: inline-block;
border-right: 1px solid $background;
text-decoration: none;
padding: 1px 7px;
margin: 0;

}
li:last-child a {
border: none;
}
li a:hover, li a.buttonSelected, a.active {
background: #D1EAED;
}
}
157 changes: 157 additions & 0 deletions app/assets/stylesheets/gobierto_budgets/comp-forms.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
/*
* Forms
*
*/
input[type=text], input[type=email], input[type=submit], .button, button, .option, select, option {
box-sizing: border-box;
height: 54px;
padding: 0 1em;
margin: 0 .5em 0 0;
display: inline-block;
vertical-align: middle;
@include border-radius(6px);
border: 1px solid $color_separator;
}
input[type=submit], .button, button {
@include transition;
border: 0;
background: $color_main;
color: #FFF;
padding: 0 2em;
text-transform: uppercase;
font-style: 700;
cursor: pointer;
}
input[type=submit]:hover, .button:hover, button:hover {
background: darken($color_main, 10%);
}
option, select {
font-weight: 400;
font-size: .8em;
// border: 1px solid #CCC;
padding: 18px;
background: #F1F1F1;
}
.option {
padding: 0;
}
.button, button {
text-decoration: none;
padding: 1em 2em;
font-weight: 700;
}
.button:hover, button {
color: #FFF;
}
button.light, .button.light {
background: $color_main_negative;
border: 1px solid $color_separator;
color: $color_main;
}
button.light:hover, .button.light:hover {
background: rgba($color_main, .2);
}
input[type="checkbox"], input[type="radio"] {
display: none;
}
input[type="checkbox"] + label, input[type="radio"] + label {
cursor: pointer;
display: block;
padding: 14px;
@include transition;
}
input[type="checkbox"] + label span, input[type="radio"] + label span {
display: inline-block;
width: 19px;
height: 19px;
border: 1px solid $color_main;
background: #FFF;
@include border-radius(3px);
margin: -4px 11px 0 0;
vertical-align: middle;
cursor: pointer;
}
input[type="checkbox"] + label:hover, input[type="radio"] + label:hover {
background: rgba($color_main, .1);
}
input[type="checkbox"]:checked + label, input[type="radio"]:checked + label {
background: rgba($color_main, .2);
}
input[type="checkbox"]:checked + label span, input[type="radio"]:checked + label span {
background: $color_main;
}
input[type="radio"] + label span {
@include border-radius(13px);
}
select {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
border: none;
cursor: pointer;
}
select::-ms-expand { /* for IE 11 */
display: none;
}
.disclaimer {
font-size: .75em;
opacity: .5;
}
.button_light {
background: rgba($color_1, .2);
@include transition;
font-size: .75em;
text-decoration: none;
padding: .5em 1.5em;
line-height: 1.2em;
@include border-radius(20px);
margin: 1em 0;
display: inline-block;
}
.button_light:hover {
background: rgba($color_1, .3);
text-decoration: none;
}

.slim_search {
label {
font-weight: 200;
padding: 0 1em 0 0;
}
input[type=text] {
height: 40px;
width: 300px;
}
margin-top: .8em;
}


/*
* Autocomplete
*
*/
.autocomplete-suggestions {
border: 1px solid #999;
font-size: 12px;
background: #FFF;
cursor: default;
overflow: auto;
-webkit-box-shadow: 1px 4px 3px rgba(50, 50, 50, 0.64);
-moz-box-shadow: 1px 4px 3px rgba(50, 50, 50, 0.64);
box-shadow: 1px 4px 3px rgba(50, 50, 50, 0.64);
}
.autocomplete-suggestion { padding: 2px 10px; white-space: nowrap; overflow: hidden; }
.autocomplete-no-suggestion { padding: 2px 10px;}
.autocomplete-selected { background: $color_main; color: #FFF; }
.autocomplete-suggestions strong { font-weight: bold; color: #000; }
.autocomplete-group { }
.autocomplete-group strong {
font-weight: bold;
font-size: 14px;
color: #999;
background: $separator;
padding: 2px 10px;
text-transform: uppercase;
display: block;
border-bottom: 1px solid $separator;
}
Loading

0 comments on commit 4efc491

Please sign in to comment.