Skip to content

Commit

Permalink
Apply more specificity, conditionally apply styles.
Browse files Browse the repository at this point in the history
  • Loading branch information
kjellr committed Jun 17, 2022
1 parent 212b901 commit 85ea51c
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions sections/main-collection-banner.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,16 @@
padding-bottom: {{ section.settings.padding_bottom | times: 0.75 | round: 0 }}px;
}

{%- if section.settings.padding_top != 0 or section.settings.padding_bottom != 0 -%}
@media screen and (min-width: 750px) {
.section-{{ section.id }}-padding {
padding-top: {{ section.settings.padding_top }}px;
padding-bottom: {{ section.settings.padding_bottom }}px;
.section-{{ section.id }}-padding,
.collection-hero--with-image.section-{{ section.id }}-padding {
{%- if section.settings.padding_top != 0 -%}padding-top: {{ section.settings.padding_top }}px;{%- endif -%}
{%- if section.settings.padding_bottom != 0 -%}padding-bottom: {{ section.settings.padding_bottom }}px;{%- endif -%}
}
}
{%- endif -%}

@media screen and (max-width: 749px) {
.collection-hero--with-image .collection-hero__inner {
padding-bottom: calc({{ settings.media_shadow_vertical_offset | at_least: 0 }}px + 2rem);
Expand Down

0 comments on commit 85ea51c

Please sign in to comment.