CSS browser processing "transparent" in gradients

Although the CSS colors rgba(255,255,255,0) and rgba(0,0,0,0) are apparently the same, i.e. transparent , when viewed as simple colors, they affect intermediate colors in gradients:

 linear-gradient(left center, rgba(0,0,0,0), rgba(255,255,255,1)) 

This gives gray translucent tones between the two ends.

Now my questions are:

  • Do browsers automatically select the “correct” color for transparent or is it a fixed color (most likely “black transparent” or “white transparent”)?

  • Is it between browsers?

+6
source share
1 answer
+6
source

Source: https://habr.com/ru/post/896195/


All Articles