django-allauth-ens/allauth_ens/scss/_base.scss

578 lines
10 KiB
SCSS
Raw Normal View History

2017-08-03 12:40:52 +02:00
body {
font-family: Roboto, Verdana;
font-family: $font-family-base;
line-height: 1.4;
2017-09-16 02:32:42 +02:00
background: $body-bg;
color: $body-color;
2017-08-03 12:40:52 +02:00
@media (min-width: 576px) {
display: flex;
align-items: center;
justify-content: center;
}
}
a {
@include link;
}
b {
font-weight: bold;
}
.hidden {
display: none;
}
2017-08-03 12:40:52 +02:00
/********************
* Layout structure *
********************/
$main-max-width: 500px;
2017-08-03 12:40:52 +02:00
.wrapper {
max-width: $main-max-width;
margin: 0 auto;
background: $white;
box-shadow: 0 0 5px rgba(0,0,0,.1);
2017-08-03 12:40:52 +02:00
}
@media (min-height: 400px) and (min-width: 576px) {
html, body {
height: 100%;
}
}
@media (min-height: 500px) and (min-width: 576px) {
.wrapper {
position: relative;
top: -5%;
}
}
.content-wrapper {
display: flex;
2018-05-14 15:34:22 +02:00
flex-flow: row wrap;
2017-08-03 12:40:52 +02:00
align-items: center;
/* Blocks */
& > section {
flex: 1 100%;
padding: 15px;
}
@media (min-width: 500px) {
2018-05-14 15:34:22 +02:00
& {
flex-flow: row nowrap;
}
2017-08-03 12:40:52 +02:00
& > section {
flex: 1 1 auto;
min-width: 250px;
2017-08-03 12:40:52 +02:00
}
}
2018-05-14 15:34:22 +02:00
@media (min-width: 1200px) {
& > section {
flex: 1 1 auto;
min-width: 350px;
2017-08-03 12:40:52 +02:00
}
}
}
#providers {
width: 150px;
min-width: unset;
flex: 1 0 auto;
2017-08-03 12:40:52 +02:00
}
/**********
* Header *
**********/
$header-bg: darken($red, 10%);
$header-history-icon-size: 20px;
header {
@include clearfix;
display: flex;
align-items: stretch;
2017-09-16 02:32:42 +02:00
min-height: 55px;
2017-08-03 12:40:52 +02:00
background: $header-bg;
color: $white;
font-size: 20px;
font-weight: bold;
2017-09-16 02:32:42 +02:00
a {
color: $white !important;
2017-08-03 12:40:52 +02:00
@include hover-focus {
background: lighten($header-bg, 5%);
2017-09-16 02:32:42 +02:00
text-decoration: none;
}
}
.right {
display: flex;
flex-flow: column;
align-items: stretch;
justify-content: space-around;
flex: 0 0 auto;
border-left: 1px solid lighten($header-bg, 15%);
2017-09-16 02:32:42 +02:00
font-size: 14px;
text-align: center;
& > * {
flex: 0 0 auto;
2017-08-03 12:40:52 +02:00
& > * {
display: block;
padding: 5px 10px;
}
2017-10-18 16:45:15 +02:00
}
#connect-status {
2017-09-16 02:32:42 +02:00
font-weight: normal;
font-size: 12px;
2017-09-16 02:32:42 +02:00
.fa {
margin-right: 5px;
2017-09-16 02:32:42 +02:00
}
2017-08-03 12:40:52 +02:00
}
}
h1 {
flex: 1 1 auto;
2017-09-16 02:32:42 +02:00
padding: 15px 25px;
2017-08-03 12:40:52 +02:00
}
}
/************
* Messages *
************/
.messages-container {
padding: 0 15px;
&::after {
display: block;
content: "";
background-color: $gray-lighter;
height: 2px;
}
}
.messages-list {
2017-09-16 02:32:42 +02:00
padding: 10px 0;
2017-08-03 12:40:52 +02:00
}
2017-09-16 02:32:42 +02:00
@mixin message-lvl($cls-level, $bg-color-base) {
&.#{$cls-level} {
color: darken($bg-color-base, 15%);
2017-08-03 12:40:52 +02:00
}
2017-09-16 02:32:42 +02:00
}
.message {
2017-08-03 12:40:52 +02:00
2017-09-16 02:32:42 +02:00
padding: 5px;
font-size: 14px;
color: $gray-dark;
@include message-lvl('info', $brand-info);
@include message-lvl('success', $brand-success);
@include message-lvl('warning', $brand-warning);
@include message-lvl('error', $brand-danger);
2017-08-03 12:40:52 +02:00
}
/***********
* Content *
***********/
section {
2017-09-16 02:32:42 +02:00
& > * + * {
margin-top: 15px;
2017-08-03 12:40:52 +02:00
}
}
/* Methods list */
.method-list {
display: flex;
flex-flow: row wrap;
& > .method-wrapper {
flex: 1 100%;
padding: 2px 0;
2017-08-03 12:40:52 +02:00
a {
@include btn;
border-radius: 0;
border-left: 5px solid $brand-primary;
background: $gray-lighter;
color: $black;
font-size: 16px;
text-align: left;
@include hover-focus {
background: lighten($brand-primary, 50%);
}
}
2017-08-03 12:40:52 +02:00
}
}
/* Connected accounts list */
.connections-providers-list {
2017-08-03 12:40:52 +02:00
& > * {
2017-08-03 12:40:52 +02:00
& + * {
margin-top: 2px;
2017-09-16 02:32:42 +02:00
}
& > .heading {
@include clearfix;
width: 100%;
padding: 10px;
2017-09-16 02:32:42 +02:00
border-left: 5px solid $brand-primary;
background: $gray-lighter;
2017-09-16 02:32:42 +02:00
.connect {
@include btn;
@include btn-primary;
@include btn-sm;
2017-09-16 02:32:42 +02:00
float: right;
width: auto;
2017-09-16 02:32:42 +02:00
}
}
}
}
2017-09-16 02:32:42 +02:00
.connections-list {
border-left: 5px solid $gray-lightest;
2017-09-16 02:32:42 +02:00
& > * {
padding: 10px;
font-size: 14px;
2017-09-16 02:32:42 +02:00
& + * {
border-top: 1px dotted $gray-lighter;
}
2017-09-16 02:32:42 +02:00
& > .fa {
margin-right: 5px;
}
2017-09-16 02:32:42 +02:00
.delete {
float: right;
margin-top: -2px;
2017-09-16 02:32:42 +02:00
& [type=submit] {
@include btn;
@include btn-danger;
@include btn-sm;
opacity: .8;
2017-09-16 02:32:42 +02:00
}
2017-08-03 12:40:52 +02:00
}
}
2017-08-03 12:40:52 +02:00
form {
display: inline-block;
}
}
2017-09-16 02:32:42 +02:00
/* E-mail adresses list */
.emailaddress-list {
.emailaddress {
border-bottom: 1px dotted $gray;
.summary {
@include clearfix;
height: 45px;
& > * {
float: left;
height: 100%;
padding: 12px;
}
& > .primary, & > .verified-status {
float: right;
width: 45px;
line-height: 100%;
text-align: center;
font-size: 20px;
}
& > .email {
padding: 12px;
font-weight: bold;
}
& > .primary {
color: $brand-primary;
2017-09-16 02:32:42 +02:00
}
& > .verified {
color: $brand-success;
}
& > .unverified {
color: $brand-warning;
}
}
}
}
.actions {
@include clearfix;
margin-bottom: 10px;
& > * {
float: right;
margin-right: 10px;
font-size: 12px;
}
}
2017-08-03 12:40:52 +02:00
/*********
* Forms *
*********/
$input-space-after: 10px;
$input-wrapper-padding: 0;
$input-border-color: rgba(0,0,0,0.12);
$input-border-width: 1px;
$input-border-width-lg: 2px;
$input-padding: 2px;
$input-font-size: 16px;
$input-height: 30px;
$label-small-scale: 0.75;
$input-height-inner: $input-height - 2 * $input-padding;
$label-height: $input-height-inner;
$label-small-top: $label-height * (1 - $label-small-scale);
$label-top: $label-height + $input-wrapper-padding + $input-padding;
.input-wrapper {
@include clearfix;
position: relative;
display: block;
margin: ($label-small-scale * $label-height) 0;
padding: $input-wrapper-padding;
label {
margin-right: 10px;
color: rgba(0,0,0,0.38);
font-size: $input-font-size;
}
& .transform-label label {
2017-08-03 12:40:52 +02:00
@include ellipsis;
padding-left: $input-wrapper-padding;
width: 100%;
max-width: 100%;
height: $label-height;
line-height: $label-height;
2017-09-16 02:32:42 +02:00
position: absolute;
bottom: 100%;
left: 0;
pointer-events: none;
2017-08-03 12:40:52 +02:00
transform: translate3d(0,$label-height + $input-padding,0) scale(1);
transition: transform .4s cubic-bezier(.25,.8,.25,1);
transform-origin: left top;
}
2017-09-16 02:32:42 +02:00
input.field:not([type=checkbox]) {
2017-08-03 12:40:52 +02:00
height: $input-height;
width: 100%;
padding: $input-padding $input-padding ($input-padding - $input-border-width);
background-color: $white;
line-height: $input-height-inner;
border-bottom: $input-border-width solid $input-border-color;
font-size: $input-font-size;
}
2017-09-16 02:32:42 +02:00
input[type="checkbox"] {
vertical-align: sub;
width: 20px;
height: 20px;
}
select {
height: $input-height;
background: $white;
}
2017-08-03 12:40:52 +02:00
@mixin input-special($type, $color: $input-border-color) {
2017-09-16 02:32:42 +02:00
&.input-#{$type} {
color: $color;
}
2017-08-03 12:40:52 +02:00
&.input-#{$type} input.field {
padding-bottom: $input-padding - $input-border-width-lg;
border-width: $input-border-width-lg;
border-color: $color;
}
}
&.input-focused {
label, .messages {
color: inherit;
2017-09-16 02:32:42 +02:00
}
}
2017-09-16 02:32:42 +02:00
&.input-focused, &.input-has-value {
.transform-label label {
transform: translate3d(0,$label-small-top,0) scale($label-small-scale);
2017-09-16 02:32:42 +02:00
}
2017-08-03 12:40:52 +02:00
}
@include input-special('has-value', $brand-success);
@include input-special('error', $brand-danger);
@include input-special('focused', $brand-primary);
2017-08-03 12:40:52 +02:00
.messages-spacer {
2017-08-03 12:40:52 +02:00
float: right;
min-height: $input-space-after;
min-width: 1px;
}
2017-09-16 02:32:42 +02:00
.messages {
color: rgba(0, 0, 0, 0.38);
2017-09-16 02:32:42 +02:00
& > * {
padding-top: 5px;
font-size: 12px;
}
}
&.input-checkbox, &.input-radio {
& > :first-child {
display: block;
}
}
2017-08-03 12:40:52 +02:00
}
.buttons-choices {
display: inline-flex;
& > button {
@include transition;
flex: 0 1 auto;
display: inline-block;
padding: 5px 10px;
background: lighten($brand-primary, 60%);
color: $gray-light;
}
& > button:first-child {
border-top-left-radius: 3px;
border-bottom-left-radius: 3px;
}
& > button:last-child {
border-top-right-radius: 3px;
border-bottom-right-radius: 3px;
}
& > button:focus {
background: lighten($brand-primary, 30%);
color: white;
}
& > button.selected {
background: $brand-primary;
color: white;
}
}
2017-08-03 12:40:52 +02:00
[type=submit]:not(.link) {
@include btn;
@include btn-success;
border-radius: 3px;
2017-08-03 12:40:52 +02:00
}
[type=submit].link {
@include link;
background: transparent;
@include hover-focus {
cursor: pointer;
}
}
2017-09-16 02:32:42 +02:00
.form-inline {
display: flex;
align-items: center;
& > .input-wrapper {
flex: 1 0 auto;
2017-09-16 02:32:42 +02:00
}
[type=submit] {
margin-top: -5px;
margin-left: 8px;
2017-09-16 02:32:42 +02:00
font-size: 14px;
}
}
2017-08-03 12:40:52 +02:00
.btn {
@include btn;
display: block;
}
.btn-primary { @include btn-primary; }
.btn-success { @include btn-success; }