I noticed with today's Chrome 40 update that justify-content
does not seem to get properly overriden by subsequent style declarations.
See this fiddle for an example:
<div class="flex-parent">
<div class="flex-child"></div>
<div class="flex-child"></div>
</div>
and
.flex-parent {
display: flex;
position: absolute;
top: 0; right: 0; left: 0;
/*
IT SHOULD BE POSSIBLE TO SAFELY REMOVE
THESE TWO LINES BECAUSE THEY ARE OVERRIDEN:
*/
background: yellow;
justify-content: center;
}
.flex-parent {
/* Overriding background: it works! */
background: green;
/* Overriding justify-content: NOPE ;-( */
justify-content: space-between;
}
.flex-child {
width: 50px;
height: 50px;
margin: 10px;
background: skyblue;
}
Firefox (override works):
Chrome 40 (override seems to be broken):
Am I correct in my assumptions or do I horribly misunderstand CSS? Note that this doesn't have to do with prefixes: Chrome supports unprefixed justify-content
, and if it didn't work, there wouldn't be any difference when commenting out rules in first selector.
Update: filed as https://code.google.com/p/chromium/issues/detail?id=451387