-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Standardise vertical spacing for question meta stuff
Our questions can be as simple as: - question - input Or they can be as complicated as: - question - validation error message - 'optional' tag - question advice - hint - input - hint-underneath Or any combination of these things. Over time, we've accumulated different paddings and margins for each new element (and some elements gain/lose their spacing depending on the element that precedes them). So it's gradually become a bit of a mess, if we're honest. When bringing in the new buttons, @ralph-hawkins pointed out our haphazard vertical spacing, and suggested we come up with a uniform value and then implement it partout. We decided to give the same spacing separatingthe text of vertically-aligned radios and checkboxes to all of our question meta-fields, except on mobile, where the text gets smaller and the large padding becomes too enormous. I've created a SASS partial based on the spacing used for the new selection buttons, and @Extended it in all of our question meta values, killing almost all custom spacing along the way. This makes for a pretty big change to all of our form elements, but the benefits are that we now have a uniform approach that makes our existing questions look cleaner and will allow us too easily add more fields.
- Loading branch information
Showing
13 changed files
with
84 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,26 @@ | ||
@import "_colours.scss"; | ||
@import "_typography.scss"; | ||
@import "colours"; | ||
@import "typography"; | ||
@import "shared_scss/_dmspeak.scss"; | ||
@import "questions"; | ||
|
||
%hint, | ||
.hint { | ||
@extend %markdown-description; | ||
display: block; | ||
margin: 0 0 5px 0; | ||
color: $secondary-text-colour; | ||
clear: both; | ||
|
||
p:last-child { | ||
padding-bottom: 0; | ||
} | ||
} | ||
|
||
.hint-underneath { | ||
@extend %hint; | ||
padding-top: 10px; | ||
|
||
padding-top: 18px; | ||
|
||
@include media(tablet) { | ||
padding-top: 17px; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters