This fills
selectorLibrary,keyframesLibraryandcssVariablesLibrarywith all necessary information. Just put in your CSS code.
Note: Put your stylesheets in here before you call any rcs.replace method.
rcs.fillLibraries(code[, options])
Parameters:
-
code
<String>. The CSS with all selectors -
options
<Object>(optional):- codeType:
<'css' | 'html'>: Checks whether the code is HTML or CSS. Useful if your HTML code hasstyletags included. Default:css - ignoreCssVariables
<Boolean>: Iftrueit does ignore all CSS variables such as--my-variables. Default:false - ignoreAttributeSelectors
<Boolean>: Iftrueit does ignore all setted attribute selectors such as[class*=my]so.my_classwill be renamed. Default:false - replaceKeyframes
<Boolean>: Renames the names inanimation-nameoranimationif a specific@keyframeswas triggered before. Default:false - prefix
<String>. Prefix the compressed selector - suffix
<String>. Suffix the compressed selector
plus options of
selectorLibrary.setValue()- preventRandomName
<Boolean>. Does not rename the given selector. Good for just pre- or suffix the selectors. Default:false
- codeType: