Giter VIP home page Giter VIP logo

Comments (5)

endigo9740 avatar endigo9740 commented on July 24, 2024 2

@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 class={classesControlCaret} carried through, even though that should have been removed. You can see the new home for those styles is now applied to a wrapping div elements here:

<div class="accordion-summary-caret {classesControlCaret}">{@html svgCaretIcon}</div>

If for some reason you need access to to style the SVG element itself, this is already possible using this Tailwind syntax:
https://www.skeleton.dev/docs/styling#tailwinds-arbitrary-variants

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.
https://www.skeleton.dev/components/accordions#custom-icons

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.

from skeleton.

endigo9740 avatar endigo9740 commented on July 24, 2024 1

@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!

from skeleton.

salisshuaibu11 avatar salisshuaibu11 commented on July 24, 2024

@endigo9740 i would like to take this

from skeleton.

salisshuaibu11 avatar salisshuaibu11 commented on July 24, 2024

@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.

caretIcon

Considering that we're utilizing the "svgCaretIcon" constant in three different locations, is there a more optimal solution available?

from skeleton.

salisshuaibu11 avatar salisshuaibu11 commented on July 24, 2024

@endigo9740, incorporating the dollar sign label resolved the issue, although I'm uncertain if this is the most efficient approach.

$: svgCaretIcon = svg

from skeleton.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.