Runnick
Runnick

Reputation: 715

Style border-image svg (colors) from CSS?

Is it possible to style fill custom border-image from the css? Which property should I use?

E.g.

border-image-source:url('assets/images/dots_new.svg');
border-color: red; /* doesn’t work */
fill: red; /* doesn’t work */

Upvotes: 2

Views: 1086

Answers (1)

Paul LeBeau
Paul LeBeau

Reputation: 101800

No. It is not possible. The SVG is an external file and cannot be styled from the CSS in your page.

The best you can do is add the styling as a <style> block in your SVG. But of course, that means that you have to have one SVG file per colour combination.

Upvotes: 2

Related Questions