-
-
Notifications
You must be signed in to change notification settings - Fork 315
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Accordion caret classesControlCaret is repeated on SVG element #2586
Comments
@endigo9740 i would like to take this |
@endigo9740, I've reviewed the svgCaretIcon. Despite correcting the interpolation, the class remains undefined even though "classesControlCaret" is present. The solution was to embed the SVG directly into the HTML without passing it as a variable and utilizing the @html special tags. Considering that we're utilizing the "svgCaretIcon" constant in three different locations, is there a more optimal solution available? |
@endigo9740, incorporating the dollar sign label resolved the issue, although I'm uncertain if this is the most efficient approach.
|
@salisshuaibu11 thanks for diving into this. I'd say leave this one to me. I need to dive in an review the full context before I can provide an answer to how we should approach this. And by that time I can probably implement the adjustment directly just as quickly. I'll take all information above into consideration when I get to that point though! |
@Keagel @salisshuaibu11 after reviewing the source directly I see the issue here. It looks like the SVG was abstracted to a template literal to cleanup the template a bit. The
If for some reason you need access to to style the SVG element itself, this is already possible using this Tailwind syntax: For example: <AccordionItem classesControlCaret="[&>svg]:fill-red-500">...</AccordionItem> Alternatively, the caret region is actually a Svelte slot, which means you can replace the open and close icons with custom SVGs. Then adjust the styles as desired. That said, I'll go ahead and submit a quick change to remove the duplicate class on the SVG template literal now to close this out though. This should help avoid further confusion in the future. Expect this to go out as part of the next release of Skeleton v2. |
Current Behavior
Currently, the
classesControlCaret
class is being added to both the SVG element and its parent, but the one on the SVG element isn't interpolated. The behavior is unchanged as the caret still shows and rotates as it should.Reference:
skeleton/packages/skeleton/src/lib/components/Accordion/AccordionItem.svelte
Line 99 in 9efa964
Result:
Expected Behavior
No response
Steps To Reproduce
No response
Link to Reproduction / Stackblitz
No response
More Information
No response
The text was updated successfully, but these errors were encountered: