Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[css-transitions] 'display' influencing transition of other properties #1064

Open
SebastianZ opened this issue Feb 27, 2017 · 2 comments
Open
Labels
css-transitions-1 Current Work

Comments

@SebastianZ
Copy link
Contributor

display obviously has influence on the transitions of other properties and I'm wondering why that's the case. I.e. when the display value is changed on the transitioned rule, also the other properties are transitioned in a discrete way instead of respecting their related transitions.

I've created a simple example at CodePen illustrating this.

I can't seem to find anything in the spec. explaining this. Is that an implementation bug?

Sebastian

@birtles birtles added the css-transitions-1 Current Work label Feb 27, 2017
@birtles
Copy link
Contributor

birtles commented Jul 31, 2017

@SebastianZ
Copy link
Contributor Author

In #8174 we got a @starting-style rule which obviously covers the described use case.

In that issue it was claimed that display: none does not create a before-change style.

Currently, the related spec. text reads like this:

If an element is not in the document during that style change event or was not in the document during the previous style change event, then transitions are not started for that element in that style change event.

The phrasing "not in the document" seems at least vague, though, and doesn't reference what it means by "document". CSS Display 3 rather refers to "boxes" and the "box tree" and says that none doesn't generate any boxes.

So I believe both should refer to the same terminology if display: none is meant to not start transitions in style change events.

Though, of course, it would be even better if transitions of other properties were not affected by the value of display.

Sebastian

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
css-transitions-1 Current Work
Projects
None yet
Development

No branches or pull requests

2 participants