Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7800925
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T00:47:34+00:00 2026-06-02T00:47:34+00:00

Another question about SVG style transitions… :) This time I’m trying to transition the

  • 0

Another question about SVG style transitions… 🙂

This time I’m trying to transition the font-size on a text element. It works fine until I increase the page zoom in Chrome. Once I do that it appears that at the start of the transition it sets the size down to the original zoom size before transitioning to the correct outcome size. The result is that I see the font-size flick smaller for a split second before growing larger.

With the default zoom the transition looks smooth. Other browsers don’t seem to have this issue.

Wondering if I can try my luck again with some style-setting trick that will work more reliably across browsers…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T00:47:35+00:00Added an answer on June 2, 2026 at 12:47 am

    This is happening because D3’s style transitions use getComputedStyle to retrieve the starting value to be interpolated. See here for more information. When WebKit’s full-page zoom is being used, this will return different starting values for the transition. This disparity is limited to certain cases including font-size, which is why you probably won’t see it elsewhere.

    In fact, after .style("font-size", A), retrieving via .style("font-size") isn’t guaranteed to return the value A that was set when a full-page zoom is in use.

    I have used the following workaround for this in the past:

    .styleTween("font-size", function(d) {
      return d3.interpolate(
        this.style.getPropertyValue("font-size"),
        d.size + "px"
      );
    });
    

    This overrides D3’s use of getComputedStyle and retrieves the current font-size style directly (and assumes there is a font-size already set e.g. in your .enter() selection).

    Again, my word cloud experience came in handy. 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I had another question about this issue, but I didn't ask properly, so here
(this is related to another question about implementation on iPhone) I have a large
This question arose when I was working on answering another question about best practices
In another question I asked about alignment this was given to me to answer
This is not another question about 'How Can I Sort Dynamically (based on an
I borrowed this from another question about fragmentation, but I'm not bothered by that.
I have already posted another question about this, but no one seemed to know
This is a continuation of another question about efficiently getting quasi-random numbers. I need
I was trying to answer another question about the == operator and I created
I thought there would be another question about this but I was unable to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.