Skip to content

Logo interactions don't work in some browsers #29

@bryanbraun

Description

@bryanbraun

Background:

The logo at the top of my website is an SVG and on each page load a randomly-selected script is run, applying a fun animated interaction to it (see more details here). Unfortunately most of these animations don't work in Firefox or IE. This isn't too serious because the fallback is a static image but it's still annoying.

The issues:

In Firefox:
The gradient interaction happens on logo hover, but the rest of the interactions don't take effect. I've confirmed that this is true regardless of which script is loaded.

In IE:
None of the interactions work except for the color changing on click (and even then, it's a solid color instead of the expected gradients).

The cause:

After some research, these issues are due to using the CSS transform and transition properties to animate elements. Firefox and IE browsers don't really support using these CSS attributes.

Possible solutions:

To fix these issues, we'd might be able to:

  • Rewrite the animations to use element.setAttributes('transform', 'translate(100, 100)'); OR
  • Somehow use CSS Keyframe animations (maybe add/remove a class on hover)? OR
  • Rapidly change the translate values using something like requestAnimationFrame.

Tip: If you work on this, you can do development using the /logo-dev url. Also, you can speed up development a lot by using incremental builds (jekyll serve --incremental).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions