Skip to content
This repository has been archived by the owner on Apr 3, 2019. It is now read-only.

Commit

Permalink
fix(style): remove end padding from text inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
johngruen committed Nov 14, 2014
1 parent 6b2341e commit 07dacd9
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 36 deletions.
52 changes: 25 additions & 27 deletions app/styles/_general.scss
Expand Up @@ -119,7 +119,7 @@ header {
h1,
h2,
h3 {
@include header-font();
@include headerFont();
line-height: 1em;
margin: 0;
}
Expand All @@ -143,7 +143,6 @@ header {
}
}


#legal-header {
h2 {
margin: 0 0 30px 0;
Expand All @@ -156,8 +155,6 @@ header {
}
}



#legal-footer {
bottom: 0;
margin: 10px 0;
Expand Down Expand Up @@ -321,6 +318,24 @@ html[dir='rtl'] .tooltip-below::before,
top: -7px;
}

html[dir='ltr'] {
input[type='email'],
input[type='text'],
input[type='password'] {
@include formElement();
padding: 0 0 0 $input-left-right-padding;
}
}

html[dir='rtl'] {
input[type='email'],
input[type='text'],
input[type='password'] {
@include formElement();
padding: 0 $input-left-right-padding 0 0;
}
}

.input-row {
margin-bottom: 15px;
position: relative;
Expand All @@ -340,26 +355,13 @@ html[dir='rtl'] .tooltip-below::before,
@include font();
}

input[type='text'],
input[type='email'],
input[type='password'],
input[type='text'] {
}

select {
// kills inset shadow on iOS browsers
-webkit-appearance: none;
background-color: $mobile-html-background-color;
border: 1px solid $input-row-border-color;
border-radius: $big-border-radius;
box-shadow: inset 0 1px 1px $input-row-box-shadow-color;
color: $input-text-color;
font-size: $medium-font;
height: 45px;
outline: none;
@include formElement();
padding: 0 $input-left-right-padding;
position: relative;
transition-duration: $short-transition;
transition-property: border-color;
width: 100%;
z-index: 2;
}

input::-webkit-input-placeholder,
Expand Down Expand Up @@ -624,7 +626,6 @@ button::-moz-focus-inner {
width: 45%;
}


.description {
font-size: $medium-font;
}
Expand Down Expand Up @@ -666,9 +667,6 @@ ul.links {
}
}




.privacy-links,
.privacy-links a {
color: $input-placeholder-color;
Expand Down Expand Up @@ -698,8 +696,8 @@ ul.links {
* The password class is used instead of type because the field's type can
* change from password to text.
*/
input[type='password'],
input[type='text'] {
input[type='password'].password,
input[type='text'].password {
padding-right: 75px;
}

Expand Down
18 changes: 10 additions & 8 deletions app/styles/_media_queries.scss
Expand Up @@ -49,14 +49,16 @@ only screen and (orientation:landscape) and (min-width:481px) and (max-height:48
margin: 5px 0;
text-align: center;
}

.input-row input[type='text'],
.input-row input[type='email'],
.input-row input[type='password'],
.input-row select {
border-radius: $small-border-radius;
font-size: $base-font + $media-adjustment;
height: 40px;
html[dir='ltr'],
html[dir='rtl'] {
.input-row input[type='text'],
.input-row input[type='email'],
.input-row input[type='password'],
.input-row select {
border-radius: $small-border-radius;
font-size: $base-font + $media-adjustment;
height: 40px;
}
}

.select-row {
Expand Down
20 changes: 19 additions & 1 deletion app/styles/_variables.scss
Expand Up @@ -51,6 +51,24 @@ $avatar-size: 240px;
font-family: $default-font;
}

@mixin header-font() {
@mixin headerFont() {
font-family: $header-font;
}

@mixin formElement() {
// kills inset shadow on iOS browsers
-webkit-appearance: none;
background-color: $mobile-html-background-color;
border: 1px solid $input-row-border-color;
border-radius: $big-border-radius;
box-shadow: inset 0 1px 1px $input-row-box-shadow-color;
color: $input-text-color;
font-size: $medium-font;
height: 45px;
outline: none;
position: relative;
transition-duration: $short-transition;
transition-property: border-color;
width: 100%;
z-index: 2;
}

0 comments on commit 07dacd9

Please sign in to comment.