gradints / gradints/tailwindcss-scrollbar

Support Tailwindcss v4

Open
#7 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
25
Forks
0
PR merge metrics
No merged PRs in 30d

Description

Currently the plugin works out of the box with the new `@plugin` directive. 👍

```
@plugin '@gradin/tailwindcss-scrollbar';
```

But I can't find a way to customize the value of the plugin without the Tailwind config file.
Since v4 now recommends to not use config file anymore, I need to make it support the new `@utility` and CSS variables via `@theme`.

```
// WIP v4 config
@theme {
--scrollbar-size: 5px; // width or height, default '5px'
--scrollbar-track-background: lightgray; // default '#f1f1f1'
--scrollbar-thumb-background: var(--color-gray-400); // default '#c1c1c1'
--scrollbar-thumb-border-radius: 40px; // default '40px'
--scrollbar-thumb-hover-background: darkgray; // default '#a8a8a8'
--scrollbar-thumb-hover-border-radius: 40px; // default '40px'

/* Other CSS attribute needs to be added manually yourself */
::-webkit-scrollbar-track {
// add any css attributes here
}
::-webkit-scrollbar-thumb {
// add any css attributes here
}
::-webkit-scrollbar-thumb:hover {
// add any css attributes here
}
}
```

It's almost 2 years since I touch this code, I need to remember all the workflow to update and publish it to npmjs.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.