Skip to content

Commit b1d450a

Browse files
authored
Merge pull request #141 from Asifdotexe/140-css-improvement-webkit-only-scrollbar-styling
140 css improvement webkit only scrollbar styling
2 parents 7367a08 + 48fb932 commit b1d450a

6 files changed

Lines changed: 68 additions & 1406 deletions

File tree

_site/assets/css/style.css

Lines changed: 10 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -374,25 +374,9 @@ article.active {
374374
border-radius: 3px;
375375
}
376376

377-
.has-scrollbar::-webkit-scrollbar {
378-
width: 5px;
379-
/* for vertical scrollbar */
380-
height: 5px;
381-
/* for horizontal scrollbar */
382-
}
383-
384-
.has-scrollbar::-webkit-scrollbar-track {
385-
background: var(--onyx);
386-
border-radius: 5px;
387-
}
388-
389-
.has-scrollbar::-webkit-scrollbar-thumb {
390-
background: var(--vibrant-green);
391-
border-radius: 5px;
392-
}
393-
394-
.has-scrollbar::-webkit-scrollbar-button {
395-
width: 20px;
377+
.has-scrollbar {
378+
scrollbar-width: thin;
379+
scrollbar-color: var(--vibrant-green) var(--onyx);
396380
}
397381

398382
.content-card {
@@ -828,10 +812,7 @@ main {
828812
z-index: 20;
829813
pointer-events: none;
830814
visibility: hidden;
831-
}
832-
833-
.modal-container::-webkit-scrollbar {
834-
display: none;
815+
scrollbar-width: none;
835816
}
836817

837818
.modal-container.active {
@@ -1392,6 +1373,8 @@ main {
13921373
overflow: hidden;
13931374
box-shadow: 0 8px 16px hsla(0, 0%, 0%, 0.3);
13941375
transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
1376+
display: grid;
1377+
place-items: center;
13951378
}
13961379

13971380
.project-item>a:hover .project-img {
@@ -1419,9 +1402,6 @@ main {
14191402
background: var(--jet);
14201403
color: var(--vibrant-green);
14211404
position: absolute;
1422-
top: 50%;
1423-
left: 50%;
1424-
transform: translate(-50%, -50%);
14251405
font-size: 20px;
14261406
padding: 18px;
14271407
border-radius: 12px;
@@ -2281,9 +2261,7 @@ textarea.form-input::-webkit-resizer {
22812261
width: 700px;
22822262
}
22832263

2284-
.has-scrollbar::-webkit-scrollbar-button {
2285-
width: 100px;
2286-
}
2264+
22872265

22882266

22892267

@@ -2522,28 +2500,9 @@ textarea.form-input::-webkit-resizer {
25222500

25232501
/* RESET */
25242502

2525-
body::-webkit-scrollbar {
2526-
width: 20px;
2527-
}
2528-
2529-
body::-webkit-scrollbar-track {
2530-
background: var(--smoky-black);
2531-
}
2532-
2533-
body::-webkit-scrollbar-thumb {
2534-
border: 5px solid var(--smoky-black);
2535-
background: hsla(0, 0%, 100%, 0.1);
2536-
border-radius: 20px;
2537-
box-shadow: inset 1px 1px 0 hsla(0, 0%, 100%, 0.11),
2538-
inset -1px -1px 0 hsla(0, 0%, 100%, 0.11);
2539-
}
2540-
2541-
body::-webkit-scrollbar-thumb:hover {
2542-
background: hsla(0, 0%, 100%, 0.15);
2543-
}
2544-
2545-
body::-webkit-scrollbar-button {
2546-
height: 60px;
2503+
body {
2504+
scrollbar-color: hsla(0, 0%, 100%, 0.1) var(--smoky-black);
2505+
scrollbar-width: auto;
25472506
}
25482507

25492508
/* REUSED STYLE */
@@ -2966,31 +2925,7 @@ textarea.form-input::-webkit-resizer {
29662925
scrollbar-color: var(--jet) transparent;
29672926
}
29682927

2969-
#blog-modal::-webkit-scrollbar,
2970-
#blog-modal-body .codehilite::-webkit-scrollbar,
2971-
.blog-post-content .codehilite::-webkit-scrollbar {
2972-
width: 6px;
2973-
height: 6px;
2974-
}
2975-
2976-
#blog-modal::-webkit-scrollbar-track,
2977-
#blog-modal-body .codehilite::-webkit-scrollbar-track,
2978-
.blog-post-content .codehilite::-webkit-scrollbar-track {
2979-
background: transparent;
2980-
}
29812928

2982-
#blog-modal::-webkit-scrollbar-thumb,
2983-
#blog-modal-body .codehilite::-webkit-scrollbar-thumb,
2984-
.blog-post-content .codehilite::-webkit-scrollbar-thumb {
2985-
background: var(--jet);
2986-
border-radius: 10px;
2987-
}
2988-
2989-
#blog-modal::-webkit-scrollbar-thumb:hover,
2990-
#blog-modal-body .codehilite::-webkit-scrollbar-thumb:hover,
2991-
.blog-post-content .codehilite::-webkit-scrollbar-thumb:hover {
2992-
background: var(--light-gray-70);
2993-
}
29942929

29952930

29962931

_site/assets/css/style.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)