Transitions when a conditional template becomes visible

151 views
Skip to first unread message

Ken Mori

unread,
Jul 8, 2014, 7:58:04 PM7/8/14
to polym...@googlegroups.com
Given conditional templates:

<template>
   <template if="{{myCondition}}">...</template>
   <template if="{{!myCondition}}">...</template>
</template>

What would be a way(s) to show a CSS transition when a template is added or removed based on myCondition?

Rob Dodson

unread,
Jul 8, 2014, 8:33:28 PM7/8/14
to Ken Mori, polymer-dev
Hm that's a good question. I'm not sure if you can use a CSS transition to move between those templates because, as I understand it, the content is immediately removed from the DOM once the condition is false.


Follow Polymer on Google+: plus.google.com/107187849809354688692
---
You received this message because you are subscribed to the Google Groups "Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to polymer-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/polymer-dev/ecfc6da8-c601-4873-9648-22b0be8849a9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Steve Orvell

unread,
Jul 9, 2014, 10:34:29 PM7/9/14
to Rob Dodson, Ken Mori, polymer-dev
There's not good support for this kind of thing right now but we will be adding it in the future. Here's a very basic approach: http://jsbin.com/qilixe/2/edit. I've filed an issue to help us track the feature:



Reply all
Reply to author
Forward
0 new messages