-
Notifications
You must be signed in to change notification settings - Fork 236
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change markup and styling for Check your answers page
Switch markup from using a table to using a description list and improve styling to be clearer and responsive. Visual changes: * Don't use the full page width if the items are short * Remove the bold from the change link * Make the key bold * Make key and value wrap on smaller screens The descripion list uses a div around each dt/dd grouping. That is currently invalid but a) in the HTML 5.2 Working Draft [1] b) supported in all the browsers (even IE6) [1] https://www.w3.org/TR/html52/grouping-content.html#the-dl-element
- Loading branch information
1 parent
c80fc49
commit 3703789
Showing
2 changed files
with
182 additions
and
125 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,73 @@ | ||
|
||
.check-your-answers { | ||
|
||
td { | ||
@include core-19; | ||
vertical-align: top; | ||
> * { | ||
position: relative; | ||
border-bottom: 1px solid $border-colour; | ||
|
||
> * { | ||
display: block; | ||
} | ||
} | ||
|
||
.change-answer { | ||
text-align: right; | ||
.question { | ||
font-weight: bold; | ||
padding-right: 0; | ||
margin: em(12, 19) 4em $gutter/6 0; | ||
// top: from Elements' td | ||
// right: due to length of "change" link (adjust if you change the link to be much longer) | ||
// bottom: by eye (~4-5px) | ||
// using margin instead of padding because of easier absolutely positioning of .change | ||
} | ||
|
||
> :first-child .question { | ||
margin-top: 0; | ||
} | ||
|
||
.answer { | ||
padding-bottom: em(9, 19); // from Elements' td | ||
} | ||
|
||
.change { | ||
text-align: right; | ||
position: absolute; | ||
top: 0; | ||
right: 0; | ||
} | ||
|
||
|
||
@include media(desktop) { | ||
|
||
display: table; | ||
|
||
> * { | ||
display: table-row; | ||
border-bottom-width: 0; | ||
|
||
> * { | ||
display: table-cell; | ||
border-bottom: 1px solid $border-colour; | ||
padding: em(12, 19) em(20, 19) em(9, 19) 0; // copied from Elements' td padding | ||
margin: 0; | ||
} | ||
|
||
&:first-child > * { | ||
padding-top: 0; | ||
} | ||
} | ||
|
||
// to make multiple sections' items line up horizontally | ||
&.multiple-sections { | ||
width: 100%; | ||
|
||
// depending on length of keys and values, services might need to override this value | ||
.question { | ||
width: 30%; | ||
} | ||
} | ||
|
||
.change { | ||
position: static; | ||
padding-right: 0; | ||
} | ||
} | ||
} |
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