{"id":22927210,"url":"https://github.com/hapytex/css-easings","last_synced_at":"2026-05-19T10:01:15.842Z","repository":{"id":36967868,"uuid":"247550798","full_name":"hapytex/css-easings","owner":"hapytex","description":"CSS easing strings in Haskell","archived":false,"fork":false,"pushed_at":"2022-07-04T13:15:59.000Z","size":12691,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-03-22T21:21:36.783Z","etag":null,"topics":["css","css-easing-functions","haskell"],"latest_commit_sha":null,"homepage":"https://css-easings.django-antipatterns.com/","language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hapytex.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-03-15T21:00:43.000Z","updated_at":"2022-07-04T12:03:51.000Z","dependencies_parsed_at":"2022-07-11T11:33:52.314Z","dependency_job_id":null,"html_url":"https://github.com/hapytex/css-easings","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hapytex%2Fcss-easings","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hapytex%2Fcss-easings/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hapytex%2Fcss-easings/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hapytex%2Fcss-easings/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hapytex","download_url":"https://codeload.github.com/hapytex/css-easings/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246666044,"owners_count":20814425,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["css","css-easing-functions","haskell"],"created_at":"2024-12-14T09:13:54.786Z","updated_at":"2025-09-23T13:21:54.012Z","avatar_url":"https://github.com/hapytex.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# css-easings\n\n[![Build Status of the package by GitHub actions](https://github.com/hapytex/css-easings/actions/workflows/build-ci.yml/badge.svg)](https://github.com/hapytex/css-easings/actions/workflows/build-ci.yml)\n[![Build Status of the package by Hackage](https://matrix.hackage.haskell.org/api/v2/packages/css-easings/badge)](https://matrix.hackage.haskell.org/#/package/css-easings)\n[![Hackage version badge](https://img.shields.io/hackage/v/css-easings.svg)](https://hackage.haskell.org/package/css-easings)\n\nA package that can be used to render CSS easing functions. One can use the\n`Easing` type to specify how the \"speed\" of a certain animation should be\nhandled in time.\n\nThis package can be used in other items, such as objects that are then converted\nto JSON to make it more safe, since it narrows the amount of possible css\nstrings to valid CSS easing functions.\n\nThe package documentation can be found on the [GitHub pages](https://hapytex.github.io/css-easings/).\n\n## Easing structure\n\nThere are two types of CSS easings:\n\n 1. A `steps(n, jump-term)` with *n* the number of steps, and *jump-term* the type of jump; and\n 2. A `quadratic-bezier(x1, y1, x2, y2)`\n    that works with a quaratic Bezier curve. Here both `x1` and `x2` need to between 0 and 1.\n\nThe type that we use for easings in this package is `Easing`.\n\nThere are four types of jumps: `jump-start`, `jump-end`, `jump-none`, and\n`jump-both`. `start` and `end` are aliasses for `jump-start` and `jump-end`\nrespectively. The type we use in this package for these is `JumpTerm`.\n\nBesides that, CSS has some aliasses for common easing types like `steps-start`,\n`steps-end`, `ease`, `linear`, `ease-in`, `ease-out`, and `ease-in-out`.\n\nPostCSS defines extra aliases like:\n\n 1. `easeInSine`, `easeOutSine`, and `easeInOutSine`;\n 2. `easeInQuad`, `easeOutQuad`, and `easeInOutQuad`;\n 3. `easeInCubic`, `easeOutCubic`, and `easeInOutCubic`;\n 4. `easeInQuant`, `easeOutQuant`, and `easeInOutQuant`;\n 5. `easeInQuint`, `easeOutQuint`, and `easeInOutQuint`;\n 6. `easeInExpo`, `easeOutExpo`, and `easeInOutExpo`;\n 7. `easeInCirc`, `easeOutCirc`, and `easeInOutCirc`; and\n 8. `easeInBack`, `easeOutBack`, and `easeInOutBack`.\n\nThese are also included as patterns in this project. When these are rendered,\nfor example as a JSON string, it will use the CSS equivalent.\n\n## `ToMarkup`, `ToJSON`, and `ToJavascript` instances\n\nBoth the `JumpTerm` and `Easing` type are members of the `ToMarkup`, `ToJSON`\nand `ToJavascript` type classes to convert the easings to their text equivalent.\n\nFor the `ToMarkup`, the CSS counterparts are just written to the markup stream,\nand thus *not* wrapped in a string literal. Since the possible easings do not\ncontain any characters that need to be escaped, there is no problem with\nescaping.\n\nFor both `ToJavascript` and `ToJSON` instances, the values are wrapped in a JSON\nstring, since in many Javascript libraries, one uses strings to update easings.\n\n## `Arbitrary` css easings\n\nOne can generate arbitrary `Easing`s and `JumpTerm`s. It is however not advisable to\nuse this for anything other than for validation purposes (like with `QuickCheck`).\n\n## `css-easings` is not *safe* Haskell\n\nThere are not extensions that are used that make the library *itself*\nunsafe, but it makes use of `aeson`, `blaze-markup`, etc. and the packages are\nnot safe. Hence this package is not *safe Haskell*.\n\n## Contribute\n\nYou can contribute by making a pull request on the [*GitHub\nrepository*](https://github.com/hapytex/css-easings).\n\nYou can contact the package maintainer by sending a mail to\n[`hapytexeu+gh@gmail.com`](mailto:hapytexeu+gh@gmail.com).\n\n---\n\nThis package is dedicated to *Nordin Allaert* (2001-2020), the son of a colleague. His life went in an `ease-in` manner, but was taken too soon.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhapytex%2Fcss-easings","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhapytex%2Fcss-easings","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhapytex%2Fcss-easings/lists"}