Strange "initial" values ​​in d3.js

By executing code similar to this ( d3.select(..).append("div")), I get divwith these style properties:

<div id="id6" 
  style="
    background-image: initial; 
    background-attachment: initial; 
    background-origin: initial; 
    background-clip: initial; 
    background-color: rgb(255, 255, 255); 
    background-position: initial initial; 
    background-repeat: initial initial; ">
5
</div>

Questions:

  • a) Where does it come from initial? b) Is it possible to override the "default values"?
  • Well, what does d3 put in properties with unnecessary values ?
  • Chrome says background-position: initial initial;and        background-repeat: initial initial; Invalid property values. Is this a d3 error? How can we deal with this error?
+3
source share
1 answer

This has nothing to do with D3, but with the implicit nature of CSS. When you specify a background property, the calculated values .

+5
source

All Articles