question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Blurry text at certain browser window zoom levels

See original GitHub issue

Description

The Tether module (used by the datepicker to position its popup calendar) uses CSS transforms to trigger GPU optimizations. Using these CSS transforms would result in blurry texts in certain zoom levels. (See Optimization section @ http://tether.io)

Here’s a pair of screenshots showing the difference (viewing https://hacker0x01.github.io/react-datepicker/ on [13" MBP, macOS Sierra - Chrome version 58 (Window @ 67% Zoom Level)]:

macos - chrome version 58 0 3029 110 64-bit

Proposed Solution

Thankfully, the guys at Hubspot implemented a prop for us to disable this.

<TetherComponent
  classPrefix={'react-datepicker__tether'}
  attachment={this.props.popoverAttachment}
  targetAttachment={this.props.popoverTargetAttachment}
  targetOffset={this.props.popoverTargetOffset}
  renderElementTo={this.props.renderCalendarTo}
  constraints={this.props.tetherConstraints}

  // *** exposing Tether's `optimizations` prop to the datepicker ***
  optimizations={this.props.tetherOptimizations}
>
  ...
</TetherComponent>

Disabling GPU optimization:

<DatePicker
  selected={this.state.startDate}
  onChange={this.handleChange}
  tetherOptimizations={{ gpu: false }}/>

I’ve made a fix on my end, would love to create a pull request for it! Really liked this library, would be great to get this patched on NPM asap so that we can use it for production =)

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:16 (10 by maintainers)

github_iconTop GitHub Comments

2reactions
martijnrusschencommented, Jun 22, 2017

Yeah would love to see a PR 👍

1reaction
FezVrastacommented, Jun 23, 2017

Popper.js roundes the offset values to avoid half pixels and prevent text blurring

Read more comments on GitHub >

github_iconTop Results From Across the Web

Blurry text when zooming in with Chrome
So I have this really weird issue on a page. The users need to be able to zoom out to make the text...
Read more >
Zoom & Resizing Text - Usability & Web Accessibility
It is also important to avoid providing images of text, as such text cannot be resized through text resizing, and may become blurry...
Read more >
Blurry Texts EVERYWHERE! (Especially the browsers)
Sometimes the texts are messed up (some are small and tiny, some are big). ... And below is how it is now at...
Read more >
Text becomes blurry in Chrome 33 on Windows 7, while using ...
zoom page to a non-default level, e.g. 125%; go to a pull request, then the Diff tab; scroll vertically with mouse or arrow...
Read more >
Page content blurry for some zoom levels if you transform ...
1. Change the zoom level to 0.7 using the input field 2. Notice text become blurry 3. Click on the "click me" button...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found