From 93246db6567d77eba9dfffcf934ba87feaf22105 Mon Sep 17 00:00:00 2001 From: AlasdairSwan Date: Tue, 21 Oct 2014 09:11:59 -0400 Subject: [PATCH] ECOM-408 Added grid-settings to override the default global box-sizing style --- lms/static/sass/application-extend1.scss.mako | 1 + lms/static/sass/application-extend2.scss.mako | 1 + lms/static/sass/application.scss.mako | 1 + lms/static/sass/base/_grid-settings.scss | 2 + lms/static/sass/views/_login-register.scss | 156 +++++++++++++++++- 5 files changed, 158 insertions(+), 3 deletions(-) create mode 100644 lms/static/sass/base/_grid-settings.scss diff --git a/lms/static/sass/application-extend1.scss.mako b/lms/static/sass/application-extend1.scss.mako index 8aa2db8e47..91e56c904e 100644 --- a/lms/static/sass/application-extend1.scss.mako +++ b/lms/static/sass/application-extend1.scss.mako @@ -5,6 +5,7 @@ // libs and resets *do not edit* @import 'bourbon/bourbon'; // lib - bourbon +@import 'base/grid-settings'; @import "neat/neat"; // lib - Neat @import 'vendor/bi-app/bi-app-ltr'; // set the layout for left to right languages diff --git a/lms/static/sass/application-extend2.scss.mako b/lms/static/sass/application-extend2.scss.mako index 57aee6c7a5..2acf42d930 100644 --- a/lms/static/sass/application-extend2.scss.mako +++ b/lms/static/sass/application-extend2.scss.mako @@ -5,6 +5,7 @@ // libs and resets *do not edit* @import 'bourbon/bourbon'; // lib - bourbon +@import 'base/grid-settings'; @import "neat/neat"; // lib - Neat @import 'vendor/bi-app/bi-app-ltr'; // set the layout for left to right languages diff --git a/lms/static/sass/application.scss.mako b/lms/static/sass/application.scss.mako index 69138290e0..23adcf4cff 100644 --- a/lms/static/sass/application.scss.mako +++ b/lms/static/sass/application.scss.mako @@ -5,6 +5,7 @@ // libs and resets *do not edit* @import 'bourbon/bourbon'; // lib - bourbon +@import 'base/grid-settings'; @import "neat/neat"; // lib - Neat @import 'vendor/bi-app/bi-app-ltr'; // set the layout for left to right languages diff --git a/lms/static/sass/base/_grid-settings.scss b/lms/static/sass/base/_grid-settings.scss new file mode 100644 index 0000000000..54bb349d8c --- /dev/null +++ b/lms/static/sass/base/_grid-settings.scss @@ -0,0 +1,2 @@ +/* Override the default global box-sizing */ +$border-box-sizing: false; \ No newline at end of file diff --git a/lms/static/sass/views/_login-register.scss b/lms/static/sass/views/_login-register.scss index 6065ad8e37..d077947115 100644 --- a/lms/static/sass/views/_login-register.scss +++ b/lms/static/sass/views/_login-register.scss @@ -1,10 +1,16 @@ // lms - views - login/register view // ==================== -.login-register{ +.login-register { + @include box-sizing(border-box); @include span-columns(6); @include shift(3); + /* Temp. fix until applied globally */ + & > { + @include box-sizing(border-box); + } + input:-webkit-autofill { -webkit-box-shadow:0 0 0 50px white inset; -webkit-text-fill-color: #333; @@ -17,15 +23,159 @@ .form-field { width: 100%; + margin: 0 0 $baseline 0; + + /** FROM _accounts.scss - start **/ + label, input, textarea { + border-radius: 0; + display: block; + height: auto; + font-family: $sans-serif; + font-style: normal; + font-weight: 500; + color: $base-font-color; + } + + label { + @include transition(color 0.15s ease-in-out 0s); + margin: 0 0 ($baseline/4) 0; + color: tint($black, 20%); + } + + input, + textarea { + width: 100%; + margin: 0; + padding: ($baseline/2) ($baseline*.75); + + &.long { + width: 100%; + } + + &.short { + width: 25%; + } + } + + textarea.long { + height: ($baseline*5); + } + + select { + width: 100%; + } + /** FROM _accounts.scss - end **/ + } + + .input-block { + width: 100%; } - .input-block, .desc { display: block; + /*@extend %body-text-emphasized;*/ + margin-bottom: $baseline; } .input-inline { display: inline; } -} \ No newline at end of file + + +} + + /*// individual fields + .field { + + + + &:last-child { + margin-bottom: 0; + } + + // types - password + + // types - select + + + // types - checkboxes/radio buttons + &.checkbox { + + input[type="checkbox"] { + display: inline-block; + width: auto; + @include margin-right($baseline/4); + } + + label { + display: inline-block; + } + } + + // states - all + &.disabled, + &.submitted { + color: rgba(0,0,0,.25); + + label { + cursor: text; + + &:after { + margin-left: ($baseline/4); + } + } + + textarea, input { + background: $container-bg; + color: rgba(0,0,0,.25); + } + } + + // states - focused + &.is-focused { + + label { + color: saturate($link-color-d1,15%); + } + + .tip { + color: saturate($link-color-d1,15%); + } + } + + // states - disabled + &.disabled { + label:after { + color: rgba(0,0,0,.35); + content: "(Disabled Currently)"; + } + } + + &.error { + + label { + color: $red; + } + + input, textarea { + border-color: tint($red,50%); + } + } + + &.required { + + label { + font-weight: 600; + + a { + font-weight: 600 !important; + } + } + + label:after { + margin-left: ($baseline/4); + content: "*"; + } + } + }*/