Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "keyframes"

Index

Functions

Functions

at_keyframes

  • at_keyframes(id: string, stops: any): RuleFn
  • at_keyframes(id: string, from: any, to: any): RuleFn
  • Rule function for @keyframes. If a single declaration object is given, it's keys are used as keyframe stops and their values as their declarations objects. This way any number of stops can be specified.

    example
    css(at_keyframes("fadein", {0: {opacity: 0}, 100: {opacity: 1}}))
    // @keyframes fadein {
    //
    //     0% {
    //         opacity: 0;
    //     }
    //
    //     100% {
    //         opacity: 1;
    //     }
    //
    // }

    If called with two objects, the first one provides the declarations for the 0% keyframe and the 2nd for the 100% keyframe.

    example
    css(at_keyframes("fadein", {opacity: 0}, {opacity: 1}));
    // @keyframes fadein {
    //
    //     0% {
    //         opacity: 0;
    //     }
    //
    //     100% {
    //         opacity: 1;
    //     }
    //
    // }

    Parameters

    • id: string

      -

    • stops: any

      -

    Returns RuleFn

  • Parameters

    • id: string
    • from: any
    • to: any

    Returns RuleFn

Generated using TypeDoc