change svg color in pseudo element

Solutions on MaxInterview for change svg color in pseudo element by the best coders in the world

showing results for - "change svg color in pseudo element"
Natalia
25 Jan 2016
1p:after {
2  width: 48px;
3  height: 48px;
4  display: inline-block;
5  content: '';
6  -webkit-mask: url(https://gist.githubusercontent.com/mmathys/fbbfbc171233a30e478ad5b87ec4f5d8/raw/cd9219e336b8f3b85579015bdce9665def091bb8/heart.svg) no-repeat 50% 50%;
7  mask: url(https://gist.githubusercontent.com/mmathys/fbbfbc171233a30e478ad5b87ec4f5d8/raw/cd9219e336b8f3b85579015bdce9665def091bb8/heart.svg) no-repeat 50% 50%;
8  -webkit-mask-size: cover;
9  mask-size: cover;
10}
11
12.red:after {
13  background-color: red;
14}
15
16.green:after {
17  background-color: green;
18}
19
20.blue:after {
21  background-color: blue;
22}