Re: [csswg-drafts] Proposal: Add an incremental syntax to CSS Gradients (#8616)

@Afif13 Yeah, either syntax would be good in my opinion— `+` or `shift()`.

Also, I just did some testing, and it looks like either `++50%` or `+(50%)` could be acceptable since neither are currently valid.

I thought `+(50%)` might be valid syntax already, but it appears to break the style as far as I can see. I'm not suggesting we strictly stick to one of these but rather than either of these could be acceptable uses.

This is pretty similar to how we can use properties on numbers in JS, for example:

```js
(5).toFixed(2)
5..toFixed(2)
```

Either of the above are valid, but `5.toFixed(2)` is not since a single dot without parentheses could be mistaken for a decimal delimiter.

Similarly in your proposal, a single sign could be valid outside parentheses, or two symbols adjacent without parentheses, which could be validly any combination:

* `++5px`
* `+-5px`
* `-+5px`
* `--5px`

And they each do different things, where the first sign dictates whether to add or remove the amount, and the second is the polarity of the actual number.

-- 
GitHub Notification of comment by brandonmcconnell
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/8616#issuecomment-1476338070 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Monday, 20 March 2023 14:29:17 UTC