Add custom scrollbar rules, improve CSS

This commit is contained in:
0x1eef 2023-10-30 01:01:40 -03:00
parent 48eda16678
commit aaea2cc7e6
10 changed files with 121 additions and 21 deletions

View file

@ -1,5 +1,5 @@
$black: #454545; $black: #454545;
$max-width: 856px; $max-width: 1024px;
html[lang="en"] { html[lang="en"] {
font-family: "Kanit Regular"; font-family: "Kanit Regular";
@ -43,24 +43,32 @@ body .root .content.theme {
} }
} }
nav { nav, div {
display: flex; display: flex;
flex-wrap: wrap;
justify-content: space-between; justify-content: space-between;
min-height: 35px; }
.react-select { nav {
.react-select {
display: flex; display: flex;
justify-content: center; flex-direction: row;
align-items: center;
} }
.react-select.theme { .react-select.theme {
min-width: 35px; justify-content: flex-start;
} }
.react-select.language { .react-select.language {
justify-content: flex-end;
min-width: 70px; min-width: 70px;
text-align: right; text-align: right;
li { font-family: "Kanit Regular"; } ul li {
align-items: flex-start;
font-family: "Kanit Regular";
}
}
.br {
width: 100%;
} }
} }
} }
@ -92,6 +100,10 @@ body .root .content.en {
h1 { h1 {
font-size: x-large; font-size: x-large;
} }
header {
nav, div {
}
}
} }
body .root .content.ar { body .root .content.ar {

View file

@ -0,0 +1,11 @@
.content.theme {
ul.body {
scrollbar-width: thin;
/* Chrome, Edge and Safari */
&::-webkit-scrollbar {
height: 10px;
width: 15px;
}
}
}

View file

@ -4,10 +4,9 @@
flex-direction: column; flex-direction: column;
height: 20px; height: 20px;
z-index: 1; z-index: 3;
.selected-option { .selected-option {
z-index: 2;
cursor: pointer; cursor: pointer;
} }
@ -24,13 +23,12 @@
width: 100%; width: 100%;
font-weight: normal; font-weight: normal;
cursor: pointer; cursor: pointer;
background: #fff;
} }
} }
.react-select.language { .react-select.language {
display: flex; align-items: flex-start;
align-items: flex-end;
flex-direction: column-reverse;
.selected-option.ar { .selected-option.ar {
font-size: large; font-size: large;
@ -43,7 +41,7 @@
align-items: center; align-items: center;
justify-content: center; justify-content: center;
font-size: medium; font-size: medium;
min-height: 35px; height: 30px;
min-width: 125px; min-width: 125px;
} }
@ -54,7 +52,7 @@
li.ar { li.ar {
display: flex; display: flex;
align-items: flex-start; align-items: center;
justify-content: end; justify-content: end;
font-family: "Amiri Quran Regular"; font-family: "Amiri Quran Regular";
font-size: large; font-size: large;
@ -96,8 +94,7 @@
.react-select.language { .react-select.language {
ul { ul {
li.en { li.en {
display: flex; display: none;
visibility: hidden;
} }
} }
} }
@ -105,13 +102,16 @@
.content.theme.ar { .content.theme.ar {
.react-select.language { .react-select.language {
.selected-option {
line-height: 0;
}
ul { ul {
li { li {
align-items: center;
justify-content: flex-end; justify-content: flex-end;
} }
li.ar { li.ar {
display: flex; display: none;
visibility: hidden;
} }
} }
} }

View file

@ -1,8 +1,13 @@
@import "layout"; @import "layout";
@import "components/Select"; @import "components/Select";
@import "components/Icon"; @import "components/Icon";
@import "components/Scrollbar";
body .root .content.theme { body .root .content.theme {
header {
height: 12vh;
}
ul.body.index { ul.body.index {
li.surah a { li.surah a {
display: flex; display: flex;

View file

@ -1,6 +1,7 @@
@import "layout"; @import "layout";
@import "components/Select"; @import "components/Select";
@import "components/Icon"; @import "components/Icon";
@import "components/Scrollbar";
.root .content.theme { .root .content.theme {
ul.body.stream { ul.body.stream {
@ -51,6 +52,11 @@
} }
.content.theme.en { .content.theme.en {
header {
nav {
height: 4vh;
}
}
ul.body.stream { ul.body.stream {
li { padding: 10px 0 0 0; } li { padding: 10px 0 0 0; }
} }

View file

@ -3,6 +3,7 @@
@import "blue/pages/SurahStream"; @import "blue/pages/SurahStream";
@import "blue/components/Select"; @import "blue/components/Select";
@import "blue/components/Icon"; @import "blue/components/Icon";
@import "blue/components/Scrollbar";
.root .content.theme.blue.ar { .root .content.theme.blue.ar {
direction: rtl; direction: rtl;

View file

@ -0,0 +1,32 @@
.content.theme.blue {
ul.body {
@import "themes/blue/colors";
scrollbar-color: $blue1;
::-webkit-scrollbar-track {
border-radius: 5px;
background-color: #FFF;
}
::-webkit-scrollbar-track:hover {
background-color: lighten($blue1, 35%);
}
::-webkit-scrollbar-track:active {
background-color: lighten($blue1, 35%);
}
::-webkit-scrollbar-thumb {
border-radius: 5px;
background-color: $blue1;
}
::-webkit-scrollbar-thumb:hover {
background-color: blue1;
}
::-webkit-scrollbar-thumb:active {
background-color: $blue1;
}
}
}

View file

@ -3,6 +3,7 @@
@import "green/pages/SurahStream"; @import "green/pages/SurahStream";
@import "green/components/Select"; @import "green/components/Select";
@import "green/components/Icon"; @import "green/components/Icon";
@import "green/components/Scrollbar";
.root .content.theme.green.ar { .root .content.theme.green.ar {
@import "green/colors"; @import "green/colors";

View file

@ -0,0 +1,32 @@
.content.theme.green {
ul.body {
@import "themes/green/colors";
scrollbar-color: $green1;
::-webkit-scrollbar-track {
border-radius: 5px;
background-color: #FFF;
}
::-webkit-scrollbar-track:hover {
background-color: #FFF;
}
::-webkit-scrollbar-track:active {
background-color: #FFF;
}
::-webkit-scrollbar-thumb {
border-radius: 5px;
background-color: $green1;
}
::-webkit-scrollbar-thumb:hover {
background-color: $green1;
}
::-webkit-scrollbar-thumb:active {
background-color: $green1;
}
}
}

View file

@ -36,7 +36,7 @@ export function Select({ value, children, onChange, className }: Props) {
> >
{selectedOption.props.children} {selectedOption.props.children}
</span> </span>
<div className="br" />
<ul hidden={!open}> <ul hidden={!open}>
{children.map((option: JSX.Element, key: number) => { {children.map((option: JSX.Element, key: number) => {
return ( return (