File tree Expand file tree Collapse file tree 5 files changed +62
-41
lines changed
Expand file tree Collapse file tree 5 files changed +62
-41
lines changed Original file line number Diff line number Diff line change 33// This button is slightly shorter than the usual one,
44// so that when it sits to the right of a text input
55// (eg a search box) it is the same height.
6+ //
7+ // Remove this when https://github.com/nhsuk/nhsuk-frontend/pull/1643 has
8+ // been merged and released.
69.app-button--small {
710 @include nhsuk-font-size (16 );
8- padding : nhsuk-spacing ( 2 ) 12px ;
11+ padding : 5 px 12px ;
912}
1013
1114.app-button--min-width {
Original file line number Diff line number Diff line change 1+ // Inline form box-flex-group:
2+ // Used to group inputs with buttons.
3+ //
4+ // Remove this when https://github.com/nhsuk/nhsuk-frontend/pull/1643 has
5+ // been merged and released.
6+ .app-form-group--inline {
7+ display : block ;
8+
9+ .nhsuk-form-group {
10+ // Set max-width to override potential width override class on the input
11+ max-width : 100% ;
12+ margin-bottom : nhsuk-spacing (2 );
13+ }
14+
15+ @include nhsuk-media-query ($until : tablet) {
16+ // Unlike GOV.UK Frontend, always stack on small screens
17+ // stylelint-disable-next-line declaration-no-important
18+ display : block !important ;
19+ }
20+
21+ @include nhsuk-media-query ($from : tablet) {
22+ display : flex ;
23+ gap : nhsuk-spacing (2 );
24+ align-items : flex-end ;
25+
26+ .nhsuk-form-group {
27+ flex-grow : 1 ;
28+ margin-bottom : 0 ; // Remove margin when nested groups are inline
29+ }
30+
31+ .nhsuk-button ,
32+ .nhsuk-button-group {
33+ flex-grow : 0 ;
34+ }
35+
36+ // Remove inline button margin but reserve space for button shadow,
37+ // making sure 44px box maintains alignment with other form controls
38+ // https://nhsuk.github.io/nhsuk-frontend/examples/form-alignment/
39+ .nhsuk-button {
40+ margin-bottom : $nhsuk-button-shadow-size + $nhsuk-border-width-form-element ;
41+ }
42+ }
43+ }
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1818@import ' components/table' ;
1919@import ' components/button' ;
2020@import ' components/filters' ;
21- @import ' components/search ' ;
21+ @import ' components/form-group ' ;
2222@import ' components/section' ;
2323@import ' components/tag' ;
2424@import ' components/numbered-heading' ;
Original file line number Diff line number Diff line change @@ -20,27 +20,22 @@ <h1 class="nhsuk-heading-xl">Records</h1>
2020
2121 < form action ="/records " method ="get " novalidate >
2222
23- < div class ="app-search ">
24-
25- < div class ="app-search--input ">
26- {{ input({
27- type: "search",
28- name: "nameOrNhsNumber",
29- value: data.nameOrNhsNumber,
30- label: {
31- text: "Patient name or NHS number"
32- }
33- }) }}
34- </ div >
35-
36- < div class ="app-search--button ">
37- {{ button({
38- classes: "nhsuk-u-margin-left-4 app-button--small",
39- text: "Search"
40- }) }}
41- </ div >
23+ < div class ="app-form-group--inline nhsuk-u-margin-bottom-4 ">
24+ {{ input({
25+ type: "search",
26+ name: "nameOrNhsNumber",
27+ value: data.nameOrNhsNumber,
28+ label: {
29+ text: "Patient name or NHS number"
30+ }
31+ }) }}
32+ {{ button({
33+ classes: "nhsuk-button--secondary app-button--small",
34+ text: "Search"
35+ }) }}
4236 </ div >
4337
38+
4439 {% set additionalFiltersHtml %}
4540 {% set vaccineItems = [] %}
4641 {% for vaccine in (vaccinesRecorded | sort(false, false)) %}
You can’t perform that action at this time.
0 commit comments