Skip to content

Commit

Permalink
Clean up CSS and add unique classes for buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewetchen committed Apr 29, 2022
1 parent 6ed7dd9 commit da9c9df
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
12 changes: 3 additions & 9 deletions assets/section-rich-text.css
Original file line number Diff line number Diff line change
Expand Up @@ -58,25 +58,19 @@
margin-top: 3rem;
}

.rich-text__blocks .banner__buttons {
.rich-text__buttons {
display: inline-flex;
justify-content: center;
flex-wrap: wrap;
gap: 1rem;
max-width: 45rem;
word-break: break-word;
width: 100%;
}

.rich-text__blocks.left .banner__buttons {
.rich-text__blocks.left .rich-text__buttons {
justify-content: flex-start;
}

.rich-text__blocks.right .banner__buttons {
.rich-text__blocks.right .rich-text__buttons {
justify-content: flex-end;
}

.rich-text__blocks .banner__buttons--multiple > * {
flex-grow: 1;
min-width: 22rem;
}
2 changes: 1 addition & 1 deletion sections/rich-text.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
{{ block.settings.text }}
</div>
{%- when 'buttons' -%}
<div class="banner__buttons{% if block.settings.button_label_1 != blank and block.settings.button_label_2 != blank %} banner__buttons--multiple{% endif %}" {{ block.shopify_attributes }}>
<div class="rich-text__buttons{% if block.settings.button_label_1 != blank and block.settings.button_label_2 != blank %} rich-text__buttons--multiple{% endif %}" {{ block.shopify_attributes }}>
{%- if block.settings.button_label_1 != blank -%}
<a{% if block.settings.button_link_1 == blank %} role="link" aria-disabled="true"{% else %} href="{{ block.settings.button_link_1 }}"{% endif %} class="button{% if block.settings.button_style_secondary_1 %} button--secondary{% else %} button--primary{% endif %}">{{ block.settings.button_label_1 | escape }}</a>
{%- endif -%}
Expand Down

0 comments on commit da9c9df

Please sign in to comment.