简体   繁体   中英

How to override Chakra UI default CSS?

I have this Chakra UI component:

<Tag
   variant={'outline'}
   cursor={'pointer'}
   outline={'none'}
   className={`${styles.editProfileAvatarIconCamera} ri-camera-line`}
></Tag>

Which renders an outlined camera icon like this

在此处输入图像描述

Now I'd like to remove the outline. I tried to add outline={'none'} like the above, but it didn't work. In console I can see that Chakra CSS is always in the highest priority and overrides all other CSS.

How can I apply this custom CSS to the Tag component? I tried importing a SCSS file, but it's the same, overridden by Chakra default CSS.

What you can see there is a box-shadow not an outline :

<Tag
   variant={'outline'}
   cursor={'pointer'}
   boxShadow={'none'}
   className={`${styles.editProfileAvatarIconCamera} ri-camera-line`}
></Tag>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM