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
The problem
I use TailwindCSS with rcs-core. There is an ability to define a css property value between square brackets, but rcs.replace works incorrectly.
Example
CSS: .bottom-\[99999px\] {bottom: 99999px;}
HTML: <div class="bottom-[99999px]"></div>
Expected:
CSS: .a {bottom: 99999px;}
HTML: <div class="a"></div>
Actual result:
CSS: .a[99999px] {bottom: 99999px;} /* also, it's broken, because backslashes were removed */
HTML: <div class="bottom-[99999px]"></div>
I've also tried to exclude, but that didn't work either. Example:
rcs.selectorsLibrary.setExclude(/[A-z0-9-[.#]*]/g)
console.log("is excluded: bottom-[123px]", rcs.selectorsLibrary.isExcluded("bottom-[123px]")) // is excluded: bottom-[123px] true
console.log("is excluded: leading-none", rcs.selectorsLibrary.isExcluded("leading-none") // is excluded: leading-none false
The text was updated successfully, but these errors were encountered:
The code
The problem
I use TailwindCSS with rcs-core. There is an ability to define a css property value between square brackets, but
rcs.replace
works incorrectly.Example
CSS:
.bottom-\[99999px\] {bottom: 99999px;}
HTML:
<div class="bottom-[99999px]"></div>
Expected:
CSS:
.a {bottom: 99999px;}
HTML:
<div class="a"></div>
Actual result:
CSS:
.a[99999px] {bottom: 99999px;} /* also, it's broken, because backslashes were removed */
HTML:
<div class="bottom-[99999px]"></div>
I've also tried to exclude, but that didn't work either. Example:
The text was updated successfully, but these errors were encountered: