Skip to content

Commit

Permalink
Merge pull request #163 from SLAC/SLACDP22-433-section-padding
Browse files Browse the repository at this point in the history
[SLACDP22-433] Default to adding vertical padding if paragraph is not…
  • Loading branch information
kmonahan committed Mar 30, 2023
2 parents 5eefd9c + af25484 commit 96665ec
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 11 deletions.
22 changes: 20 additions & 2 deletions source/02-layouts/section/_section.scss
Original file line number Diff line number Diff line change
Expand Up @@ -145,16 +145,34 @@
.l-section--yellow,
.l-section--purple,
.l-section--blue,
.l-section--gray-white,
.l-section--white-gray,
.l-section--gray
)
) {
& + & {
&:first-of-type {
padding-top: 0;
}

+ :is(
.l-section--white,
.l-section:not(
.l-section--purple-black,
.l-section--blue-green,
.l-section--yellow,
.l-section--purple,
.l-section--blue,
.l-section--gray-white,
.l-section--gray
)
) {
padding-top: 0;
}

@include breakpoint-min(gesso-breakpoint(desktop)) {
&:first-of-type {
padding-top: 0;
}

& + & {
padding-top: 0;
}
Expand Down
1 change: 0 additions & 1 deletion templates/paragraph/paragraph--accordion.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
{% if is_nested %}{{ accordion }}{% else %}
{% include '@layouts/section/section.twig' with {
'section_content': accordion,
'modifier_classes': 'l-section--no-padding',
'has_constrain': true
} %}
{% endif %}
1 change: 0 additions & 1 deletion templates/paragraph/paragraph--content-embed.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
{% if is_nested %}{{ paragraph_content }}{% else %}
{% include '@layouts/section/section.twig' with {
section_content: paragraph_content,
modifier_classes: 'l-section--no-padding',
has_constrain: true
} %}
{% endif %}
Expand Down
1 change: 0 additions & 1 deletion templates/paragraph/paragraph--embed-full-html-.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
{% if is_nested %}{{ embed }}{% else %}
{% include '@layouts/section/section.twig' with {
section_content: embed,
modifier_classes: 'l-section--no-padding',
has_constrain: true
} %}
{% endif %}
1 change: 0 additions & 1 deletion templates/paragraph/paragraph--fifty-fifty.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
{% if is_nested %}{{ paragraph_content }}{% else %}
{% include '@layouts/section/section.twig' with {
'section_content': paragraph_content,
'modifier_classes': 'l-section',
'has_constrain': true
} %}
{% endif %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
{% if is_nested %}{{ media_grid }}{% else %}
{% include '@layouts/section/section.twig' with {
section_content: media_grid,
modifier_classes: 'l-section l-section--padding-bottom',
has_constrain: true
} %}
{% endif %}
1 change: 0 additions & 1 deletion templates/paragraph/paragraph--overlap-image.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@
{% else %}
{% include '@layouts/section/section.twig' with {
section_content: overlap_image,
modifier_classes: 'l-section--no-padding',
has_constrain: true
} %}
{% endif %}
Expand Down
1 change: 0 additions & 1 deletion templates/paragraph/paragraph--quote.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
{% if is_nested %}{{ quote }}{% else %}
{% include '@layouts/section/section.twig' with {
section_content: quote,
modifier_classes: 'l-section--no-padding',
has_constrain: true
} %}
{% endif %}
1 change: 0 additions & 1 deletion templates/paragraph/paragraph--tabs.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
{% if is_nested %}{{ paragraph_content }}{% else %}
{% include '@layouts/section/section.twig' with {
section_content: paragraph_content,
modifier_classes: 'l-section--no-padding',
has_constrain: true
} %}
{% endif %}
Expand Down
1 change: 0 additions & 1 deletion templates/paragraph/paragraph--wysiwyg.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,5 @@
{% include '@layouts/section/section.twig' with {
section_content: wysiwyg,
has_constrain: true,
modifier_classes: 'l-section--no-padding'
} %}
{% endif %}

0 comments on commit 96665ec

Please sign in to comment.