DocumentationAll ComponentsContact usChangelog

Flex layout subsampling issue

Description

Small pixel-wide elements within a flex layout sometimes render incorrectly and appear smaller or larger than intended. Depending on the operating system and browser, this error only occurs when the browser is zoomed. (Some Windows laptops have the default zoom enabled at 125% or 150%, causing browsers to display this issue without additional browser zoom) This has been revealed in issue #598353.

Example

Slider scale without issue:

Slider without scale issues

Slider scale with issue:

Slider with scale issues

References and Resources

TODO: Find documentation/references for this bug

Note: This could be a browser error or even intended behavior.

Possible workarounds

We resolved the issue in case of #598353 by separating the ticks from the flexbox position and size controls. We did this using only the items positioned in the flexbox as a positioning grid with no display properties. Each of these elements has been given an absolutely positioned child pseudo element with ::before that contains which included the visuals. In order to give the pseudo elements an exact width of 1px, we didn't give them a width and background color, but instead a 1px wide border in the color of the intended element color. Sadly this fix doesn't work in Firefox.