New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 623495 link

Starred by 6 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Feature



Sign in to add a comment

Support 0.5px borders with subpixels on high DPI devices

Project Member Reported by owe...@chromium.org, Jun 27 2016

Issue description

Problem: Native apps commonly have borders that are only 1 hardware pixel, and on a device with a 2.0 device pixel ratio, it would equal 0.5 CSS pixels. I'm told subpixels are supported all major browsers except Chrome (note I haven't verified), which makes supporting hairline pixels difficult, since Chrome sees border-width: 0.5px as invalid and doesn’t set a border at all.

Proposal: If subpixels cannot be easily supported, can a pixel width of 0.5px be rounded up to 1px instead of being invalid?

Assigning to reed for help triaging to the right person
 

Comment 1 by timloh@chromium.org, Jun 27 2016

I thought we rounded up non-zero border widths to 1px always?

Comment 2 by shans@chromium.org, Jun 28 2016

Status: Assigned (was: Untriaged)
non-zero border widths are already rounded up to 1px, can confirm.

owencm@: did you want to track a feature request for subpixel support or shall I close this?

Comment 3 by shans@chromium.org, Jun 28 2016

Components: -Internals>Skia
Labels: Needs-Feedback
Owner: ----
Status: Available (was: Assigned)
Status: WontFix (was: Available)
Needs-Feedback and no reply for more than 2 weeks.

Comment 5 by owe...@chromium.org, Oct 19 2016

Cc: dstockwell@chromium.org timloh@chromium.org shans@chromium.org reed@chromium.org
Labels: -Needs-Feedback
Status: Available (was: WontFix)
Summary: Support 0.5px borders with subpixels on high DPI devices (was: Support real 1px borders via 0.5px)
Sorry for slow reply. 

Yes, I believe subpixel support is important for building high polish web apps on modern devices.

This is a feature request to add support for 0.5px borders to be represented as a single pixel on high DPI devices.
Labels: Update-Quarterly
Style team needs to alter the data type for BorderValue widths to accommodate floating point values: https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/style/BorderValue.h?sq=package:chromium&dr&l=35

Comment 7 by ka...@opera.com, Mar 13 2017

Just for the record, floating point BorderValue width was landed in https://crrev.com/934becac5daa91ea979fb66e4ae21761ca11ebc9

The paint side of subpixel border has not been implemented, so currently, borders will always round to CSS pixels.

Comment 8 by ka...@opera.com, Mar 13 2017

Cc: ka...@opera.com
Labels: -Update-Quarterly

Comment 10 by ka...@opera.com, Feb 28 2018

Cc: -ka...@opera.com karloygard@chromium.org

Sign in to add a comment