W3C home > Mailing lists > Public > public-css-archive@w3.org > May 2017

Re: [csswg-drafts] [css-images] Add easing functions to color stops

From: Amelia Bellamy-Royds via GitHub <sysbot+gh@w3.org>
Date: Mon, 08 May 2017 21:05:32 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-299990698-1494277531-sysbot+gh@w3.org>
To address @larsenwork's question, and also to synchronize with the mid-points syntax, maybe the easing function should be a separate item in the list.  You would *either* use a <timing-function> or a mid-point position

So, working from [the value definition in CSS Images 4](https://drafts.csswg.org/css-images-4/#color-stop-syntax) the full syntax for a `<color-stop-list>` would be:

<color-stop-list> =
  [ <linear-color-stop> [, <linear-color-hint>]? ]# , <linear-color-stop>
<linear-color-stop> = <color> && <color-stop-length>
<linear-color-hint> = [<length-percentage> | <animation-timing-function>]
<color-stop-length> = <length-percentage>{0,2}

In English: 
A color stop list is a comma-separated list of one or more color stops.  

Each color stop consists of a color value and an optional position value, or start and end positions values.

Each pair of consecutive color stops may optionally be separated by an interpolation instruction, which is also set off by commas.  The interpolation instruction may take one of two forms: 

- a mid-point position, which is defined in the same way as a color stop position, or 
- an interpolation function, which is identical to the timing functions defined in [CSS Timing Functions 1](https://drafts.csswg.org/css-timing-1/).


PS, If this goes ahead, CSS Timing Functions 1 should probably be changed to CSS Interpolation Functions or some other dimension-agnostic name.

GitHub Notification of comment by AmeliaBR
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1332#issuecomment-299990698 using your GitHub account
Received on Monday, 8 May 2017 21:05:39 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:12 UTC