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

DARK : Fix express checkout block CSS #71

Merged
merged 3 commits into from
Oct 22, 2024
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
17 changes: 0 additions & 17 deletions themes/aura/assets/express-checkout.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@
}

.express-checkout-fields{
border-width:2px;
border-style:solid;
background:#F8F8F8;
box-shadow:1px -1px 23px rgba(0, 0, 0, 0.04);
border-radius:4px;
display:grid;
grid-template-columns:1fr;
Expand All @@ -26,12 +23,8 @@
}
@media (min-width: 768px){
.express-checkout-fields{
border:medium none currentcolor;
border:initial;
background:transparent none repeat 0 0 / auto auto padding-box border-box scroll;
background:initial;
box-shadow:none;
box-shadow:initial;
padding:0;
padding:initial;
}
Expand Down Expand Up @@ -199,13 +192,3 @@
padding-bottom:0;
}
}

.sticky-checkout-placeholder .express-checkout-button:disabled{
opacity:0.5;
cursor:not-allowed;
}

.sticky-btn-placehodler{
opacity:0.5;
cursor:not-allowed;
}
30 changes: 15 additions & 15 deletions themes/aura/snippets/express-checkout.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,16 @@
}
{% endif %}

.custom-checkout-{{ checkout_id }},
.express-checkout-fields {
.custom-checkout-{{ checkout_id }} {
border: 1px solid {{ settings.form_border_colour.hex }};
}

.custom-checkout-{{ checkout_id }} .express-checkout-fields {
grid-gap: {{ settings.inputs_gap }}px;
}

.custom-checkout-{{ checkout_id }} input,
.custom-checkout-{{ checkout_id }} textarea,
.custom-checkout-{{ checkout_id }} input,
.custom-checkout-{{ checkout_id }} textarea,
.custom-checkout-{{ checkout_id }} select {
padding: {{ settings.input_padding }}px;
border-radius: {{ settings.input_border_radius }}px;
Expand Down Expand Up @@ -74,8 +73,9 @@
}
{% endif %}

.express-checkout-placeholder .express-checkout-button {
opacity: 0.5;
.express-checkout-button:disabled {
background: #bdc3c7 !important;
color: #ffffff !important;
cursor: not-allowed;
}
{% endstyle %}
Expand Down Expand Up @@ -107,19 +107,19 @@
{% endfor %}
</select>
{% when 'textarea' %}
<textarea
<textarea
name='{{ field_name }}'
id='{{ field.name }}'
class='w-full'
placeholder='{{ field.placeholder }}'
id='{{ field.name }}'
class='w-full'
placeholder='{{ field.placeholder }}'
required='{{ field.required }}' min></textarea>
{% else %}
<input
<input
name='{{ field_name }}'
type='{{ field.type }}'
id='{{ field.name }}'
class='w-full'
placeholder='{{ field.placeholder }}'
type='{{ field.type }}'
id='{{ field.name }}'
class='w-full'
placeholder='{{ field.placeholder }}'
required='{{ field.required }}'>
{% endcase %}
<div
Expand Down
6 changes: 4 additions & 2 deletions themes/aura/snippets/single-product-placeholder.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,10 @@
{%- when 'express_checkout' -%}
{% render 'express-checkout', checkout: checkout, is_sticky: block.settings.is_sticky, settings: block.settings, is_placeholder: is_placeholder %}
{% if block.settings.is_sticky %}
{% render 'sticky-checkout', settings: block.settings %}
<button class="yc-btn is_sticky {% if is_placeholder %} sticky-btn-placehodler {% endif %} font-bold express-checkout-button">{{ block.settings.express_checkout_cta }}</button>
{% render 'sticky-checkout', settings: block.settings %}
<button class="yc-btn is_sticky font-bold express-checkout-button" {% if is_placeholder %} disabled {% endif %}>
{{ block.settings.express_checkout_cta }}
</button>
{% endif %}
{%- endcase -%}
{%- endfor -%}
Expand Down
17 changes: 0 additions & 17 deletions themes/aura/styles/express-checkout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,15 @@ $sticky-checkout-padding: 20px;
}

.express-checkout-fields {
border-width: 2px;
border-style: solid;
background: #F8F8F8;
box-shadow: 1px -1px 23px rgba(0, 0, 0, 0.04);
border-radius: 4px;
display: grid;
grid-template-columns: 1fr;
grid-gap: 14px;
padding: 10px;

@include breakpoint('md') {
border: unset;
background: unset;
box-shadow: unset;
padding: unset;
}
}
Expand Down Expand Up @@ -213,15 +208,3 @@ $sticky-checkout-padding: 20px;
}
}
}

.sticky-checkout-placeholder {
.express-checkout-button:disabled {
opacity: 0.5;
cursor: not-allowed;
}
}

.sticky-btn-placehodler {
opacity: 0.5;
cursor: not-allowed;
}
18 changes: 0 additions & 18 deletions themes/harmony/assets/express-checkout.css
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
border-width:6px;
border-style:solid;
background:#F8F8F8;
box-shadow:1px -1px 23px rgba(0, 0, 0, 0.04);
border-radius:4px;
padding:20px;
grid-gap:18px;
Expand All @@ -53,25 +52,13 @@
}

.express-checkout-fields{
border-width:4px;
border-style:solid;
background:#F8F8F8;
box-shadow:1px -1px 23px rgba(0, 0, 0, 0.04);
border-radius:4px;
display:grid;
grid-template-columns:1fr;
grid-gap:14px;
padding:10px;
}
@media (min-width: 768px){
.express-checkout-fields{
border-width:4px;
border:medium none currentcolor;
border:initial;
background:transparent none repeat 0 0 / auto auto padding-box border-box scroll;
background:initial;
box-shadow:none;
box-shadow:initial;
padding:0;
padding:initial;
}
Expand Down Expand Up @@ -218,8 +205,3 @@
padding-bottom:0;
}
}

.sticky-btn-placehodler{
opacity:0.5;
cursor:not-allowed;
}
25 changes: 12 additions & 13 deletions themes/harmony/snippets/express-checkout.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
{% endif %}

.custom-checkout-{{ checkout_id }},
.express-checkout-fields,
.sticky-form-wrapper {
border: 1px solid {{ settings.form_border_colour.hex }};
}
Expand All @@ -24,8 +23,8 @@
grid-gap: {{ settings.inputs_gap }}px;
}

.custom-checkout-{{ checkout_id }} input,
.custom-checkout-{{ checkout_id }} textarea,
.custom-checkout-{{ checkout_id }} input,
.custom-checkout-{{ checkout_id }} textarea,
.custom-checkout-{{ checkout_id }} select {
padding: {{ settings.input_padding }}px;
border-radius: {{ settings.input_border_radius }}px;
Expand Down Expand Up @@ -73,7 +72,7 @@
padding: calc({{ settings.input_padding }}px - 4px);
}

.express-checkout-placeholder .express-checkout-button {
.express-checkout-button:disabled {
opacity: 0.5;
cursor: not-allowed;
}
Expand Down Expand Up @@ -109,19 +108,19 @@
{% endfor %}
</select>
{% when 'textarea' %}
<textarea
<textarea
name='{{ field_name }}'
id='{{ field.name }}'
class='w-full'
placeholder='{{ field.placeholder }}'
id='{{ field.name }}'
class='w-full'
placeholder='{{ field.placeholder }}'
required='{{ field.required }}' min></textarea>
{% else %}
<input
<input
name='{{ field_name }}'
type='{{ field.type }}'
id='{{ field.name }}'
class='w-full'
placeholder='{{ field.placeholder }}'
type='{{ field.type }}'
id='{{ field.name }}'
class='w-full'
placeholder='{{ field.placeholder }}'
required='{{ field.required }}'>
{% endcase %}
<div
Expand Down
6 changes: 4 additions & 2 deletions themes/harmony/snippets/single-product-placeholder.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,10 @@
{%- when 'express_checkout' -%}
{% render 'express-checkout', checkout: checkout, is_sticky: block.settings.is_sticky, settings: block.settings, is_placeholder: is_placeholder %}
{% if block.settings.is_sticky %}
{% render 'sticky-checkout', settings: block.settings %}
<button class="yc-btn is_sticky {% if is_placeholder %} sticky-btn-placehodler {% endif %} font-bold express-checkout-button">{{ block.settings.express_checkout_cta }}</button>
{% render 'sticky-checkout', settings: block.settings %}
<button class="yc-btn is_sticky font-bold express-checkout-button" {% if is_placeholder %} disabled {% endif %}>
{{ block.settings.express_checkout_cta }}
</button>
{% endif %}
{%- endcase -%}
{%- endfor -%}
Expand Down
15 changes: 0 additions & 15 deletions themes/harmony/styles/express-checkout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
border-width: 6px;
border-style: solid;
background: #F8F8F8;
box-shadow: 1px -1px 23px rgba(0, 0, 0, 0.04);
border-radius: 4px;
padding: 20px;
grid-gap: 18px;
Expand All @@ -61,21 +60,12 @@
}

.express-checkout-fields {
border-width: 4px;
border-style: solid;
background: #F8F8F8;
box-shadow: 1px -1px 23px rgba(0, 0, 0, 0.04);
border-radius: 4px;
display: grid;
grid-template-columns: 1fr;
grid-gap: 14px;
padding: 10px;

@include breakpoint('md') {
border-width: 4px;
border: unset;
background: unset;
box-shadow: unset;
padding: unset;
}
}
Expand Down Expand Up @@ -227,8 +217,3 @@
}
}
}

.sticky-btn-placehodler {
opacity: 0.5;
cursor: not-allowed;
}
6 changes: 4 additions & 2 deletions themes/meraki/snippets/single-product-placeholder.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,10 @@
{%- when 'express_checkout' -%}
{% render 'express-checkout', checkout: checkout, is_sticky: block.settings.is_sticky, settings: block.settings, is_placeholder: is_placeholder %}
{% if block.settings.is_sticky %}
{% render 'sticky-checkout', settings: block.settings %}
<button class="yc-btn is_sticky {% if is_placeholder %} sticky-btn-placehodler {% endif %} font-bold express-checkout-button">{{ block.settings.express_checkout_cta }}</button>
{% render 'sticky-checkout', settings: block.settings %}
<button class="yc-btn is_sticky font-bold express-checkout-button" {% if is_placeholder %} disabled {% endif %}>
{{ block.settings.express_checkout_cta }}
</button>
{% endif %}
{%- endcase -%}
{%- endfor -%}
Expand Down