Skip to content

Commit 3cbe2a0

Browse files
committed
fix: update styles for minicart and mobile navigation, remove unnecessary x-cloak class
1 parent a7d1abe commit 3cbe2a0

4 files changed

Lines changed: 10 additions & 6 deletions

File tree

layout/theme.liquid

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666

6767
{% comment %} Styles for minicart wrapper in sections/minicart.liquid {% endcomment %}
6868
<div
69-
class="minicart-wrapper fixed top-[50px] right-[50px] z-100 max-[576px]:right-[20px] [[x-cloak]]:hidden"
69+
class="minicart-wrapper fixed top-12.5 right-12.5 z-100 max-[576px]:right-5"
7070
x-data
7171
x-show="$store.global.isMinicartVisible"
7272
x-on:click.outside="$store.global.isMinicartVisible = false"

sections/header.liquid

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<nav
2222
:class="$store.global.isMobileMenuVisible ? 'open' : 'closed'"
2323
aria-label="Mobile Navigation Overlay"
24-
class="block md:hidden [[x-cloak]]:hidden"
24+
class="block md:hidden"
2525
style="transition: all 300ms;"
2626
id="mobile-nav"
2727
role="navigation"
@@ -95,7 +95,7 @@
9595

9696
<a
9797
href="{{ routes.cart_url }}"
98-
class="relative p-2 text-white [&>svg]:h-5.5 [&>svg]:w-auto [[x-cloak]]:hidden"
98+
class="relative p-2 text-white [&>svg]:h-5.5 [&>svg]:w-auto"
9999
x-cloak>
100100
{% render 'icon-cart' %}
101101
<span data-ajax-cart-bind="item_count" class="absolute top-[58%] left-1/2 -translate-x-1/2 -translate-y-1/2 text-xs text-cloud-burst-500">

sections/minicart.liquid

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<div
2-
class="minicart h-auto w-72 rounded-md bg-white p-5 shadow-[0_30px_130px_-8px_rgba(0,0,0,0.25)] [&_a]:text-black [&_a]:no-underline [&_a:hover]:underline [[x-cloak]]:hidden"
2+
class="minicart h-auto w-72 rounded-md bg-white p-5 shadow-[0_30px_130px_-8px_rgba(0,0,0,0.25)] [&_a]:text-black [&_a]:no-underline [&_a:hover]:underline"
33
data-ajax-cart-section
44
x-cloak>
55
<div class="title-row mb-2.5 flex items-center justify-between">

snippets/head-css.liquid

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
1-
{% comment %} x-cloak hiding is handled via `[[x-cloak]]:hidden` utility classes. {% endcomment %}
2-
1+
<style>
2+
/* Hide elements with x-cloak attribute until Alpine.js is loaded */
3+
[x-cloak] {
4+
display: none !important;
5+
}
6+
</style>

0 commit comments

Comments
 (0)