How can I create a background transition from HEX color to gradient and back?
My variable --base
is just white and the transition between HEX and gradient doesn't work.
:root {
--app: radial-gradient( circle 753.6px at 10% 20%, rgba(248,167,221,1) 0%, rgba(230,192,254,1) 41%, rgba(169,217,243,1) 90% );
--base: #FFFFFF; /* radial-gradient(#FFFFFF, #FFFFFF) */
}
body {
background: #DDD;
}
div {
height: 100px;
line-height: 100px;
text-align: center;
width: 300px;
background: var(--base);
transition: all 1s ease;
}
div:hover {
background: var(--app);
}
<div>test</div>
When i trying change --base to radial-gradient(#FFFFFF, #FFFFFF) so doesn't work too. Have anyone solution for this?