How I handle rgba() in styled-component - React App
source link: https://dev.to/mrpaulishaili/how-i-handle-rgba-in-styled-component-react-app-2jb1
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
How I handle rgba() in styled-component - React App
I get the hex code value of the rgba and paste this code in it's place and this fixes the problem.
Example:
const styledHeader = styled.header`
color: rgba(#000, .3);
`
Enter fullscreen mode
Exit fullscreen mode
This will not give the required result so I convert the rgba(#000, .3) into hex code value and get this:
const styledHeader = styled.header`
color: #0000004d;
`
Enter fullscreen mode
Exit fullscreen mode
Note:
I currently use the color picker tool in visual studio code, which works with a .css file, to get the hex code of the colors.
MR. PAUL ISHAILI
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK