Skip to main content
The 2024 Developer Survey results are live! See the results
Trademark capitalization; acronym capitalization; layout.
Source Link
David Buck
  • 3.8k
  • 35
  • 33
  • 36

It's possible to change the path fill color of the svg. See below for the CSS snippet:

  1. To apply the color for all the path: svg > path{ fill: red }

  2. To apply for the first d path: svg > path:nth-of-type(1){ fill: green }

  3. To apply for the second d path: svg > path:nth-of-type(2){ fill: green}

  4. To apply for the different d path, change only the path number:
    svg > path:nth-of-type(${path_number}){ fill: green}

  5. To support the CSS in Angular 2 to 8, use the encapsulation concept:

It's possible to change the path fill color of the svg. See below for the css snippet:

   1. To apply the color for all the path: svg > path{ fill: red }
   
   2. To apply for the first d path: svg > path:nth-of-type(1){ fill: green }
   
   3. To apply for the second d path: svg > path:nth-of-type(2){ fill: green}
   
   4. To apply for the different d path, change only the path number : svg > path:nth-of-type(${path_number}){ fill: green}

   5. To support the css in angular 2 to 8, use the encapsulation concept:
     :host::ng-deep svg path:nth-of-type(1){
            fill:red;
        }
Hope this will helps for your question.
It's possible to change the path fill color of the svg. See below for the css snippet:

   1. To apply the color for all the path: svg > path{ fill: red }
   
   2. To apply for the first d path: svg > path:nth-of-type(1){ fill: green }
   
   3. To apply for the second d path: svg > path:nth-of-type(2){ fill: green}
   
   4. To apply for the different d path, change only the path number : svg > path:nth-of-type(${path_number}){ fill: green}

   5. To support the css in angular 2 to 8, use the encapsulation concept:
     :host::ng-deep svg path:nth-of-type(1){
            fill:red;
        }
Hope this will helps for your question.

It's possible to change the path fill color of the svg. See below for the CSS snippet:

  1. To apply the color for all the path: svg > path{ fill: red }

  2. To apply for the first d path: svg > path:nth-of-type(1){ fill: green }

  3. To apply for the second d path: svg > path:nth-of-type(2){ fill: green}

  4. To apply for the different d path, change only the path number:
    svg > path:nth-of-type(${path_number}){ fill: green}

  5. To support the CSS in Angular 2 to 8, use the encapsulation concept:

:host::ng-deep svg path:nth-of-type(1){
        fill:red;
    }
Source Link
Rohinibabu
  • 678
  • 11
  • 16

It's possible to change the path fill color of the svg. See below for the css snippet:

   1. To apply the color for all the path: svg > path{ fill: red }
   
   2. To apply for the first d path: svg > path:nth-of-type(1){ fill: green }
   
   3. To apply for the second d path: svg > path:nth-of-type(2){ fill: green}
   
   4. To apply for the different d path, change only the path number : svg > path:nth-of-type(${path_number}){ fill: green}

   5. To support the css in angular 2 to 8, use the encapsulation concept:
     :host::ng-deep svg path:nth-of-type(1){
            fill:red;
        }
Hope this will helps for your question.