Skip to content

Commit e648482

Browse files
committed
Move Arabic global styles to respective css modules
1 parent 9948f0e commit e648482

File tree

5 files changed

+25
-24
lines changed

5 files changed

+25
-24
lines changed

components/algorithmsList/algorithmCard/index.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,12 @@ export default function AlgorithmCard({ algorithm }: { algorithm: Algorithm }) {
2121

2222
return (
2323
<Card
24-
className={`AlgorithmCard__div elevateOnHover ${classes.stretchedCard}`}
24+
className={`elevateOnHover ${classes.stretchedCard}`}
2525
>
2626
<CardContent>
27-
<Breadcrumbs>
27+
<Breadcrumbs
28+
className={classes.breadcrumbs}
29+
>
2830
{algorithm.categories.map((category) => (
2931
<Typography
3032
variant="h6"

components/algorithmsList/algorithmCard/style.module.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,8 @@
4242
flex-direction: column;
4343
justify-content: space-between;
4444
}
45+
46+
:global(html[lang=ar]) .breadcrumbs,
47+
:global(html[lang=ar]) .title {
48+
direction: ltr;
49+
}

components/jumbo/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ export default function Jumbo() {
6262
<SearchBar
6363
query={query}
6464
setQuery={setQuery}
65-
className="Jumbo_SearchBar__form"
65+
className={classes.Jumbo_SearchBar}
6666
/>
6767
</div>
6868
</div>

components/jumbo/style.module.css

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,3 +78,14 @@
7878
width: 400px;
7979
max-width: 100%;
8080
}
81+
82+
:global(html[lang=ar]) .Jumbo_SearchBar label[data-shrink]{
83+
left: unset;
84+
right: 0;
85+
transform: translate(-12px, 20px) scale(1);
86+
transform-origin: right;
87+
}
88+
89+
:global(html[lang=ar]) .Jumbo_SearchBar label[data-shrink=true]{
90+
transform: translate(-12px, 10px) scale(0.75);
91+
}

styles/globals.css

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ html {
55
scroll-padding-top: 100px;
66
}
77

8+
html[lang=ar] {
9+
direction: rtl;
10+
}
11+
812
html,
913
body,
1014
#__next {
@@ -128,25 +132,4 @@ html::-webkit-scrollbar {
128132

129133
html::-webkit-scrollbar-thumb {
130134
background: var(--scrollbar-thumb);
131-
}
132-
133-
/* styles for arabic language */
134-
html[lang=ar] {
135-
direction: rtl;
136-
}
137-
138-
html[lang=ar] .Jumbo_SearchBar__form label[data-shrink]{
139-
left: unset;
140-
right: 0;
141-
transform: translate(-12px, 20px) scale(1);
142-
transform-origin: right;
143-
}
144-
145-
html[lang=ar] .Jumbo_SearchBar__form label[data-shrink=true]{
146-
transform: translate(-12px, 10px) scale(0.75);
147-
}
148-
149-
html[lang=ar] .AlgorithmCard__div nav,
150-
html[lang=ar] .AlgorithmCard__div h2 {
151-
direction: ltr;
152135
}

0 commit comments

Comments
 (0)