CARVIEW |
Select Language
HTTP/2 200
date: Wed, 08 Oct 2025 14:54:00 GMT
content-type: text/html
content-encoding: gzip
last-modified: Sat, 15 Jul 2023 03:16:32 GMT
cache-control: max-age=2592000, public
expires: Fri, 07 Nov 2025 14:54:00 GMT
vary: Accept-Encoding
access-control-allow-origin: *
x-request-id: 98b67894ee49755c
strict-transport-security: max-age=15552015; preload
x-frame-options: deny
x-xss-protection: 1; mode=block
cf-cache-status: MISS
set-cookie: __cf_bm=NY0d9NhHcedEXT2Ba6tW_3pEzZGkyMpPKtHO0psYF0U-1759935240-1.0.1.1-losHtExcHLz8EBwr9v6_PQkTNxzAMgaWoZcWRRaFwo7chIRcJHuF_J4rz6nQSVcWBy4p7L295UCAyz98l73t6iBtU8F3XvO83dnKIi1ftrw; path=/; expires=Wed, 08-Oct-25 15:24:00 GMT; domain=.w3.org; HttpOnly; Secure; SameSite=None
server: cloudflare
cf-ray: 98b67894ee49755c-BLR
alt-svc: h3=":443"; ma=86400
Re: [css3-flexbox] sign bug in the algo from Tab Atkins Jr. on 2012-07-09 (www-style@w3.org from July 2012)
Re: [css3-flexbox] sign bug in the algo
- From: Tab Atkins Jr. <jackalmage@gmail.com>
- Date: Mon, 9 Jul 2012 10:23:56 -0700
- To: Florian Rivoal <florianr@opera.com>
- Cc: "www-style@w3.org" <www-style@w3.org>
- Message-ID: <CAAWBYDB5gOFXAVrqtOLapW26YABqu5FdM9mpUX03+QDjuaornQ@mail.gmail.com>
On Thu, Jul 5, 2012 at 6:16 AM, Florian Rivoal <florianr@opera.com> wrote: > Math written in prose tends to be confusing, so maybe I am missing > something, but I think there is an error in the algorithm section "9.7. > Resolving Flexible Lengths" > > "If the free space is negative > For every item on the line, multiply its flex shrink ratio by its outer flex > base size, and note this as its scaled flex shrink ratio. Find the ratio of > the item's scaled flex shrink ratio to the sum of the scaled flex shrink > ratios of all items on the line. Set the item's main size to its flex base > size minus a fraction of the free space proportional to the ratio." > > If the free space is negative, a fraction of the free space proportional to > the ratio is negative too, since the ratio is positive. So flex base size > minus some negative thing would give a main size larger than the base size, > which can't be right when you have negative free space. > > So, unless I missed something somewhere, I suggest replacing the last > sentence of the paragraph quoted with either of the following 2 proposals: > > "Set the item's main size to its flex base size minus a fraction of the > absolute value of the free space proportional to the ratio." > > or > > "Set the item's main size to its flex base size plus a fraction of the free > space proportional to the ratio." Fixed. I went with the first wording to avoid any possible confusion. ~TJ
Received on Monday, 9 July 2012 17:24:43 UTC