Skip to content

Commit

Permalink
Change language dropdown to be similar to the theme dropdown
Browse files Browse the repository at this point in the history
Not yet perfect but a step in the right direction.
  • Loading branch information
0x1eef committed Oct 23, 2023
1 parent 84cdd13 commit 3abe18d
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 22 deletions.
83 changes: 61 additions & 22 deletions src/css/components/Select.scss
Original file line number Diff line number Diff line change
@@ -1,29 +1,68 @@
.react-select {
height: 20px;
z-index: 0;
.root .content.theme {
.react-select {
height: 20px;
z-index: 0;

.selected-option { cursor: pointer; }
.selected-option { cursor: pointer; }

ul {
position: relative;
margin: 0;
padding: 0;
background: #FFF;
list-style-type: none;
border: 1px solid #CCCCCC;
border-radius: 7px;
ul {
position: relative;
margin: 0;
padding: 0;
background: #FFF;
list-style-type: none;
}

ul li {
height: 100%;
width: 100%;
display: block;
font-weight: normal;
cursor: pointer;
}
}

ul li {
height: 100%;
width: 100%;
display: block;
font-weight: normal;
&:hover {
cursor: pointer;
background-color: lighten(#CCCCCC, 15%);
}
}
.react-select.language {
.selected-option.ar {
font-size: large;
}

ul {
li {
display: flex;
align-items: center;
justify-content: flex-end;
font-size: medium;
min-height: 35px;
}

li.en {
font-family: "Kanit Regular";
font-weight: normal;
}

li.ar {
display: flex;
align-items: flex-start;
justify-content: end;
line-height: 10px;
font-family: "Amiri Quran Regular";
font-size: large;
}
}
}
}

.content.theme.en {
.react-select.language {
ul li.en { display: none; }
}
}

.content.theme.ar {
.react-select.language {
ul li.ar { display: none; }
}
}

.react-select.theme {
Expand Down
6 changes: 6 additions & 0 deletions src/css/themes/blue/components/_Select.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,10 @@
.react-select.theme {
ul li.blue { display: none; }
}

.react-select.language ul {
li {
color: $blue1;
}
}
}
6 changes: 6 additions & 0 deletions src/css/themes/green.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,11 @@
@import "green/components/Icon";

.root .content.theme.green.ar {
@import "green/colors";

direction: rtl;
.react-select.language {
.selected-option { color: $green1; }
ul li { color: $green1; }
}
}

0 comments on commit 3abe18d

Please sign in to comment.