Skip to content

Commit

Permalink
Merge pull request #491 from alphagov/remove-em-from-inputs
Browse files Browse the repository at this point in the history
Define size of inputs etc in pixels rather than em
  • Loading branch information
hannalaakso authored Feb 8, 2018
2 parents 051c2dd + 5f4d20c commit baf0bd9
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 20 deletions.
16 changes: 8 additions & 8 deletions src/components/checkboxes/_checkboxes.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
position: relative;

margin-bottom: $govuk-spacing-scale-2;
padding: 0 0 0 em(40px, 19px);
padding: 0 0 0 40px;

clear: left;
}
Expand Down Expand Up @@ -39,7 +39,7 @@

.govuk-c-checkboxes__label {
display: block;
padding: em(8px, 19px) em($govuk-spacing-scale-3, 19px) em($govuk-spacing-scale-1, 19px);
padding: 8px $govuk-spacing-scale-3 $govuk-spacing-scale-1;
cursor: pointer;
// remove 300ms pause on mobile
-ms-touch-action: manipulation;
Expand All @@ -52,8 +52,8 @@
position: absolute;
top: 0;
left: 0;
width: em(40px, 19px);
height: em(40px, 19px);
width: 40px;
height: 40px;
border: $govuk-border-width-form-element solid $govuk-text-colour;
background: transparent;

Expand All @@ -64,10 +64,10 @@
content: "";

position: absolute;
top: em(11px, 19px);
left: em(9px, 19px);
width: em(18px, 19px);
height: em(7px, 19px);
top: 11px;
left: 9px;
width: 18px;
height: 7px;

transform: rotate(-45deg);
border: solid;
Expand Down
2 changes: 1 addition & 1 deletion src/components/details/_details.scss
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@

.govuk-c-details__text p {
margin-top: 0;
margin-bottom: em($govuk-spacing-scale-4, 19px);
margin-bottom: $govuk-spacing-scale-4;
}

.govuk-c-details__text p:last-child {
Expand Down
2 changes: 1 addition & 1 deletion src/components/input/_input.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

box-sizing: border-box;
width: 100%;
height: em(40px, 19px);
height: 40px;
margin-top: 0;
@include govuk-responsive-margin($govuk-spacing-responsive-6, "bottom");

Expand Down
18 changes: 9 additions & 9 deletions src/components/radios/_radios.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
position: relative;

margin-bottom: $govuk-spacing-scale-2;
padding: 0 0 0 em($govuk-spacing-scale-7, 19px);
padding: 0 0 0 $govuk-spacing-scale-7;

clear: left;
}
Expand All @@ -32,8 +32,8 @@
top: 0;
left: 0;

width: em($govuk-spacing-scale-7, 19px);
height: em($govuk-spacing-scale-7, 19px);
width: $govuk-spacing-scale-7;
height: $govuk-spacing-scale-7;

cursor: pointer;

Expand All @@ -46,7 +46,7 @@

.govuk-c-radios__label {
display: block;
padding: em(8px, 19px) em($govuk-spacing-scale-3, 19px) em($govuk-spacing-scale-1, 19px);
padding: 8px $govuk-spacing-scale-3 $govuk-spacing-scale-1;
cursor: pointer;
// remove 300ms pause on mobile
-ms-touch-action: manipulation;
Expand All @@ -60,8 +60,8 @@
top: 0;
left: 0;

width: em($govuk-spacing-scale-7, 19px);
height: em($govuk-spacing-scale-7, 19px);
width: $govuk-spacing-scale-7;
height: $govuk-spacing-scale-7;

border: $govuk-border-width-form-element solid;
border-radius: 50%;
Expand All @@ -72,13 +72,13 @@
content: "";

position: absolute;
top: em($govuk-spacing-scale-2, 19px);
left: em($govuk-spacing-scale-2, 19px);
top: $govuk-spacing-scale-2;
left: $govuk-spacing-scale-2;

width: 0;
height: 0;

border: em($govuk-spacing-scale-2, 19px) solid;
border: $govuk-spacing-scale-2 solid;
border-radius: 50%;
opacity: 0;
background: currentColor;
Expand Down
2 changes: 1 addition & 1 deletion src/components/select/_select.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

box-sizing: border-box; // should this be global?
width: 100%;
height: em(40px, 19px);
height: 40px;
@include govuk-responsive-margin($govuk-spacing-responsive-6, "bottom");

padding: $govuk-spacing-scale-1; // was 5px 4px 4px - size of it should be adjusted to match other form elements
Expand Down

0 comments on commit baf0bd9

Please sign in to comment.