Skip to content

Commit 3a3e561

Browse files
committed
Replace end- & start- with native tailwindcss rtl props
1 parent 2b0db46 commit 3a3e561

File tree

11 files changed

+22
-22
lines changed

11 files changed

+22
-22
lines changed

src/assets/styles/03-elements/buttons.scss

+3-3
Original file line numberDiff line numberDiff line change
@@ -118,11 +118,11 @@ salla-button {
118118
}
119119

120120
&--close {
121-
@apply hidden xs:block h-12 w-14 text-red-500 text-2xl absolute top-0 end-0 z-50;
121+
@apply hidden xs:block h-12 w-14 text-red-500 text-2xl absolute top-0 rtl:left-0 ltr:right-0 z-50;
122122
}
123123

124124
&--close-sm {
125-
@apply opacity-0 -translate-y-full transition duration-300 h-[51px] w-[51px] bg-red-500 text-white text-xl fixed top-0 end-0 z-50;
125+
@apply opacity-0 -translate-y-full transition duration-300 h-[51px] w-[51px] bg-red-500 text-white text-xl fixed top-0 rtl:left-0 ltr:right-0 z-50;
126126
}
127127

128128
&--collapse {
@@ -174,7 +174,7 @@ salla-button {
174174
* Coupon Button
175175
*/
176176
button.btn--coupon {
177-
@apply absolute top-0 end-0 rounded-s-none shrink-0 h-[40px];
177+
@apply absolute top-0 rtl:left-0 ltr:right-0 rounded-s-none shrink-0 h-[40px];
178178

179179
.s-button-text {
180180
@apply flex #{!important};

src/assets/styles/04-components/brands.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
}
1515

1616
&.is-sticky{
17-
@apply flex-col flex-wrap h-full fixed z-0 top-9 start-2 space-y-0.5 pt-16 pb-10;
17+
@apply flex-col flex-wrap h-full fixed z-0 top-9 rtl:right-2 ltr:left-2 space-y-0.5 pt-16 pb-10;
1818

1919
.brands-nav__item{
2020
@apply bg-white;

src/assets/styles/04-components/product.scss

+6-6
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
}
4949

5050
.btn--wishlist {
51-
@apply absolute top-0 end-0;
51+
@apply absolute top-0 rtl:left-0 ltr:right-0;
5252

5353
.sicon-heart {
5454
text-shadow: 0 0 2px #999;
@@ -60,7 +60,7 @@
6060
&--minimal,
6161
&--special {
6262
.product-rating{
63-
@apply absolute bottom-2 end-2;
63+
@apply absolute bottom-2 rtl:left-2 ltr:right-2;
6464

6565
span{
6666
color: #fff;
@@ -89,7 +89,7 @@
8989
}
9090

9191
salla-button.btn--wishlist {
92-
@apply absolute top-4 md:end-4 end-2 opacity-75 hover:opacity-100;
92+
@apply absolute top-4 rtl:left-2 ltr:right-2 rtl:md:left-4 ltr:md:right-4 opacity-75 hover:opacity-100;
9393

9494
button{
9595
background-color: #fff !important;
@@ -98,7 +98,7 @@
9898

9999
@media (max-width: 480px){
100100
.product-rating{
101-
@apply absolute start-3 -top-8;
101+
@apply absolute rtl:right-3 ltr:left-3 -top-8;
102102

103103
span{
104104
color: #fff;
@@ -110,7 +110,7 @@
110110

111111
&--special {
112112
.product-rating{
113-
@apply absolute bottom-auto -top-8 end-5;
113+
@apply absolute bottom-auto -top-8 rtl:left-5 ltr:right-5;
114114
}
115115

116116
&.product-entry--fit-type {
@@ -193,7 +193,7 @@
193193

194194
// Digital Rating(SVG)---------------------------
195195
.pie-wrapper {
196-
@apply w-[72px] h-[72px] absolute top-2.5 end-5 text-primary flex items-center justify-center;
196+
@apply w-[72px] h-[72px] absolute top-2.5 rtl:left-5 ltr:right-5 text-primary flex items-center justify-center;
197197

198198
.pie-svg {
199199
circle {

src/assets/styles/04-components/slider.scss

+3-3
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ salla-slider{
3636
}
3737

3838
.promotion-title{
39-
@apply absolute z-10 top-4 start-0 font-bold text-sm bg-red-400 text-white rounded-e-md;
39+
@apply absolute z-10 top-4 rtl:right-0 ltr:left-0 font-bold text-sm bg-red-400 text-white rounded-e-md;
4040
@apply w-auto m-0 px-3 py-2 #{!important};
4141
}
4242

@@ -133,7 +133,7 @@ salla-slider.photos-slider {
133133
}
134134

135135
&__icon {
136-
@apply absolute end-8 sm:end-12 lg:end-8 top-4 text-4xl sm:text-5xl text-primary;
136+
@apply absolute rtl:left-8 ltr:right-8 rtl:sm:left-12 ltr:sm:right-12 rtl:lg:left-8 ltr:lg:right-8 top-4 text-4xl sm:text-5xl text-primary;
137137
}
138138

139139
&__text p,
@@ -219,7 +219,7 @@ salla-slider.photos-slider {
219219
top: 35%;
220220

221221
&.s-slider-next {
222-
@apply start-auto;
222+
@apply rtl:right-auto ltr:left-auto;
223223
left: 17%;
224224
}
225225

src/assets/styles/04-components/user-pages.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
}
5050

5151
a{
52-
@apply w-full block absolute top-0 bottom-0 start-0;
52+
@apply w-full block absolute top-0 bottom-0 rtl:right-0 ltr:left-0;
5353
}
5454
}
5555
}

src/views/pages/blog/index.twig

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
tabindex="-1">
3636
<div class="flex items-center p-4 border-b mb-1 lg:hidden relative">
3737
<h2 class="font-bold">{{ trans('pages.blog_categories.categories') }}</h2>
38-
<button class="dropdown__close h-12 w-12 text-red-500 text-lg rounded-full absolute top-2 end-1 z-50">
38+
<button class="dropdown__close h-12 w-12 text-red-500 text-lg rounded-full absolute top-2 rtl:left-1 ltr:right-1 z-50">
3939
<i class="sicon-cancel pointer-events-none"></i>
4040
</button>
4141
</div>
@@ -82,7 +82,7 @@
8282
<div class="swiper-slide has-overlay blog-slider__slide h-[300px] md:h-[400px] relative bg-border-color flex justify-center {{ article.has_image ? '' : 'no-thumb' }}">
8383
<img class="{{ article.image.url|is_placeholder?'sm:h-full w-20 object-contain opacity-50':'object-cover h-full w-full' }}"
8484
src="{{ article.image.url }}" alt="{{ article.image.alt }}">
85-
<div class="absolute z-10 bottom-0 start-0 p-4 pb-10 rtl:lg:pr-10 ltr:lg:pl-10 lg:pb-20">
85+
<div class="absolute z-10 bottom-0 rtl:right-0 ltr:left-0 p-4 pb-10 rtl:lg:pr-10 ltr:lg:pl-10 lg:pb-20">
8686
<div class="blog-slider__content relative">
8787
<div class="z-20 w-full md:w-5/6 lg:w-6/12 text-white">
8888
<div data-swiper-parallax="-500" class="block-slide-anime">

src/views/pages/cart.twig

+2-2
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@
116116

117117

118118

119-
<span class="absolute top-1.5 end-1.5 xs:top-5 xs:end-5">
119+
<span class="absolute top-1.5 rtl:left-1.5 ltr:right-1.5 rtl:xs:left-5 ltr:xs:right-5 xs:top-5">
120120
<salla-button type="button" shape="icon" size="small" color="danger" class="btn--delete"
121121
onclick="salla.cart.deleteItem({{ item.id }}).then(() => document.querySelector('#item-{{ item.id }}').remove())">
122122
<i class="sicon-cancel"></i>
@@ -160,7 +160,7 @@
160160
<div class="mt-8 bg-border-color rounded-full {{ is_free ? ' hidden' : '' }}" id="free-shipping-bar">
161161
<div class="progress-bg transition-all duration-500 h-2.5 bg-primary relative rounded-full flex justify-end"
162162
style="width:{{ cart.free_shipping_bar.percent }}%">
163-
<i class="inline-block sicon-shipping-fast absolute -top-5 -end-0 {{ theme.is_rtl ? 'flip-x':'' }}"></i>
163+
<i class="inline-block sicon-shipping-fast absolute -top-5 rtl:left-0 ltr:right-0 {{ theme.is_rtl ? 'flip-x':'' }}"></i>
164164
</div>
165165
</div>
166166
</div>

src/views/pages/loyalty.twig

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
{% extends "layouts.master" %}
3535

3636
{% block content %}
37-
<div class="h-62 -mb-52 w-full bg-primary start-0 relative -z-1 bg-cover bg-no-repeat bg-center"
37+
<div class="h-62 -mb-52 w-full bg-primary rtl:right-0 ltr:left-0 relative -z-1 bg-cover bg-no-repeat bg-center"
3838
style="background-image:url({{ loyalty.image }})">
3939
<div class="overlay h-full w-full bg-black opacity-50 absolute top-0 left-0"></div>
4040
</div>

src/views/pages/partials/product/card-full-image.twig

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
<!-- badage -->
1010
{% if product.promotion_title %}
11-
<div class="absolute z-10 top-4 start-0">
11+
<div class="absolute z-10 top-4 rtl:right-0 ltr:left-0">
1212
<div class="font-bold px-3 py-2 text-sm bg-red-400 text-white rounded-e-md">{{ product.promotion_title }}</div>
1313
</div>
1414
{% endif %}

src/views/pages/partials/product/card.twig

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ view options:
2020
src="{{ 'images/s-empty.png' | asset }}" data-src="{{ product.image.url }}"
2121
alt="{{ product.image.alt }}"/>
2222
{% if product.promotion_title %}
23-
<div class="absolute top-4 start-0 z-1 font-bold px-2.5 py-1.5 md:py-2 text-xs bg-red-400 text-white rounded-e-md {{ is_horizontal ? '' : 'max-w-[calc(100%-60px)]' }}">{{ product.promotion_title }}</div>
23+
<div class="absolute top-4 rtl:right-0 ltr:left-0 z-1 font-bold px-2.5 py-1.5 md:py-2 text-xs bg-red-400 text-white rounded-e-md {{ is_horizontal ? '' : 'max-w-[calc(100%-60px)]' }}">{{ product.promotion_title }}</div>
2424
{% elseif show_quantity and product.quantity %}
2525
<div class="absolute bottom-2 z-1 font-bold px-2.5 py-1.5 md:py-2 text-xs bg-red-400 text-white rounded-md left-1/2 transform -translate-x-1/2 {{ is_horizontal ? '' : 'max-w-[calc(100%-60px)]' }}">{{ trans('pages.products.remained') }} {{ product.quantity|number }}</div>
2626
{% elseif show_quantity and product.is_out_of_stock %}

src/views/pages/thank-you.twig

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
{% extends "layouts.master" %}
1313

1414
{% block content %}
15-
<div class="h-52 -mb-52 w-full bg-primary start-0 relative -z-1">
15+
<div class="h-52 -mb-52 w-full bg-primary rtl:right-0 ltr:left-0 relative -z-1">
1616
<svg class="text-primary absolute top-full" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320">
1717
<path class="fill-current" fill-opacity="1"
1818
d="M0,96L120,112C240,128,480,160,720,165.3C960,171,1200,149,1320,138.7L1440,128L1440,0L1320,0C1200,0,960,0,720,0C480,0,240,0,120,0L0,0Z"></path>

0 commit comments

Comments
 (0)