1. Forum
    1. Unresolved Threads
  2. Articles
  3. Members
    1. Recent Activities
    2. Users Online
    3. Team
    4. Search Members
  4. Blog
    1. Articles
  • Login
  • Register
  • Search
Everywhere
  • Everywhere
  • Articles
  • Forum
  • Blog Articles
  • Pages
  • More Options
  1. StageTwo - Deine Wohlfühloase

Blog Articles Tagged with “transition”

Search by Tags
FragSalat's Blog

How to fix CSS transition from JavaScript

Today I struggled with a weird behavior of CSS transitions. In some cases they worked and in some not. So I investigated a bit and could find a solution and even kind of an explanation :D My use case was a overlay element whose height should be animated via CSS transitions when opening and closing based on the content it has. The content itself was absolute positioned for several reasons and I had to get the height of all children every time they change. In a previous version the code kind of looked like this: (Code, 31 lines) When the overlay opens, it get's the height of it's children and the children notifies the container when their height changes in meanwhile. This worked very well so far but I wanted to decouple the opening logic from the special overlay to have a more generic overlay with dynamic content. This generic overlay should not know anything about the children it renders but it's height. So I introduced a `setHeight(int)` function to the Overlay, which can be…
FragSalat
May 16, 2018 at 6:14 PM
Like 1
0
There are no items at the moment.

Content

  • Blog Articles 1

Tags

  • ansluta
  • attiny84
  • aurelia
  • cc2500
  • ccs811
  • CSS
  • dht22
  • flux
  • google assistant
  • ikea
  • javascript
  • logging
  • logitech
  • lua
  • macro
  • memory leak
  • nodejs
  • phalcon
  • php
  • polymer
  • raspberry
  • rfm69
  • rust
  • smart home
  • sonos
  • state management
  • transition
  • web components
  1. Privacy Policy
  2. Legal Notice