From 45b32bdd1dc4003c538a4b0d2af1a7d1919672ed Mon Sep 17 00:00:00 2001 From: Kjell Reigstad Date: Thu, 12 Dec 2024 14:22:31 -0500 Subject: [PATCH] Invert shadow variables. --- layout/password.liquid | 34 ++++++++++++++++---------------- layout/theme.liquid | 40 +++++++++++++++++++------------------- templates/gift_card.liquid | 8 ++++---- 3 files changed, 41 insertions(+), 41 deletions(-) diff --git a/layout/password.liquid b/layout/password.liquid index 81ca71f06bb..b02e03c1bff 100644 --- a/layout/password.liquid +++ b/layout/password.liquid @@ -79,10 +79,10 @@ --font-body-scale: {{ settings.body_scale | divided_by: 100.0 }}; --font-heading-scale: {{ settings.heading_scale | times: 1.0 | divided_by: settings.body_scale }}; --media-padding: {{ settings.media_padding }}px; - --media-border-opacity: {{ settings.media_border_opacity }}%; + --media-border-opacity: {{ 100 | minus: settings.media_border_opacity }}%; --media-border-width: {{ settings.media_border_thickness }}px; --media-radius: {{ settings.media_radius }}px; - --media-shadow-opacity: {{ settings.media_shadow_opacity }}%; + --media-shadow-opacity: {{ 100 | minus: settings.media_shadow_opacity }}%; --media-shadow-horizontal-offset: {{ settings.media_shadow_horizontal_offset }}px; --media-shadow-vertical-offset: {{ settings.media_shadow_vertical_offset }}px; --media-shadow-blur-radius: {{ settings.media_shadow_blur }}px; @@ -95,9 +95,9 @@ --product-card-corner-radius: {{ settings.card_corner_radius | divided_by: 10.0 }}rem; --product-card-text-alignment: {{ settings.card_text_alignment }}; --product-card-border-width: {{ settings.card_border_thickness | divided_by: 10.0 }}rem; - --product-card-border-opacity: {{ settings.card_border_opacity }}%; - --product-card-shadow-opacity: {{ settings.card_shadow_opacity }}%; - --product-card-shadow-visible: {% if settings.card_shadow_opacity > 0 %}1{% else %}0{% endif %}; + --product-card-border-opacity: {{ 100 | minus: settings.card_border_opacity }}%; + --product-card-shadow-opacity: {{ 100 | minus: settings.card_shadow_opacity }}%; + --product-card-shadow-visible: {% if settings.card_shadow_opacity > 0 %}0{% else %}1{% endif %}; --product-card-shadow-horizontal-offset: {{ settings.card_shadow_horizontal_offset | divided_by: 10.0 }}rem; --product-card-shadow-vertical-offset: {{ settings.card_shadow_vertical_offset | divided_by: 10.0 }}rem; --product-card-shadow-blur-radius: {{ settings.card_shadow_blur | divided_by: 10.0 }}rem; @@ -106,8 +106,8 @@ --collection-card-corner-radius: {{ settings.collection_card_corner_radius | divided_by: 10.0 }}rem; --collection-card-text-alignment: {{ settings.collection_card_text_alignment }}; --collection-card-border-width: {{ settings.collection_card_border_thickness | divided_by: 10.0 }}rem; - --collection-card-border-opacity: {{ settings.collection_card_border_opacity }}%; - --collection-card-shadow-opacity: {{ settings.collection_card_shadow_opacity }}%; + --collection-card-border-opacity: {{ 100 | minus: settings.collection_card_border_opacity }}%; + --collection-card-shadow-opacity: {{ 100 | minus: settings.collection_card_shadow_opacity }}%; --collection-card-shadow-visible: {% if settings.collection_card_shadow_opacity > 0 %}1{% else %}0{% endif %}; --collection-card-shadow-horizontal-offset: {{ settings.collection_card_shadow_horizontal_offset | divided_by: 10.0 }}rem; --collection-card-shadow-vertical-offset: {{ settings.collection_card_shadow_vertical_offset | divided_by: 10.0 }}rem; @@ -117,8 +117,8 @@ --blog-card-corner-radius: {{ settings.blog_card_corner_radius | divided_by: 10.0 }}rem; --blog-card-text-alignment: {{ settings.blog_card_text_alignment }}; --blog-card-border-width: {{ settings.blog_card_border_thickness | divided_by: 10.0 }}rem; - --blog-card-border-opacity: {{ settings.blog_card_border_opacity }}%; - --blog-card-shadow-opacity: {{ settings.blog_card_shadow_opacity }}%; + --blog-card-border-opacity: {{ 100 | minus: settings.blog_card_border_opacity }}%; + --blog-card-shadow-opacity: {{ 100 | minus: settings.blog_card_shadow_opacity }}%; --blog-card-shadow-visible: {% if settings.blog_card_shadow_opacity > 0 %}1{% else %}0{% endif %}; --blog-card-shadow-horizontal-offset: {{ settings.blog_card_shadow_horizontal_offset | divided_by: 10.0 }}rem; --blog-card-shadow-vertical-offset: {{ settings.blog_card_shadow_vertical_offset | divided_by: 10.0 }}rem; @@ -134,10 +134,10 @@ --grid-mobile-vertical-spacing: {{ settings.spacing_grid_vertical | divided_by: 2 }}px; --grid-mobile-horizontal-spacing: {{ settings.spacing_grid_horizontal | divided_by: 2 }}px; - --text-boxes-border-opacity: {{ settings.text_boxes_border_opacity }}%; + --text-boxes-border-opacity: {{ 100 | minus: settings.text_boxes_border_opacity }}%; --text-boxes-border-width: {{ settings.text_boxes_border_thickness }}px; --text-boxes-radius: {{ settings.text_boxes_radius }}px; - --text-boxes-shadow-opacity: {{ settings.text_boxes_shadow_opacity }}%; + --text-boxes-shadow-opacity: {{ 100 | minus: settings.text_boxes_shadow_opacity }}%; --text-boxes-shadow-visible: {% if settings.text_boxes_shadow_opacity > 0 %}1{% else %}0{% endif %}; --text-boxes-shadow-horizontal-offset: {{ settings.text_boxes_shadow_horizontal_offset }}px; --text-boxes-shadow-vertical-offset: {{ settings.text_boxes_shadow_vertical_offset }}px; @@ -146,8 +146,8 @@ --buttons-radius: {{ settings.buttons_radius }}px; --buttons-radius-outset: {% if settings.buttons_radius > 0 %}{{ settings.buttons_radius | plus: settings.buttons_border_thickness }}{% else %}0{% endif %}px; --buttons-border-width: {% if settings.buttons_border_opacity > 0 %}{{ settings.buttons_border_thickness }}{% else %}0{% endif %}px; - --buttons-border-opacity: {{ settings.buttons_border_opacity }}%; - --buttons-shadow-opacity: {{ settings.buttons_shadow_opacity }}%; + --buttons-border-opacity: {{ 100 | minus: settings.buttons_border_opacity }}%; + --buttons-shadow-opacity: {{ 100 | minus: settings.buttons_shadow_opacity }}%; --buttons-shadow-visible: {% if settings.buttons_shadow_opacity > 0 %}1{% else %}0{% endif %}; --buttons-shadow-horizontal-offset: {{ settings.buttons_shadow_horizontal_offset }}px; --buttons-shadow-vertical-offset: {{ settings.buttons_shadow_vertical_offset }}px; @@ -156,8 +156,8 @@ --inputs-radius: {{ settings.inputs_radius }}px; --inputs-border-width: {{ settings.inputs_border_thickness }}px; - --inputs-border-opacity: {{ settings.inputs_border_opacity }}%; - --inputs-shadow-opacity: {{ settings.inputs_shadow_opacity }}%; + --inputs-border-opacity: {{ 100 | minus: settings.inputs_border_opacity }}%; + --inputs-shadow-opacity: {{ 100 | minus: settings.inputs_shadow_opacity }}%; --inputs-shadow-horizontal-offset: {{ settings.inputs_shadow_horizontal_offset }}px; --inputs-margin-offset: {% if settings.inputs_shadow_vertical_offset != 0 and settings.inputs_shadow_opacity > 0 %}{{ settings.inputs_shadow_vertical_offset | abs }}{% else %}0{% endif %}px; --inputs-shadow-vertical-offset: {{ settings.inputs_shadow_vertical_offset }}px; @@ -166,8 +166,8 @@ --variant-pills-radius: {{ settings.variant_pills_radius }}px; --variant-pills-border-width: {{ settings.variant_pills_border_thickness }}px; - --variant-pills-border-opacity: {{ settings.variant_pills_border_opacity }}%; - --variant-pills-shadow-opacity: {{ settings.variant_pills_shadow_opacity }}%; + --variant-pills-border-opacity: {{ 100 | minus: settings.variant_pills_border_opacity }}%; + --variant-pills-shadow-opacity: {{ 100 | minus: settings.variant_pills_shadow_opacity }}%; --variant-pills-shadow-horizontal-offset: {{ settings.variant_pills_shadow_horizontal_offset }}px; --variant-pills-shadow-vertical-offset: {{ settings.variant_pills_shadow_vertical_offset }}px; --variant-pills-shadow-blur-radius: {{ settings.variant_pills_shadow_blur }}px; diff --git a/layout/theme.liquid b/layout/theme.liquid index 9466f8e28d1..f526f74470e 100644 --- a/layout/theme.liquid +++ b/layout/theme.liquid @@ -113,10 +113,10 @@ --font-heading-scale: {{ settings.heading_scale | times: 1.0 | divided_by: settings.body_scale }}; --media-padding: {{ settings.media_padding }}px; - --media-border-opacity: {{ settings.media_border_opacity }}%; + --media-border-opacity: {{ 100 | minus: settings.media_border_opacity }}%; --media-border-width: {{ settings.media_border_thickness }}px; --media-radius: {{ settings.media_radius }}px; - --media-shadow-opacity: {{ settings.media_shadow_opacity }}%; + --media-shadow-opacity: {{ 100 | minus: settings.media_shadow_opacity }}%; --media-shadow-horizontal-offset: {{ settings.media_shadow_horizontal_offset }}px; --media-shadow-vertical-offset: {{ settings.media_shadow_vertical_offset }}px; --media-shadow-blur-radius: {{ settings.media_shadow_blur }}px; @@ -129,8 +129,8 @@ --product-card-corner-radius: {{ settings.card_corner_radius | divided_by: 10.0 }}rem; --product-card-text-alignment: {{ settings.card_text_alignment }}; --product-card-border-width: {{ settings.card_border_thickness | divided_by: 10.0 }}rem; - --product-card-border-opacity: {{ settings.card_border_opacity }}%; - --product-card-shadow-opacity: {{ settings.card_shadow_opacity }}%; + --product-card-border-opacity: {{ 100 | minus: settings.card_border_opacity }}%; + --product-card-shadow-opacity: {{ 100 | minus: settings.card_shadow_opacity }}%; --product-card-shadow-visible: {% if settings.card_shadow_opacity > 0 %}1{% else %}0{% endif %}; --product-card-shadow-horizontal-offset: {{ settings.card_shadow_horizontal_offset | divided_by: 10.0 }}rem; --product-card-shadow-vertical-offset: {{ settings.card_shadow_vertical_offset | divided_by: 10.0 }}rem; @@ -140,8 +140,8 @@ --collection-card-corner-radius: {{ settings.collection_card_corner_radius | divided_by: 10.0 }}rem; --collection-card-text-alignment: {{ settings.collection_card_text_alignment }}; --collection-card-border-width: {{ settings.collection_card_border_thickness | divided_by: 10.0 }}rem; - --collection-card-border-opacity: {{ settings.collection_card_border_opacity }}%; - --collection-card-shadow-opacity: {{ settings.collection_card_shadow_opacity }}%; + --collection-card-border-opacity: {{ 100 | minus: settings.collection_card_border_opacity }}%; + --collection-card-shadow-opacity: {{ 100 | minus: settings.collection_card_shadow_opacity }}%; --collection-card-shadow-visible: {% if settings.collection_card_shadow_opacity > 0 %}1{% else %}0{% endif %}; --collection-card-shadow-horizontal-offset: {{ settings.collection_card_shadow_horizontal_offset | divided_by: 10.0 }}rem; --collection-card-shadow-vertical-offset: {{ settings.collection_card_shadow_vertical_offset | divided_by: 10.0 }}rem; @@ -151,8 +151,8 @@ --blog-card-corner-radius: {{ settings.blog_card_corner_radius | divided_by: 10.0 }}rem; --blog-card-text-alignment: {{ settings.blog_card_text_alignment }}; --blog-card-border-width: {{ settings.blog_card_border_thickness | divided_by: 10.0 }}rem; - --blog-card-border-opacity: {{ settings.blog_card_border_opacity }}%; - --blog-card-shadow-opacity: {{ settings.blog_card_shadow_opacity }}%; + --blog-card-border-opacity: {{ 100 | minus: settings.blog_card_border_opacity }}%; + --blog-card-shadow-opacity: {{ 100 | minus: settings.blog_card_shadow_opacity }}%; --blog-card-shadow-visible: {% if settings.blog_card_shadow_opacity > 0 %}1{% else %}0{% endif %}; --blog-card-shadow-horizontal-offset: {{ settings.blog_card_shadow_horizontal_offset | divided_by: 10.0 }}rem; --blog-card-shadow-vertical-offset: {{ settings.blog_card_shadow_vertical_offset | divided_by: 10.0 }}rem; @@ -161,16 +161,16 @@ --badge-corner-radius: {{ settings.badge_corner_radius | divided_by: 10.0 }}rem; --popup-border-width: {{ settings.popup_border_thickness }}px; - --popup-border-opacity: {{ settings.popup_border_opacity }}%; + --popup-border-opacity: {{ 100 | minus: settings.popup_border_opacity }}%; --popup-corner-radius: {{ settings.popup_corner_radius }}px; - --popup-shadow-opacity: {{ settings.popup_shadow_opacity }}%; + --popup-shadow-opacity: {{ 100 | minus: settings.popup_shadow_opacity }}%; --popup-shadow-horizontal-offset: {{ settings.popup_shadow_horizontal_offset }}px; --popup-shadow-vertical-offset: {{ settings.popup_shadow_vertical_offset }}px; --popup-shadow-blur-radius: {{ settings.popup_shadow_blur }}px; --drawer-border-width: {{ settings.drawer_border_thickness }}px; - --drawer-border-opacity: {{ settings.drawer_border_opacity }}%; - --drawer-shadow-opacity: {{ settings.drawer_shadow_opacity }}%; + --drawer-border-opacity: {{ 100 | minus: settings.drawer_border_opacity }}%; + --drawer-shadow-opacity: {{ 100 | minus: settings.drawer_shadow_opacity }}%; --drawer-shadow-horizontal-offset: {{ settings.drawer_shadow_horizontal_offset }}px; --drawer-shadow-vertical-offset: {{ settings.drawer_shadow_vertical_offset }}px; --drawer-shadow-blur-radius: {{ settings.drawer_shadow_blur }}px; @@ -183,10 +183,10 @@ --grid-mobile-vertical-spacing: {{ settings.spacing_grid_vertical | divided_by: 2 }}px; --grid-mobile-horizontal-spacing: {{ settings.spacing_grid_horizontal | divided_by: 2 }}px; - --text-boxes-border-opacity: {{ settings.text_boxes_border_opacity }}%; + --text-boxes-border-opacity: {{ 100 | minus: settings.text_boxes_border_opacity }}%; --text-boxes-border-width: {{ settings.text_boxes_border_thickness }}px; --text-boxes-radius: {{ settings.text_boxes_radius }}px; - --text-boxes-shadow-opacity: {{ settings.text_boxes_shadow_opacity }}%; + --text-boxes-shadow-opacity: {{ 100 | minus: settings.text_boxes_shadow_opacity }}%; --text-boxes-shadow-visible: {% if settings.text_boxes_shadow_opacity > 0 %}1{% else %}0{% endif %}; --text-boxes-shadow-horizontal-offset: {{ settings.text_boxes_shadow_horizontal_offset }}px; --text-boxes-shadow-vertical-offset: {{ settings.text_boxes_shadow_vertical_offset }}px; @@ -195,8 +195,8 @@ --buttons-radius: {{ settings.buttons_radius }}px; --buttons-radius-outset: {% if settings.buttons_radius > 0 %}{{ settings.buttons_radius | plus: settings.buttons_border_thickness }}{% else %}0{% endif %}px; --buttons-border-width: {% if settings.buttons_border_opacity > 0 %}{{ settings.buttons_border_thickness }}{% else %}0{% endif %}px; - --buttons-border-opacity: {{ settings.buttons_border_opacity }}%; - --buttons-shadow-opacity: {{ settings.buttons_shadow_opacity }}%; + --buttons-border-opacity: {{ 100 | minus: settings.buttons_border_opacity }}%; + --buttons-shadow-opacity: {{ 100 | minus: settings.buttons_shadow_opacity }}%; --buttons-shadow-visible: {% if settings.buttons_shadow_opacity > 0 %}1{% else %}0{% endif %}; --buttons-shadow-horizontal-offset: {{ settings.buttons_shadow_horizontal_offset }}px; --buttons-shadow-vertical-offset: {{ settings.buttons_shadow_vertical_offset }}px; @@ -205,8 +205,8 @@ --inputs-radius: {{ settings.inputs_radius }}px; --inputs-border-width: {{ settings.inputs_border_thickness }}px; - --inputs-border-opacity: {{ settings.inputs_border_opacity }}%; - --inputs-shadow-opacity: {{ settings.inputs_shadow_opacity }}%; + --inputs-border-opacity: {{ 100 | minus: settings.inputs_border_opacity }}%; + --inputs-shadow-opacity: {{ 100 | minus: settings.inputs_shadow_opacity }}%; --inputs-shadow-horizontal-offset: {{ settings.inputs_shadow_horizontal_offset }}px; --inputs-margin-offset: {% if settings.inputs_shadow_vertical_offset != 0 and settings.inputs_shadow_opacity > 0 %}{{ settings.inputs_shadow_vertical_offset | abs }}{% else %}0{% endif %}px; --inputs-shadow-vertical-offset: {{ settings.inputs_shadow_vertical_offset }}px; @@ -215,8 +215,8 @@ --variant-pills-radius: {{ settings.variant_pills_radius }}px; --variant-pills-border-width: {{ settings.variant_pills_border_thickness }}px; - --variant-pills-border-opacity: {{ settings.variant_pills_border_opacity }}%; - --variant-pills-shadow-opacity: {{ settings.variant_pills_shadow_opacity }}%; + --variant-pills-border-opacity: {{ 100 | minus: settings.variant_pills_border_opacity }}%; + --variant-pills-shadow-opacity: {{ 100 | minus: settings.variant_pills_shadow_opacity }}%; --variant-pills-shadow-horizontal-offset: {{ settings.variant_pills_shadow_horizontal_offset }}px; --variant-pills-shadow-vertical-offset: {{ settings.variant_pills_shadow_vertical_offset }}px; --variant-pills-shadow-blur-radius: {{ settings.variant_pills_shadow_blur }}px; diff --git a/templates/gift_card.liquid b/templates/gift_card.liquid index 7f2f22abcbf..d6a68091381 100644 --- a/templates/gift_card.liquid +++ b/templates/gift_card.liquid @@ -74,8 +74,8 @@ --buttons-radius: {{ settings.buttons_radius }}px; --buttons-border-width: {% if settings.buttons_border_opacity > 0 %}{{ settings.buttons_border_thickness }}{% else %}0{% endif %}px; - --buttons-border-opacity: {{ settings.buttons_border_opacity }}%; - --buttons-shadow-opacity: {{ settings.buttons_shadow_opacity }}%; + --buttons-border-opacity: {{ 100 | minus: settings.buttons_border_opacity }}%; + --buttons-shadow-opacity: {{ 100 | minus: settings.buttons_shadow_opacity }}%; --buttons-shadow-horizontal-offset: {{ settings.buttons_shadow_horizontal_offset }}px; --buttons-shadow-vertical-offset: {{ settings.buttons_shadow_vertical_offset }}px; --buttons-shadow-blur-radius: {{ settings.buttons_shadow_blur }}px; @@ -83,8 +83,8 @@ --inputs-radius: {{ settings.inputs_radius }}px; --inputs-border-width: {{ settings.inputs_border_thickness }}px; - --inputs-border-opacity: {{ settings.inputs_border_opacity }}%; - --inputs-shadow-opacity: {{ settings.inputs_shadow_opacity }}%; + --inputs-border-opacity: {{ 100 | minus: settings.inputs_border_opacity }}%; + --inputs-shadow-opacity: {{ 100 | minus: settings.inputs_shadow_opacity }}%; --inputs-shadow-horizontal-offset: {{ settings.inputs_shadow_horizontal_offset }}px; --inputs-shadow-vertical-offset: {{ settings.inputs_shadow_vertical_offset }}px; --inputs-shadow-blur-radius: {{ settings.inputs_shadow_blur }}px;