How to styling <progress> bar ???? #3921
Replies: 6 comments 8 replies
-
Here is one good explanation of how to style progress tag. |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
I've used this simple alternative: plugins: [
plugin(function ({addVariant}) {
addVariant('progress-unfilled', ['&::-webkit-progress-bar', '&']);
addVariant('progress-filled', ['&::-webkit-progress-value', '&::-moz-progress-bar', '&']);
})
] <progress
class="h-2 w-full progress-unfilled:bg-[#F2F2F2] progress-filled:bg-red-600"
value="70"
max="100"
>
70%
</progress> |
Beta Was this translation helpful? Give feedback.
-
I got sufficient information from your soul of heart. Thank you so much. |
Beta Was this translation helpful? Give feedback.
-
This might not be what you're looking for (and there might be accessibility reasons to stay with progress bar, although they can often be dealt with), but to get a progress bar to look and behave exactly as you want, it's easier to not pick a fight with 10+ subtly different browser implementations and make your own from scratch with Tailwind,
|
Beta Was this translation helpful? Give feedback.
-
i try to styling with tailwind but it does't work ?
Beta Was this translation helpful? Give feedback.
All reactions