Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Rich text] Change rich text section heading type #2326

Merged
merged 1 commit into from
Feb 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 68 additions & 0 deletions assets/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -3006,3 +3006,71 @@ details-disclosure > details {
outline: transparent solid 1px;
}
}

.rte:after {
clear: both;
content: '';
display: block;
}

.rte > p:first-child {
margin-top: 0;
}

.rte > p:last-child {
margin-bottom: 0;
}

.rte table {
table-layout: fixed;
}

@media screen and (min-width: 750px) {
.rte table td {
padding-left: 1.2rem;
padding-right: 1.2rem;
}
}

.rte img {
height: auto;
max-width: 100%;
border: var(--media-border-width) solid rgba(var(--color-foreground), var(--media-border-opacity));
border-radius: var(--media-radius);
box-shadow: var(--media-shadow-horizontal-offset) var(--media-shadow-vertical-offset) var(--media-shadow-blur-radius) rgba(var(--color-shadow), var(--media-shadow-opacity));
margin-bottom: var(--media-shadow-vertical-offset);
}

.rte ul,
.rte ol {
list-style-position: inside;
padding-left: 2rem;
}

.rte li {
list-style: inherit;
}

.rte li:last-child {
margin-bottom: 0;
}

.rte a {
color: rgba(var(--color-link), var(--alpha-link));
text-underline-offset: 0.3rem;
text-decoration-thickness: 0.1rem;
transition: text-decoration-thickness var(--duration-short) ease;
}

.rte a:hover {
color: rgb(var(--color-link));
text-decoration-thickness: 0.2rem;
}

.rte blockquote {
display: inline-flex;
}

.rte blockquote > * {
margin: -0.5rem 0 -0.5rem 0;
}
67 changes: 0 additions & 67 deletions assets/component-rte.css

This file was deleted.

1 change: 0 additions & 1 deletion sections/collapsible-content.liquid
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{{ 'component-accordion.css' | asset_url | stylesheet_tag }}
{{ 'collapsible-content.css' | asset_url | stylesheet_tag }}
{{ 'component-rte.css' | asset_url | stylesheet_tag }}

{%- style -%}
.section-{{ section.id }}-padding {
Expand Down
1 change: 0 additions & 1 deletion sections/email-signup-banner.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
{{ 'component-newsletter.css' | asset_url | stylesheet_tag }}
{{ 'newsletter-section.css' | asset_url | stylesheet_tag }}
{{ 'section-email-signup-banner.css' | asset_url | stylesheet_tag }}
{{ 'component-rte.css' | asset_url | stylesheet_tag }}

{%- style -%}
#Banner-{{ section.id }}::after {
Expand Down
2 changes: 0 additions & 2 deletions sections/featured-collection.liquid
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{{ 'component-card.css' | asset_url | stylesheet_tag }}
{{ 'component-price.css' | asset_url | stylesheet_tag }}
{{ 'component-rte.css' | asset_url | stylesheet_tag }}

<link rel="stylesheet" href="{{ 'component-slider.css' | asset_url }}" media="print" onload="this.media='all'">
<link rel="stylesheet" href="{{ 'template-collection.css' | asset_url }}" media="print" onload="this.media='all'">
Expand Down Expand Up @@ -48,7 +47,6 @@

<div class="color-{{ section.settings.color_scheme }} isolate gradient">
<div class="collection section-{{ section.id }}-padding{% if section.settings.full_width %} collection--full-width{% endif %}">

<div class="collection__title title-wrapper title-wrapper--no-top-margin page-width{% if show_mobile_slider %} title-wrapper--self-padded-tablet-down{% endif %}{% if show_desktop_slider %} collection__title--desktop-slider{% endif %}">
{%- if section.settings.title != blank -%}
<h2 class="title inline-richtext {{ section.settings.heading_size }}">{{ section.settings.title }}</h2>
Expand Down
15 changes: 12 additions & 3 deletions sections/featured-product.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
{{ 'section-featured-product.css' | asset_url | stylesheet_tag }}
{{ 'component-accordion.css' | asset_url | stylesheet_tag }}
{{ 'component-price.css' | asset_url | stylesheet_tag }}
{{ 'component-rte.css' | asset_url | stylesheet_tag }}
{{ 'component-loading-overlay.css' | asset_url | stylesheet_tag }}

{%- style -%}
Expand Down Expand Up @@ -284,9 +283,19 @@
{% assign share_url = product.selected_variant.url | default: product.url | prepend: request.origin %}
{% render 'share-button', block: block, share_link: share_url %}
{%- when 'variant_picker' -%}
{% render 'product-variant-picker', product: product, block: block, product_form_id: product_form_id, update_url: false %}
{% render 'product-variant-picker',
product: product,
block: block,
product_form_id: product_form_id,
update_url: false
%}
{%- when 'buy_buttons' -%}
{%- render 'buy-buttons', block: block, product: product, product_form_id: product_form_id, section_id: section.id -%}
{%- render 'buy-buttons',
block: block,
product: product,
product_form_id: product_form_id,
section_id: section.id
-%}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are a bunch of little reformatting additions like these that make it harder to review. None of it appears to actually change anything though.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah 😞 I will add a note in the PR description to mention this. We're trying to default to use our own prettier extension and I guess some stuff wasn't formatted in some files.

{%- when 'custom_liquid' -%}
{{ block.settings.custom_liquid }}
{%- when 'rating' -%}
Expand Down
Loading