css transition dont work if trasformed value has no value

RESOLVED DUPLICATE of bug 571344

Status

()

Core
CSS Parsing and Computation
RESOLVED DUPLICATE of bug 571344
4 years ago
4 years ago

People

(Reporter: uleming, Unassigned)

Tracking

22 Branch
x86_64
Windows 7
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

4 years ago
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:22.0) Gecko/20100101 Firefox/22.0 (Beta/Release)
Build ID: 20130618035212

Steps to reproduce:

very simple example with just a single div on page with class .box
.box{
    height: 0px;
    background-color: #c93838;
    transition: height 2s;
}

.boxIn{
    height: 500px;
}


page has script 
document.body.onload(function(){
var cClass = document.getElementByName('div')[0].className;
document.getElementByName('div')[0].className = cClass + ' .boxIn';
})


Actual results:

there is no transition if no initial value assigned to height of div element
.box{
    height: 0px;   <---- important (comment this line and transition will disappear)

height will jump from 0 to 500px
Same will happen even if div has some content


only way to make transition work, assign initial height of div 


Expected results:

I am not sure what will say w3c about this. I thought that if div has no initial value than it has value which calculated by firefox depends on content in it. 
Now transited element style should have some initial value mandatory, which could be unknown. For example in case above, content of div generated dynamically an unknown at moment of transition.

Updated

4 years ago
Component: Untriaged → CSS Parsing and Computation
Product: Firefox → Core

Comment 1

4 years ago
Moved to same component as bug 726550
> I am not sure what will say w3c about this.

Per spec, there should be no transition here.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 571344
You need to log in before you can comment on or make changes to this bug.