Skip to content

Latest commit

 

History

History
51 lines (33 loc) · 1.06 KB

keyframeslibrary.md

File metadata and controls

51 lines (33 loc) · 1.06 KB

rcs.keyframesLibrary

Methods

Plus methods of BaseLibrary:

fillLibrary

This will take your CSS file (as a string) and fills the library with all necessary information

** rcs.keyframesLibrary.fillLibrary(code)**

Parameters:

  • code <String>

Example:

const myCssFileWithKeyframes = '@keyframes move { from {} to {} }';

rcs.keyframesLibrary.fillLibrary(myCssFileWithKeyframes);

get

This will get a specific minified selector

rcs.keyframesLibrary.get(selector[, options])

Parameters:

  • selector <String>
  • options <Object> (optional):
    • origKeyframe <Boolean>: If true the input is the original keyframe so it will return the minified keyframe. Default: true

Example:

const rcs = require('rcs-core');

rcs.keyframesLibrary.set('move'); // sets to 'a'

rcs.keyframesLibrary.get('move'); // a
rcs.keyframesLibrary.get('a', { origKeyframe: false }); // move