Skip to content

Commit 1b6fc71

Browse files
committed
✨ Add styles for scrollbar
1 parent 1c05443 commit 1b6fc71

File tree

4 files changed

+51
-4
lines changed

4 files changed

+51
-4
lines changed

README.md

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
</p>
2424

2525
> [!IMPORTANT]
26-
> This library is still in early development. New changes can break existing functionality, and no functionality should be considered final. The library will be considered stable once it reaches v1.0.
26+
> This library is still in early development. New changes can break existing functionality, and no functionality should be considered final at this stage. The library will be considered stable once it reaches v1.0.
2727
2828
---
2929
## Table of Contents
@@ -39,7 +39,7 @@
3939

4040
## Documentation
4141

42-
Full documentation coming soon on [webcoreui.dev/docs](https://webcoreui.dev/docs).
42+
Full documentation available on [webcoreui.dev](https://webcoreui.dev).
4343

4444
## Getting Started
4545

@@ -101,15 +101,35 @@ The `Setup` mixin can also accept the following options:
101101
| `includeResets` | `true` | Include reset styles. Set to `false` if you want to use your own CSS resets. |
102102
| `includeHelperClasses` | `true` | Adds global helper classes for CSS. All global helper classes are defined [here](https://github.com/Frontendland/webcoreui/tree/main/src/scss/global). |
103103
| `includeElementStyles` | `true` | Adds styles for native HTML elements, such as `code`, `pre`, or `ul`.
104+
| `includeTooltip` | `true` | Adds styles for using tooltips.
105+
| `includeScrollbarStyles` | `true` | Adds styles for scrollbars.
104106

105-
Default component styles can also be changed by overriding the following CSS variables:
107+
Default component styles can be changed by overriding the following CSS variables:
106108

107109
```css
108110
:root {
109111
--w-avatar-border: #000;
112+
--w-checkbox-color: #FFF;
113+
--w-progress-color: #FFF;
114+
--w-progress-background: #252525;
115+
--w-progress-stripe-light: #FFF;
116+
--w-progress-stripe-dark: #DDD;
117+
--w-radio-color: #FFF;
110118
--w-rating-color: #FFF;
111119
--w-rating-empty-color: #BBB;
112120
--w-rating-size: 18px;
121+
--w-spinner-color: #FFF;
122+
--w-spinner-width: 2px;
123+
--w-spinner-speed: 2s;
124+
--w-spinner-size: 30px;
125+
--w-spinner-dash: 8;
126+
--w-switch-off-color: #252525;
127+
--w-switch-on-color: #FFF;
128+
--w-timeline-color: #252525;
129+
--w-timeline-text-color: #FFF;
130+
--w-timeline-counter: decimal;
131+
--w-tooltip-background: #FFF;
132+
--w-tooltip-color: #000;
113133
}
114134
```
115135

src/scss/global.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
@import './global/elements.scss';
2+
@import './global/scrollbar.scss';
23
@import './global/tooltip.scss';
34
@import './global/utility.scss';

src/scss/global/scrollbar.scss

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
@import '../config';
2+
3+
@mixin Scrollbar() {
4+
::-webkit-scrollbar {
5+
width: 10px;
6+
height: 10px;
7+
}
8+
9+
::-webkit-scrollbar-track {
10+
border-radius: 5px;
11+
background-color: #111;
12+
cursor: pointer;
13+
}
14+
15+
::-webkit-scrollbar-thumb {
16+
border-radius: 5px;
17+
background-color: #252525;
18+
cursor: pointer;
19+
}
20+
}
21+

src/scss/setup.scss

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ $config: (
44
includeResets: true,
55
includeHelperClasses: true,
66
includeElementStyles: true,
7-
includeTooltip: true
7+
includeTooltip: true,
8+
includeScrollbarStyles: true
89
);
910

1011
:root {
@@ -51,6 +52,10 @@ $config: (
5152
@include Elements();
5253
}
5354

55+
@if (config('includeScrollbarStyles')) {
56+
@include Scrollbar();
57+
}
58+
5459
@if (config('includeTooltip')) {
5560
@include Tooltip();
5661
}

0 commit comments

Comments
 (0)