Skip to content

Commit 99c9f1e

Browse files
authored
fix(demo): style bugs, after unocss config change (#298)
1 parent bb48e13 commit 99c9f1e

File tree

13 files changed

+22
-18
lines changed

13 files changed

+22
-18
lines changed

packages/cms-base/components/SwProductCard.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ const srcPath = computed(() => {
155155
aria-label="Add to wishlist"
156156
type="button"
157157
@click="toggleWishlistProduct"
158-
class="absolute top-2 right-2 hover:animate-count-infinite hover:animate-heart-beat"
158+
class="absolute bg-transparent top-2 right-2 hover:animate-count-infinite hover:animate-heart-beat"
159159
data-testid="product-box-toggle-wishlist-button"
160160
>
161161
<client-only>

packages/cms-base/components/SwProductListingFilters.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ onClickOutside(dropdownElement, () => (isSortMenuOpen.value = false));
194194
<button
195195
type="button"
196196
@click="isSortMenuOpen = !isSortMenuOpen"
197-
class="group inline-flex justify-center text-base font-medium text-gray-700 hover:text-gray-900"
197+
class="group inline-flex justify-center bg-transparent text-base font-medium text-gray-700 hover:text-gray-900"
198198
id="menu-button"
199199
aria-expanded="false"
200200
aria-haspopup="true"

packages/cms-base/components/SwSlider.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ defineExpose({
281281
<button
282282
aria-label="Chevron left"
283283
:class="{
284-
'absolute top-1/2 left-0 transform -translate-y-1/2 py-4': true,
284+
'absolute bg-transparent top-1/2 left-0 transform -translate-y-1/2 py-4': true,
285285
'transition bg-white/20 hover:bg-white/50':
286286
navigationArrowsValue === 'inside',
287287
}"
@@ -292,7 +292,7 @@ defineExpose({
292292
<button
293293
aria-label="Chevron right"
294294
:class="{
295-
'absolute top-1/2 right-0 transform -translate-y-1/2 py-4': true,
295+
'absolute bg-transparent top-1/2 right-0 transform -translate-y-1/2 py-4': true,
296296
'transition bg-white/20 hover:bg-white/50':
297297
navigationArrowsValue === 'inside',
298298
}"

packages/cms-base/components/public/cms/element/CmsElementText.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ const CmsTextRender = () => {
6464
const btnClass =
6565
"rounded-md inline-block my-2 py-2 px-4 border border-transparent text-sm font-medium focus:outline-none disabled:opacity-75";
6666
67-
_class = node?.attrs?.class
67+
_class = node.attrs.class
6868
.replace("btn-secondary", `${btnClass} bg-brand-dark text-white`)
6969
.replace(
7070
"btn-primary",

templates/vue-demo-store/components/account/AccountMenu.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ async function invokeLogout() {
1616
<div class="my-account-area">
1717
<div v-show="!isLoggedIn">
1818
<button
19-
class="whitespace-nowrap text-base font-medium text-gray-500 hover:text-gray-900"
19+
class="whitespace-nowrap bg-transparent text-base font-medium text-gray-500 hover:text-gray-900"
2020
data-testid="header-sign-in-link"
2121
@click="loginModalController.open"
2222
>
@@ -39,7 +39,7 @@ async function invokeLogout() {
3939
/>
4040
<button
4141
type="button"
42-
class="text-sm text-gray-700 focus:outline-none hidden sm:block"
42+
class="text-sm text-gray-700 bg-transparent focus:outline-none hidden sm:block"
4343
data-testid="account-menu-hello-button"
4444
@click="isAccountMenuOpen = !isAccountMenuOpen"
4545
>

templates/vue-demo-store/components/checkout/CheckoutCartItem.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ const removeCartItem = async () => {
113113
v-if="!isPromotion"
114114
type="button"
115115
:disabled="isLoading"
116-
class="font-medium text-brand-dark"
116+
class="font-medium text-brand-dark bg-transparent"
117117
:class="{ 'text-gray-500': isLoading }"
118118
data-testid="product-remove-button"
119119
@click="removeCartItem"

templates/vue-demo-store/components/checkout/CheckoutSideCart.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const localePath = useLocalePath();
2020
<div class="ml-3 flex h-7 items-center">
2121
<button
2222
type="button"
23-
class="-m-2 p-2 text-gray-400 hover:text-gray-500"
23+
class="-m-2 p-2 bg-transparent text-gray-400 hover:text-gray-500"
2424
data-testid="cart-close-button"
2525
@click="props.controller.close"
2626
>
@@ -87,7 +87,7 @@ const localePath = useLocalePath();
8787
or
8888
<button
8989
type="button"
90-
class="font-medium"
90+
class="font-medium bg-transparent"
9191
data-testid="cart-continue-button"
9292
@click="props.controller.close"
9393
>

templates/vue-demo-store/components/layout/LayoutHeader.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ const sidebarController = useModal();
5858
<!-- Cart -->
5959
<div class="flex ml-4 flow-root lg:ml-6">
6060
<button
61-
class="group -m-2 p-2 flex items-center relative"
61+
class="group bg-transparent -m-2 p-2 flex items-center relative"
6262
aria-label="cart"
6363
data-testid="cart-button"
6464
@click="sidebarController.open"

templates/vue-demo-store/components/product/ProductCard.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ const srcPath = computed(() => {
120120
<button
121121
aria-label="Add to wishlist"
122122
type="button"
123-
class="absolute top-2 right-2 hover:animate-count-infinite hover:animate-heart-beat"
123+
class="absolute bg-transparent top-2 right-2 hover:animate-count-infinite hover:animate-heart-beat"
124124
data-testid="product-box-toggle-wishlist-button"
125125
@click="toggleWishlistProduct"
126126
>

templates/vue-demo-store/layouts/account.vue

+4-2
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ provide("swNavigation-footer-navigation", footerData);
5555
>
5656
My account
5757
</h1>
58-
<ul class="space-y-2">
58+
<ul class="space-y-2 list-none pl-0">
5959
<li>
6060
<NuxtLink
6161
:to="localePath(`/account`)"
@@ -93,7 +93,9 @@ provide("swNavigation-footer-navigation", footerData);
9393
</NuxtLink>
9494
</li>
9595
</ul>
96-
<ul class="pt-4 mt-4 space-y-2 border-t border-gray-200">
96+
<ul
97+
class="pt-4 mt-4 space-y-2 border-t border-gray-200 list-none pl-0"
98+
>
9799
<li>
98100
<NuxtLink
99101
:to="localePath(`/account/order`)"

templates/vue-demo-store/nuxt.config.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,11 @@ export default defineNuxtConfig({
3838
compressPublicAssets: true,
3939
},
4040
unocss: {
41-
preflight: true, // this is needed by @unocss/reset
4241
// for presets, theme config, ... look at the uno.config.ts file
4342
},
43+
css: [
44+
"@unocss/reset/tailwind-compat.css", // needed to reset styles see https://unocss.dev/guide/style-reset (@unocss/reset)
45+
],
4446
router: {
4547
options: {
4648
linkExactActiveClass: "text-brand-primary",

templates/vue-demo-store/pages/account/profile.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const toggleTabs = (tabNumber: number) => {
3232
<div class="mb-4 border-b border-gray-200">
3333
<ul
3434
id="myTab"
35-
class="flex flex-wrap -mb-px font-medium md:text-2xl md:space-x-8"
35+
class="flex flex-wrap -mb-px font-medium md:text-2xl md:space-x-8 list-none pl-0"
3636
data-tabs-toggle="#profileTabContent"
3737
role="tablist"
3838
>

templates/vue-demo-store/pages/checkout/index.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -752,7 +752,7 @@ const addAddressModalController = useModal();
752752
<button
753753
type="button"
754754
data-testid="checkout-add-new-billing-address-button"
755-
class="flex font-medium text-brand-dark"
755+
class="flex font-medium text-brand-dark bg-transparent"
756756
@click="addAddressModalController.open"
757757
>
758758
{{ $t("checkout.addNewBillingAddress") }}
@@ -803,7 +803,7 @@ const addAddressModalController = useModal();
803803
<button
804804
type="button"
805805
data-testid="checkout-add-new-shipping-address-button"
806-
class="flex font-medium text-brand-dark"
806+
class="flex font-medium text-brand-dark bg-transparent"
807807
@click="addAddressModalController.open"
808808
>
809809
{{ $t("checkout.addNewShippingAddress") }}

0 commit comments

Comments
 (0)