0

A simple illustration of my problem

import {BsFillArrowRightCircleFill} from "react-icons/bs";

export default function Icon(){
    return <BsFillArrowRightCircleFill className='icon'/>;
}

In the CSS file, if I put

.icon {
   color: red;
}

it would work fine. But if I add a global style like this

* {
   color: yellow;
}
.icon {
   color: red;
}

then the color would stay yellow. I can't figure out why this selector doesn't work.

Veritas1832
  • 67
  • 3
  • 14

1 Answers1

1

Try Using the selector as:

    .icon{
          *{
             color: red;
           }
        }

Also visit this link and you'll learn more about it. How to Style React-Icons

Rafia Zafar
  • 363
  • 1
  • 13