Comments (8)
I think part of the confusion is the reference to "function" in level 1 is not referring to a CSS function but rather an easing function.
I don't quite understand the second proposal. The linear easing function needs to existing in level 1.
I think @tabatkins has been tweaking the definitions in level 2 recently so maybe he has thoughts on this.
from csswg-drafts.
I think part of the confusion is the reference to "function" in level 1 is not referring to a CSS function but rather an easing function.
I agree that is confusing.
from csswg-drafts.
Yeah, "easing function" is just existing terminology that's getting an unfortunate semantic conflict here. (It is a function semantically, as it maps an input to an output.)
Have you encountered anyone actually getting confused by this, @svgeesus, or is it just something you noticed?
from csswg-drafts.
The person being confused by it was myself, in the course of adding WPT annotations to Easing 1 and Easing 2 because
from csswg-drafts.
I still find the definition of the linear
keyword in Easing 2 to be simpler to understand:
The linear keyword produces a linear easing function with two points:
I was thinking the same definition (but without the link around "linear easing function" would be better in Easing 1. But if everyone else thinks it is perfectly clear as-is, then we can close this issue.
from csswg-drafts.
How about splitting the difference and having the definition be
The linear keyword produces a linear easing function whose output progress value is equal to the input progress value for all inputs[, i.e. the same function as ''linear(0, 1)''].
with the bracketed part only in L2?
p.s. Level 2 is really hard to read. Can we write specs for humans rather than compilers, please?
from csswg-drafts.
I think that is better, although the bracketed part is not strictly true:
Although this produces a linear easing function, uses of the keyword linear always serialize as-is, to linear. Whereas the function equivalent linear(0, 1) will serialize to linear(0 0%, 1 100%). These rules are in Serialization.
So it produces the same effect.
Can we write specs for humans rather than compilers, please?
I can see both sides of this. Some think this pseudocode algorithmic style is clearer. I don't, because it uses awkward constructs like "continue these steps" and so on that I would rather see expressed as sample code in a real language, so I can run it as well as read it.
I also see the POV where specifications should describe the result and not over-constrain the way it is implemented. This is the "reference implementations considered harmful" POV.
from csswg-drafts.
Yeah, I've been meaning to rewrite the algos a bit, when the pending Agenda+ issues about parsing are resolved.
from csswg-drafts.
Related Issues (20)
- window.styleMedia is deprecated draft version of window.matchMedia API that is not implemented in Firefox and will be removed from the web platform in future. HOT 1
- [css-view-transition] Using :has pseudo-class with groups
- [css-values-4][cssom] Proposal to allow retrieval of sub-pixel border values HOT 11
- [css-color][css-values] Parsing/Serialization behavior for rgb/hsl/hwb colors with calc() containing font/container/viewport relative lengths HOT 3
- Why there's no horizontal-rtl and horizontal-ltr values in the "Writing mode" property? HOT 11
- [css-text] text-transform note on "casing" is inaccurate HOT 2
- [css-typed-om] Is using a constructed expression of the form 1px/1px invalid as a <number> HOT 3
- [css-view-transitions-1] Should handle transition frame avoid calling "update pseudo-element styles" when all animations are paused? HOT 4
- [cssom-view-1] Provide onAnimationEnd callback in scrollIntoView options - Accidently closed?
- [overflow-5] Allowing markers to be active even when not scrollable to aligned position. HOT 1
- [css-shapes-2] Interpolation between `shape()` and `path()` needs more detail HOT 2
- [css-ui][css-sizing] Should resize respect with aspect-ratio?
- [css-inline-3] non-zero blocks should prevent text-box-trim propagation HOT 2
- Allow applying style rules to the container itself (especially with style querries) HOT 5
- [css-overflow] Should overflow-clip-margin apply to scrollable boxes? HOT 1
- [selectors] Shouldn't there be a pseudo selector for `:unchecked` inputs? HOT 4
- [css-borders][css-backgrounds] Interaction of `corner-shape` with `shape-outside` needs to be determined HOT 3
- [css-inline] Disallow `auto` in `text-box` shorthand HOT 2
- [css-text-4] [text-spacing-trim] Missing punctuations for Simplified Chinese (China)?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from csswg-drafts.