Skip to content
This repository was archived by the owner on Apr 28, 2025. It is now read-only.

Commit 0bbe7cb

Browse files
authored
feat(eek): flipped EEK direction (#2588)
1 parent a76ba1e commit 0bbe7cb

File tree

4 files changed

+28
-23
lines changed

4 files changed

+28
-23
lines changed

.changeset/heavy-webs-try.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@ebay/skin": minor
3+
---
4+
5+
feat(eek): flipped EEK direction

dist/eek/eek.css

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
.eek {
22
align-items: stretch;
33
display: inline-flex;
4+
flex-direction: row-reverse;
45
font-family: Arial, sans-serif;
56
font-weight: 700;
67
height: 24px;
@@ -14,12 +15,14 @@
1415
.eek__container {
1516
align-items: center;
1617
border: 1px solid #000;
17-
border-radius: 2px 0 0 2px;
18-
border-right: none;
18+
border-left: none;
19+
border-radius: 0 2px 2px 0;
1920
display: inline-flex;
21+
flex-direction: row-reverse;
2022
}
2123

2224
.eek .icon--eek-arrow {
25+
rotate: 180deg;
2326
width: 9px;
2427
}
2528

@@ -38,7 +41,7 @@
3841
content: "";
3942
display: block;
4043
height: 19.7989898732px;
41-
margin-top: 2.3px;
44+
margin-block-start: 2.3px;
4245
position: relative;
4346
right: 12px;
4447
transform: rotate(45deg);
@@ -105,7 +108,7 @@
105108
color: #fff;
106109
display: inline-block;
107110
font-size: 18px;
108-
margin-left: 8px;
111+
margin-inline-end: 8px;
109112
text-shadow:
110113
-0.5px 0.5px 0 #000,
111114
0.5px 0.5px 0 #000,
@@ -161,10 +164,6 @@
161164
}
162165
}
163166
}
164-
[dir="rtl"] .eek .icon--eek-arrow {
165-
transform: rotate(180deg);
166-
}
167-
[dir="rtl"] .eek__container {
168-
border-left: none;
169-
border-right: 1px solid #000;
167+
[dir="rtl"] .eek {
168+
direction: ltr;
170169
}

src/routes/_index/component/eek/+page.marko

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -360,9 +360,6 @@
360360
</svg>
361361
</div>
362362
</highlight-code>
363-
364-
365-
366363
</div>
367364
export const metadata = {
368365
component: "eek",

src/sass/eek/eek.scss

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ $eek-border-color: $eek-color;
2121
.eek {
2222
align-items: stretch;
2323
display: inline-flex;
24+
25+
// TODO remove flex-direction next major version and swap markup to be icon first
26+
flex-direction: row-reverse;
2427
font-family: Arial, sans-serif;
2528
font-weight: 700;
2629
height: 24px;
@@ -34,12 +37,16 @@ $eek-border-color: $eek-color;
3437
.eek__container {
3538
align-items: center;
3639
border: 1px solid $eek-color;
37-
border-radius: 2px 0 0 2px;
38-
border-right: none;
40+
border-left: none;
41+
border-radius: 0 2px 2px 0;
3942
display: inline-flex;
43+
44+
// TODO remove flex-direction next major version and swap markup to be icon first
45+
flex-direction: row-reverse;
4046
}
4147

4248
.eek .icon--eek-arrow {
49+
rotate: 180deg;
4350
width: 9px;
4451
}
4552

@@ -58,7 +65,7 @@ $eek-border-color: $eek-color;
5865
content: "";
5966
display: block;
6067
height: $eek-arrow-size;
61-
margin-top: 2.3px;
68+
margin-block-start: 2.3px;
6269
position: relative;
6370
right: 12px;
6471
transform: rotate(45deg);
@@ -118,7 +125,7 @@ $eek-border-color: $eek-color;
118125
color: $eek-background-color;
119126
display: inline-block;
120127
font-size: 18px;
121-
margin-left: 8px;
128+
margin-inline-end: 8px;
122129
text-shadow:
123130
-0.5px 0.5px 0 $eek-color,
124131
0.5px 0.5px 0 $eek-color,
@@ -181,11 +188,8 @@ Changed a bit of styles there only in order to make it work
181188
}
182189

183190
[dir="rtl"] {
184-
.eek .icon--eek-arrow {
185-
transform: rotate(180deg);
186-
}
187-
.eek__container {
188-
border-left: none;
189-
border-right: 1px solid $eek-color;
191+
.eek {
192+
// Since this is a legal requirement component, we need to ensure that the text is always left-to-right
193+
direction: ltr;
190194
}
191195
}

0 commit comments

Comments
 (0)