- From: CSS Meeting Bot via GitHub <sysbot+gh@w3.org>
- Date: Wed, 21 May 2025 17:05:47 +0000
- To: public-css-archive@w3.org
The CSS Working Group just discussed `[css-borders] Add a 'hairline' border-width value`. <details><summary>The full IRC log of that discussion</summary> <Rossen8> https://github.com/w3c/csswg-drafts/issues/3720#issuecomment-2864297026<br> <lea> q+<br> <fantasai> TabAtkins: Options I see here: 1) hairline keyword to border-width and inside calc(), 2) add a hairline unit, 3) add a function, e.g. border-round() or env(hairline)<br> <emilio> q+<br> <fantasai> TabAtkins: benefit of keyword is it's easiest to write<br> <fantasai> TabAtkins: but downside is grammatical ambiguity means might not be able to use it everywhere easily, need to wrap in calc() some places<br> <fantasai> TabAtkins: The other two options don't have these downsides<br> <fantasai> TabAtkins: but several people don't like the usability of the unit, looks weird, I agree<br> <fantasai> TabAtkins: shortest option but funky<br> <fantasai> TabAtkins: Function might be the best way to go<br> <TabAtkins> env(hairline)<br> <fantasai> TabAtkins: Question of what is appropriate hairline is an environmental info, so my proposal is env(hairline)<br> <kizu> +1 to env(hairline)<br> <romain> Those that do want it as a unit can make one from the env() with the (unimplemented) custom unit feature.<br> <lea> q-<br> <Rossen8> ack emilio<br> <fantasai> emilio: My concern with env(hairline) is that it behaves differently with CSS zoom<br> <fantasai> emilio: You multiply by zoom, but as long as less than hairline, would be rounded to device hariline<br> <fantasai> emilio: whereas if you have a device hairline, get pixels, and zoom the pixels<br> <fantasai> emilio: zoom could make the hairline inviisble<br> <lea> Is env() allowed anywhere the other options would be?<br> <fantasai> TabAtkins: zooming down could shrink to invisibility, but could [missed]<br> <smfr> q+<br> <fantasai> emilio: if you had border: env(hairline) and something relies on that value to match, zooming out, the lengths would no longer match because borders are still rounded up<br> <fantasai> emilio: that's a subtle difference<br> <fantasai> emilio: considering everything, I think env(hairline) is the best option<br> <emilio> scribe+<br> <emilio> smfr: are you referring to non-scaling-stroke emilio?<br> <Rossen8> ack smfr<br> <emilio> ... I don't think we want that<br> <emilio> TabAtkins: not the explicit goal but if you have a sufficiently small length it can behave like that<br> <emilio> ... he's not asking for that as a goal<br> <lea> I wonder if it may make sense to figure out what a hairline should resolve to before we name it. E.g. if it resolves to a device pixel, that is a reasonable unit in itself. If it doesn't resolve to that, then I'm having trouble conceptualizing what it resolves to.<br> <lea> q+<br> <emilio> smfr: so if scale() is used it'd get thicker?<br> <emilio> TabAtkins: yeah that's not a question<br> <TabAtkins> it does not resolve to a specific device pixel, Lea<br> <emilio> fantasai: I think I'd prefer a border-round() function<br> <emilio> ... I'd call it pixel-round()<br> <emilio> ... I'd prefer to avoid giving the idea that it's possible to do your layout in device pixels<br> <Rossen8> ack fantasai<br> <Rossen8> ack lea<br> <fantasai> lea: 3 things<br> <fantasai> lea: not making it a unit makes sense if we only use multiple of one.<br> <fantasai> lea: env() seems to make sense... is it disallowed anywhere that could otherwise be allowed?<br> <fantasai> lea: would it make sense to figure out what a hairline resolves to?<br> <fantasai> lea: when would I use a hairline unit?<br> <fantasai> lea: I would conceptualize as a device pixel<br> <fantasai> lea: so as an author, I don't know, and it's too vague<br> <fantasai> lea: might make sense to figure that out first<br> <fantasai> +1 lea<br> <astearns> or could do an async<br> <fantasai> TabAtkins: we keep running out of time, so let's do this first next week<br> <fantasai> lea: Use cases for multiples if you need to match another element to width of element with hairline borders, might need 2x<br> <fantasai> lea: env() is allowed everywhere<br> <fantasai> s/lea/Tab/<br> <fantasai> s/lea/Tab/<br> <fantasai> TabAtkins: finally, what does it resolve to? It will resolve to some multiple of a device pixel, not necessarily 1. As screens become higher res, device pixels might be too small to be a reasonable hairline<br> <fantasai> Meeting closed.<br> </details> -- GitHub Notification of comment by css-meeting-bot Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3720#issuecomment-2898651758 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 21 May 2025 17:05:48 UTC