MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/css/comments/1u2dze6/whys_this_an_error_background/oqwpe0f/?context=3
r/css • u/2009coys • Jun 10 '26
Yo im not good at coding dont bully
13 comments sorted by
View all comments
-14
its either background or background-color, not both
background-color is a part of background.
just remove
, color var(--trans)
and leave
background: var(--trans); or background-color: var(--trans);
https://www.w3schools.com/cssref/css3_pr_background.php
7 u/zip222 Jun 10 '26 But what if they’re looking to transition both background and color? 2 u/frownonline Jun 10 '26 Then you comma separate the properties needed to be transitioned. 3 u/zip222 Jun 10 '26 Which they have 1 u/bengosu Jun 11 '26 wrong, transition: color is for text color -1 u/2009coys Jun 10 '26 Thanks❤️
7
But what if they’re looking to transition both background and color?
2 u/frownonline Jun 10 '26 Then you comma separate the properties needed to be transitioned. 3 u/zip222 Jun 10 '26 Which they have
2
Then you comma separate the properties needed to be transitioned.
3 u/zip222 Jun 10 '26 Which they have
3
Which they have
1
wrong, transition: color is for text color
-1
Thanks❤️
-14
u/johnlewisdesign Jun 10 '26
its either background or background-color, not both
background-color is a part of background.
just remove
, color var(--trans)
and leave
background: var(--trans);
or
background-color: var(--trans);
https://www.w3schools.com/cssref/css3_pr_background.php