You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I'm trying to override the default styles using Tailwind CSS's arbitrary value classes, which look like this w-full h-[2rem]. This should simply make an element have width: 100% and height: 2rem, but it actually breaks simplebar when applying it to contentEl.
To Reproduce
Steps to reproduce the behavior:
Supply a class containing square brackets, like this: new SimpleBar(element, { classNames: { contentEl: 'h-[1rem]' }})
Check the console for an error:
Expected behavior
The class should be applied normally and simplebar shouldn't break.
Additional context
Seems like the classNamesToQuery function should be updated to add backslashes before any square brackets to make sure the query selector call works.
Your environment
Software
Version(s)
SimpleBar Vue
^2.3.3
Browser
Chrome Version 116.0.5845.187 (Official Build) (arm64)
npm/Yarn
pnpm 8.5.1
Operating System
Mac OS X Ventura 13.6
The text was updated successfully, but these errors were encountered:
Describe the bug
I'm trying to override the default styles using Tailwind CSS's arbitrary value classes, which look like this
w-full h-[2rem]
. This should simply make an element havewidth: 100%
andheight: 2rem
, but it actually breaks simplebar when applying it tocontentEl
.To Reproduce
Steps to reproduce the behavior:
new SimpleBar(element, { classNames: { contentEl: 'h-[1rem]' }})
Expected behavior
The class should be applied normally and simplebar shouldn't break.
Reproducible example
https://jsfiddle.net/usfneg90/4/
Additional context
Seems like the classNamesToQuery function should be updated to add backslashes before any square brackets to make sure the query selector call works.
Your environment
The text was updated successfully, but these errors were encountered: