Javascript changing calc property in CSS unexpected output in Chrome -


expected output:

transform: translatex(calc(-100% / 3 * 1)); 

chrome:

transform: translatex(calc(-33.3333333333333%)); 

firefox:

transform: translatex(calc(-100% / 3 * 1)); 

snippet:

document.getelementbyid('block').style.transform = 'translatex(calc(-100% / 3 * 1))'
#block {    width: 200px;    height: 200px;    background: red;  }
<div id="block"></div>

it's not problem i'm curious why chrome way?
chrome calculate outcome before injects css?
if write in stylesheet doesn't this.


Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -