File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4949 }
5050 }
5151
52+ & --offset {
53+ background-color : rgba ($color_nhsuk-grey-5 , 0.5 );
54+ }
55+
5256 & --data {
5357 display : flex ;
5458
132136 color : $nhsuk-link-active-color ;
133137 }
134138}
139+
140+ .app-card--compact {
141+ @include nhsuk-responsive-margin (3 , " bottom" );
142+
143+ .app-button-group {
144+ gap : nhsuk-spacing (2 );
145+ margin-bottom : nhsuk-spacing (1 );
146+ margin-top : nhsuk-spacing (-4 );
147+ }
148+
149+ .nhsuk-card__heading {
150+ @include nhsuk-responsive-margin (1 , " bottom" );
151+ }
152+
153+ .nhsuk-card__content {
154+ @include nhsuk-responsive-padding (4 );
155+ @include nhsuk-responsive-padding (3 , " bottom" );
156+ }
157+ }
Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ def initialize(
3434 secondary : false ,
3535 data : false ,
3636 patient : false ,
37+ compact : false ,
3738 filters : false ,
3839 section : false
3940 )
@@ -44,10 +45,11 @@ def initialize(
4445 @secondary = secondary
4546 @data = data
4647 @patient = patient
48+ @compact = compact
4749 @filters = filters
4850 @section = section
4951
50- @feature = ( colour . present? && !data ) || filters
52+ @feature = ( colour . present? && !data && ! compact ) || filters
5153 end
5254
5355 private
@@ -64,6 +66,7 @@ def card_classes
6466 ( "nhsuk-card--secondary" if @secondary ) ,
6567 ( "app-card--data" if @data ) ,
6668 ( "app-card--patient" if @patient ) ,
69+ ( "app-card--compact" if @compact ) ,
6770 ( "app-filters" if @filters )
6871 ] . compact . join ( " " )
6972 end
@@ -80,7 +83,7 @@ def content_classes
8083 def heading_size
8184 if @data
8285 "xs"
83- elsif @feature || @secondary || @patient
86+ elsif @feature || @secondary || @patient || @compact
8487 "s"
8588 else
8689 "m"
You can’t perform that action at this time.
0 commit comments