| Maintainer | hapytexeu+gh@gmail.com |
|---|---|
| Stability | experimental |
| Portability | POSIX |
| Safe Haskell | None |
| Language | Haskell2010 |
Css.Easing
Description
A module to define css easing strings. These can be used in Julius, JSON, etc. templates to limit the easings to valid ones.
Synopsis
- data Easing
- steps :: Int -> JumpTerm -> Maybe Easing
- steps' :: Int -> JumpTerm -> Easing
- cubicBezier :: Scientific -> Scientific -> Scientific -> Scientific -> Maybe Easing
- cubicBezier' :: Scientific -> Scientific -> Scientific -> Scientific -> Easing
- easingToCss :: Easing -> Text
- easingToCssWithCssAliasses :: Easing -> Text
- jumpTermToCss :: JumpTerm -> Text
- data JumpTerm
- pattern Start :: JumpTerm
- pattern End :: JumpTerm
- pattern StepsStart :: Easing
- pattern StepsEnd :: Easing
- pattern Ease :: Easing
- pattern Linear :: Easing
- pattern EaseIn :: Easing
- pattern EaseOut :: Easing
- pattern EaseInOut :: Easing
- pattern EaseInSine :: Easing
- pattern EaseOutSine :: Easing
- pattern EaseInOutSine :: Easing
- pattern EaseInQuad :: Easing
- pattern EaseOutQuad :: Easing
- pattern EaseInOutQuad :: Easing
- pattern EaseInCubic :: Easing
- pattern EaseOutCubic :: Easing
- pattern EaseInOutCubic :: Easing
- pattern EaseInQuart :: Easing
- pattern EaseOutQuart :: Easing
- pattern EaseInOutQuart :: Easing
- pattern EaseInQuint :: Easing
- pattern EaseOutQuint :: Easing
- pattern EaseInOutQuint :: Easing
- pattern EaseInExpo :: Easing
- pattern EaseOutExpo :: Easing
- pattern EaseInOutExpo :: Easing
- pattern EaseInCirc :: Easing
- pattern EaseOutCirc :: Easing
- pattern EaseInOutCirc :: Easing
- pattern EaseInBack :: Easing
- pattern EaseOutBack :: Easing
- pattern EaseInOutBack :: Easing
Easing patterns
A type that describes the different types of css-easings (also known as "transition timing functions"). There are basically two modes: Steps and CubicBeziers.
Constructors
| Steps Int JumpTerm | Displays the transition along n stops along the transition, displaying each stop for equal lengths of time. For example, if n is 5, there are 5 steps. Whether the transition holds temporarily at 0%, 20%, 40%, 60% and 80%, on the 20%, 40%, 60%, 80% and 100%, or makes 5 stops between the 0% and 100% along the transition, or makes 5 stops including the 0% and 100% marks (on the 0%, 25%, 50%, 75%, and 100%) depends on which of the |
| CubicBezier Scientific Scientific Scientific Scientific | An author defined cubic-Bezier curve, where the p1 and p3 values must be in the range of 0 to 1. |
Instances
cubicBezier :: Scientific -> Scientific -> Scientific -> Scientific -> Maybe Easing Source #
Constructs a CubicBezier given that the first and third value are between 0.0 and 1.0. If that is the case, it returns a Just that wraps the Easing. Otherwise Nothing is returned.
cubicBezier' :: Scientific -> Scientific -> Scientific -> Scientific -> Easing Source #
Constructs a CubicBezier given the first and third value are between 0.0 and 1.0. If this is the case, it returns that Easing, otherwise it will raise an error.
Convert to css
Convert an Easing to its css counterpart. The css aliases like "steps-start" are not checked. Therefore, only strings like "steps(..)" and cubic-bezier(..)@ are returned.
easingToCssWithCssAliasses Source #
Convert an Easing to its css counterpart. The css aliases like "steps-start" are checked, and if they match, the alias is returned.
Jump terms
A type that is used to describe how the jumps are done in a Steps construction.
Constructors
| JumpStart | In css this is denoted as |
| JumpEnd | In css this is denoted as |
| JumpNone | In css this is denoted as |
| JumpBoth | In css this is denoted as |
Instances
| Bounded JumpTerm Source # | |
| Enum JumpTerm Source # | |
| Eq JumpTerm Source # | |
| Data JumpTerm Source # | |
Defined in Css.Easing Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> JumpTerm -> c JumpTerm # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c JumpTerm # toConstr :: JumpTerm -> Constr # dataTypeOf :: JumpTerm -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c JumpTerm) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c JumpTerm) # gmapT :: (forall b. Data b => b -> b) -> JumpTerm -> JumpTerm # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> JumpTerm -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> JumpTerm -> r # gmapQ :: (forall d. Data d => d -> u) -> JumpTerm -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> JumpTerm -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> JumpTerm -> m JumpTerm # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> JumpTerm -> m JumpTerm # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> JumpTerm -> m JumpTerm # | |
| Ord JumpTerm Source # | |
Defined in Css.Easing | |
| Read JumpTerm Source # | |
| Show JumpTerm Source # | |
| Generic JumpTerm Source # | |
| Arbitrary JumpTerm Source # | |
| ToJSON JumpTerm Source # | |
Defined in Css.Easing | |
| ToMarkup JumpTerm Source # | |
Defined in Css.Easing | |
| Default JumpTerm Source # | |
Defined in Css.Easing | |
| NFData JumpTerm Source # | |
Defined in Css.Easing | |
| ToJavascript JumpTerm Source # | |
Defined in Css.Easing Methods toJavascript :: JumpTerm -> Javascript # | |
| type Rep JumpTerm Source # | |
Defined in Css.Easing type Rep JumpTerm = D1 ('MetaData "JumpTerm" "Css.Easing" "css-easings-0.2.3.0-D0TzH7kVw0jDVC8weS4IrL" 'False) ((C1 ('MetaCons "JumpStart" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "JumpEnd" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "JumpNone" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "JumpBoth" 'PrefixI 'False) (U1 :: Type -> Type))) | |
pattern Start :: JumpTerm Source #
A pattern that defines the css alias start that is equal to jump-start.
Standard easing aliasses
pattern StepsStart :: Easing Source #
A pattern that defines the css alias steps-start that is equal to steps(1, jump-start).
pattern StepsEnd :: Easing Source #
A pattern that defines the css alias steps-end that is equal to steps(1, jump-end).
pattern Ease :: Easing Source #
A pattern that defines the css alias ease that is equal to cubic-bezier(0.25, 0.1, 0.25, 1).
pattern Linear :: Easing Source #
A pattern that defines the css alias linear that is equal to cubic-bezier(0, 0, 1, 1).
pattern EaseIn :: Easing Source #
A pattern that defines the css alias ease-in that is equal to cubic-bezier(0.42, 0, 1, 1).
pattern EaseOut :: Easing Source #
A pattern that defines the css alias ease-out that is equal to cubic-bezier(0, 0, 0.58, 1).
pattern EaseInOut :: Easing Source #
A pattern that defines the css alias ease-in-out that is equal to cubic-bezier(0.42, 0, 0.58, 1).
PostCSS easing aliasses
pattern EaseInSine :: Easing Source #
A pattern that defines the PostCSS easing pattern easeInSine.
pattern EaseOutSine :: Easing Source #
A pattern that defines the PostCSS easing pattern easeOutSine.
pattern EaseInOutSine :: Easing Source #
A pattern that defines the PostCSS easing pattern easeInOutSine.
pattern EaseInQuad :: Easing Source #
A pattern that defines the PostCSS easing pattern easeInQuad.
pattern EaseOutQuad :: Easing Source #
A pattern that defines the PostCSS easing pattern easeOutQuad.
pattern EaseInOutQuad :: Easing Source #
A pattern that defines the PostCSS easing pattern easeInOutQuad.
pattern EaseInCubic :: Easing Source #
A pattern that defines the PostCSS easing pattern easeInCubic.
pattern EaseOutCubic :: Easing Source #
A pattern that defines the PostCSS easing pattern easeOutCubic.
pattern EaseInOutCubic :: Easing Source #
A pattern that defines the PostCSS easing pattern easeInOutCubic.
pattern EaseInQuart :: Easing Source #
A pattern that defines the PostCSS easing pattern easeInQuart.
pattern EaseOutQuart :: Easing Source #
A pattern that defines the PostCSS easing pattern easeOutQuart.
pattern EaseInOutQuart :: Easing Source #
A pattern that defines the PostCSS easing pattern easeInOutQuart.
pattern EaseInQuint :: Easing Source #
A pattern that defines the PostCSS easing pattern easeInQuint.
pattern EaseOutQuint :: Easing Source #
A pattern that defines the PostCSS easing pattern easeOutQuint.
pattern EaseInOutQuint :: Easing Source #
A pattern that defines the PostCSS easing pattern easeInOutQuint.
pattern EaseInExpo :: Easing Source #
A pattern that defines the PostCSS easing pattern easeInExpo.
pattern EaseOutExpo :: Easing Source #
A pattern that defines the PostCSS easing pattern easeOutExpo.
pattern EaseInOutExpo :: Easing Source #
A pattern that defines the PostCSS easing pattern easeInOutExpo.
pattern EaseInCirc :: Easing Source #
A pattern that defines the PostCSS easing pattern easeInCirc.
pattern EaseOutCirc :: Easing Source #
A pattern that defines the PostCSS easing pattern easeOutCirc.
pattern EaseInOutCirc :: Easing Source #
A pattern that defines the PostCSS easing pattern easeInOutCirc.
pattern EaseInBack :: Easing Source #
A pattern that defines the PostCSS easing pattern easeInBack.
pattern EaseOutBack :: Easing Source #
A pattern that defines the PostCSS easing pattern easeOutBack.
pattern EaseInOutBack :: Easing Source #
A pattern that defines the PostCSS easing pattern easeInOutBack.