Skip to content

Instantly share code, notes, and snippets.

@juanrules
Created August 30, 2016 12:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save juanrules/969e9124ff9abac6e8bca8dde190e3b6 to your computer and use it in GitHub Desktop.
Save juanrules/969e9124ff9abac6e8bca8dde190e3b6 to your computer and use it in GitHub Desktop.
@mixin o-2cols-calc() {
@extend %row-flex;
justify-content: space-between;
@media #{ $medium-up } {
@include rem-fallback(margin-bottom, 1.6);
}
&__form-wrapper,
&__results,
{
width: 50%;
@media #{ $small-only } {
width: 100%;
margin: 0 auto;
}
}
&__form-wrapper {
background-color: rgba( $tertiary-color, .8);
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: center;
border-top-left-radius: $global-radius;
border-bottom-left-radius: $global-radius;
@include rem-fallback(padding-top, 1.2);
@media #{ $small-only } {
border-radius: $global-radius;
@include rem-fallback(margin-bottom, .8);
}
}
&__form {
@include rem-fallback(padding, 2, 4);
@media #{ $medium-only } {
@include rem-fallback(padding, 1);
}
@media #{ $small-only } {
@include rem-fallback(padding, 1);
}
label {
display: flex;
justify-content: flex-end;
align-items: center;
text-align: right;
@include rem-fallback(margin-bottom, 1);
@include rem-fallback(font-size, 1.05);
@media #{ $medium-only } {
display: block;
text-align: left;
}
@media #{ $small-only } {
display: block;
text-align: left;
}
> span {
position: relative;
min-width: 40%;
width: 40%;
margin-left: 16px;
margin-left: 1rem;
display: inline-block;
@media #{ $medium-only } {
margin-left: 0;
width: 100%;
}
@media #{ $small-only } {
margin-left: 0;
width: 100%;
}
i {
position: absolute;
left: 3px;
bottom: 7px;
}
input[type="text"],
input[type="date"],
input[type="number"] {
margin-left: 0;
width: 100%;
padding-left: 15px;
}
}
}
input[type="text"],
input[type="date"],
input[type="number"] {
border-radius: $global-radius;
@include rem-fallback(margin-left, 1);
margin-bottom: 0;
border: 0;
min-width: 40%;
width: 40%;
@media #{ $medium-only } {
margin-left: 0;
width: 100%;
}
@media #{ $small-only } {
margin-left: 0;
width: 100%;
}
&.has-error {
border: solid 2px rgba(184, 42, 74, 1);
}
}
.button {
width: 40%;
}
}
&__description {
background-color: rgba($secondary-color, .9);
@include rem-fallback(padding, 1.5);
@include rem-fallback(font-size, .7);
color: rgba($white, .8);
border-bottom-left-radius: $global-radius;
@media #{ $medium-only } {
@include rem-fallback(font-size, .9);
}
@media #{ $small-only } {
border-bottom-left-radius: $global-radius;
border-bottom-right-radius: $global-radius;
}
}
&__articles-list.c-article-card--strips {
display: flex;
flex-direction: column;
justify-content: space-between;
width: 50%;
@include rem-fallback(margin-left, .2);
@media #{ $small-only } {
width: 100%;
margin-left: 0;
}
.c-article-card {
margin: 0;
width: 100%;
height: calc(100%/3);
@media #{$medium-only} {
max-height: 185px;
}
@media #{ $small-only } {
height: auto;
@include rem-fallback(margin, 0, 0, .5);
}
}
.c-article-card__title {
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
.c-article-card__header,
.c-article-card__body {
@media #{$medium-only} {
width: 50%;
}
}
/*.c-article-card__intro {
@media #{$medium-only} {
display: none;
}
}*/
.c-article-card__footer {
@include rem-fallback(padding, 0rem, .8rem, 0rem);
@media #{ $small-only } {
display: block;
position: absolute;
bottom: 0;
left: 0;
}
@media #{$medium-only} {
display: block;
position: absolute;
bottom: 0;
left: 0;
}
a {
margin: 0;
}
}
.c-article-card--no-image .c-article-card__footer {
position: initial;
}
.c-article-card__header {
justify-content: flex-start;
@media #{$medium-only} {
display: none;
}
}
.c-article-card__taxonomies {
@media #{ $small-only } {
display: none;
}
@media #{ $medium-only } {
display: none;
}
}
article:nth-child(2) {
@media #{ $medium-up } {
@include rem-fallback(margin, .2, 0);
}
}
}
&__slider {
display: flex;
flex-direction: column;
justify-content: center;
width: 50%;
background-color: rgba($white, 1);
}
&__slide {
text-align: center;
@include rem-fallback(padding, 2);
color: $primary-color;
h1,h2,h3,h4{
color: $primary-color;
@extend %h3;
font-weight: normal;
}
[class*="fa-"], [class*="boi-fontello"], [class*="i-boi"]{
@include rem-fallback(font-size , 2 );
opacity: .5;
}
p{
@include rem-fallback(font-size ,1.05 );
font-weight: 300;
line-height: 1.7em;
}
}
&__results {
display: flex;
// text-align: center;
flex-direction: column;
justify-content: space-between;
align-items: center;
@include rem-fallback(padding, 1.2, 2, 2);
background-color: rgba($white, .7);
border-top-right-radius: $global-radius;
border-bottom-right-radius: $global-radius;
}
&__title {
@extend %h3;
color: $primary-color;
text-align: center;
}
&__results-title {
@include rem-fallback(font-size, 1.5);
font-weight: 600;
color: $success-color;
text-transform: uppercase;
text-align: center;
}
&__graph {
width: 100%;
@include rem-fallback(padding, 1, 0);
}
&__graph-bars {
display: flex;
padding: 0;
height: 120px;
}
&__graph-bar {
@include rem-fallback(padding, .3rem, .8rem);
color: white;
@include rem-fallback(font-size, .9);
font-style: italic;
&:first-child {
background-color: $primary-color
}
&:last-child {
background-color: $tertiary-color;
}
}
&__graph-labels {
@extend %row-flex;
justify-content: space-between;
@media #{ $small-only } {
span {
display: table-cell;
}
span:last-child {
text-align: right;
}
}
}
&__graph-legend {
text-align: center;
display: flex;
align-items: center;
justify-content: center;
@include rem-fallback(margin-bottom, 1);
span {
margin-right: 16px;
color: $primary-color;
@include rem-fallback(font-size, .9);
&:before {
content: '';
@include rem-fallback(width, .9);
@include rem-fallback(height, .9);
display: inline-block;
margin-right: 5px;
}
&:first-child:before {
background-color: $primary-color;
}
&:last-child:before {
background-color: $tertiary-color;
}
}
}
&__ctas {
display: flex;
justify-content: space-around;
width: 100%;
.button {
@include rem-fallback(padding-left, 3);
@include rem-fallback(padding-right, 3);
@media #{ $medium-only } {
@include rem-fallback(padding-left, 1);
@include rem-fallback(padding-right, 1);
}
@media #{ $small-only } {
@include rem-fallback(padding-left, 1);
@include rem-fallback(padding-right, 1);
}
}
}
&__regulatoryText {
@include rem-fallback(font-size, .9);
}
&__warningText {
@include rem-fallback(font-size, .75);
margin-bottom: 0;
color: $primary-color;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment