GithubHelp home page GithubHelp logo

Style SVG children about astro-icon HOT 3 CLOSED

bytrangle avatar bytrangle commented on July 30, 2024
Style SVG children

from astro-icon.

Comments (3)

matthacksteiner avatar matthacksteiner commented on July 30, 2024 1

Sorry to hijacking this conversation - a real world example would be this:

<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 40 40">
    <rect fill="#000" width="38.25" height="38.25" x=".875" y=".875" stroke="#000" stroke-width="1.75" class="rect" rx="4.125" />
    <path fill="#000" d="m21.535 26.773 7.893-6.009v-1.422l-7.893-6.009v5.405H10.37v2.63h11.165v5.405Z" />
</svg>

How can we style only the path with fill="#aaa"?

from astro-icon.

stramel avatar stramel commented on July 30, 2024

Thanks for bringing this up. Can you provide some more details or perhaps an example showing the issue?

We have had a couple discussions about styling children before starting in #49. Let me know if you have a different issue.

from astro-icon.

stramel avatar stramel commented on July 30, 2024

should be the same way as in #49

svg path {
  fill: #aaa;
}

https://stackblitz.com/edit/github-ex6klk-31wfte?file=src/pages/index.astro

Closing as duplicate of #49

from astro-icon.

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.