Skip to content

[css2?] Define when border rounding happens, and to which properties it applies #5210

Closed

Description

@emilio

Activity

  1. emilio commented on Jun 14, 2020

    @emilio
    CollaboratorAuthor

    Did some digging and Blink behavior is inherited from WebKit, but WebKit changed it to match Gecko in https://bugs.webkit.org/show_bug.cgi?id=156121.

  2. emilio commented on Jun 14, 2020

    @emilio
    CollaboratorAuthor

    cc @mrego who was touching border rounding in Blink recently.

  3. gsnedders commented on Jul 9, 2020

    @gsnedders
    Member

    On the whole this ties into the larger issue as to whether we should define rounding behaviour in CSS, which… we appear not to have an issue for?

  4. graouts commented on Mar 8, 2021

    @graouts
    Contributor

    I came across this trying to fix css-backgrounds/animations/border-width-interpolation.html for WebKit. This test should be changed to not test values where this behavior is somewhat undefined, filed WPT issue #27934.

  5. wangxianzhu commented on Jul 7, 2022

    @wangxianzhu

    Did some digging and Blink behavior is inherited from WebKit, but WebKit changed it to match Gecko in https://bugs.webkit.org/show_bug.cgi?id=156121.

    Blink diverged from WebKit more after https://codereview.chromium.org/2640143005 (support subpixel layout of borders, April 2017).

    Browser: Rounding in layout / Rounding in computed style:
    Firefox: Yes / Yes
    WebKit before April 2016: Yes / No
    WebKit after April 2016: Yes / Yes
    Blink before April 2017: Yes / No
    Blink after April 2017: No / No
    Possible future Blink change: Yes / Yes

  6. progers commented on Sep 29, 2022

    @progers
    Contributor

    Chromium is attempting to unify on the behavior used by Gecko and WebKit:
    blink-dev intent-to-ship: https://groups.google.com/a/chromium.org/g/blink-dev/c/0uq_S5p6uZg/m/ReHlihKaAwAJ
    chromium bug: https://crbug.com/1201762

  7. 19 remaining items

  8. css-meeting-bot commented on Nov 16, 2022

    @css-meeting-bot
    Member

    The CSS Working Group just discussed [css2?] Define when border rounding happens, and to which properties it applies, and agreed to the following:

    • RESOLVED: Add this definition to values-4 and evaluate new definition against existing test suite.
    The full IRC log of that discussion <astearns> topic: [css2?] Define when border rounding happens, and to which properties it applies
    <astearns> github: https://github.com//issues/5210
    <fantasai> -> https://github.com//issues/5210#issuecomment-1292794138
    <dandclark> dbaron: There have beeen differences in how border rounding works between impls.
    <dandclark> dbaron: ??? landed change to make Chromium match webkit, gecko.
    <dandclark> ...: we think border-rounding is interop now.
    <dandclark> ...: given this, and that there's dependency on it which may increase, we should spec it.
    <dandclark> ...: emilio opened this 2+ years ago, does he have anything to add?
    <dandclark> emilio: <missed>
    <dandclark> dbaron: In last comment I attempted to write definition in spec language. Other folks from other engines should look. If we're ok with it, lets move forward and try to spec it.
    <fantasai> -> https://github.com//issues/5210
    <dbaron> s/???/Traian/
    <dandclark> emilio: I was misreading, I think that definition is correct.
    <dandclark> astearns: This is matching existing tests?
    <dandclark> dbaron: Yes there are various tests. I think there are a bunch of wpt tests for this behavior.
    <dandclark> ...: I know when Trian was making chromium changes, making changes caused other engines to fail. Encouraged him to test only interoperable behavior.
    <dbaron> s/other engines to fail/Chromium to fail some existing tests/
    <astearns> ack fantasai
    <dandclark> asterns: Proposed resolution: Add this definition to spec and evaluate new definition against existing test suite.
    <dandclark> fantasai: Propose to add to values-4
    <dandclark> dbaron: <missed> I don't strongly about which spec, I leave to editors.
    <dandclark> asterns: Proposed resolution: Add this definition to values-4 and evaluate new definition against existing test suite.
    <dandclark> RESOLVED: Add this definition to values-4 and evaluate new definition against existing test suite.
    <dbaron> (and the issue should have links to the WPT PR)
  9. TKDev7 commented on Feb 27, 2023

    @TKDev7
    Contributor

    @emilio @dbaron @fantasai Would one of you guys do the edit? Or I'll try to open a PR.

  10. tabatkins commented on Feb 27, 2023

    @tabatkins
    Member

    Done! Sorry, the resolution came in while I was on birthday vacation, so I missed it.

  11. added
    Closed Accepted by CSSWG Resolution
    and removed on Feb 27, 2023
  12. TKDev7 commented on Feb 27, 2023

    @TKDev7
    Contributor

    @tabatkins Very nice! Thank you! Just 2 more things to mention:

    1 - You might want to look at #7473 and #2114 to see if they are still relevant after this change.

    2 - CSS Cascading and Inheritance says:

    A used value is in principle ready to be used, but a user agent may not be able to make use of the value in a given environment. For example, a user agent may only be able to render borders with integer pixel widths and may therefore have to approximate the used width.

    I think this needs a tweak since border widths are always integers now?

  13. tabatkins commented on Feb 27, 2023

    @tabatkins
    Member

    For 1, thanks, I've commented or closed, as appropriate.

    For 2, not necessarily - there's nothing in CSS requiring that a px is an integer multiple of device pixels, so that statement can still be reasonable. ^_^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Closed Accepted by CSSWG Resolutioncss-backgrounds-3css-values-4

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      Sponsor
      SponsoredKunjungi sekarang
      Promo