src/utils/inject-style.js
function createMarkupOnPseudoClass(pseudoClasses, id, disabled) {
  return mapObject(pseudoClasses, (style, pseudoClass) => {
    if (style && Object.keys(style).length > 0) {
      const styleString = CSSPropertyOperations.createMarkupForStyles(style);
      const styleWithImportant = styleString.replace(/;/g, ' !important;');

      return disabled ?
        `.${id}[disabled]:${pseudoClass} {${styleWithImportant}}` :
        `.${id}:${pseudoClass} {${styleWithImportant}}`;
    }

    return undefined;
  });
}
function createMarkupOnPseudoClass(pseudoClasses, id, disabled) {
  return mapObject(pseudoClasses, (style, pseudoClass) => {
    if (style && Object.keys(style).length > 0) {
      const styleString = CSSPropertyOperations.createMarkupForStyles(style);
      const styleWithImportant = styleString.replace(/;/g, ' !important;');

      return disabled ?
        `.${id}[disabled]:${pseudoClass} {${styleWithImportant}}` :
        `.${id}:${pseudoClass} {${styleWithImportant}}`;
    }

    return undefined;
  });
}
function createMarkupOnPseudoClass ( pseudoClasses , id , disabled ) { return mapObject ( pseudoClasses , ( style , pseudoClass ) => { if ( style && Object . keys ( style ) . length > 0 ) { const styleString = CSSPropertyOperations . createMarkupForStyles ( style ) ; const styleWithImportant = styleString . replace ( / ; / g , ' !important;' ) ; return disabled ? ` ${ id } ${ pseudoClass } ${ styleWithImportant } ` : ` ${ id } ${ pseudoClass } ${ styleWithImportant } ` ; } return undefined ; } ) ; }
Constructs all the stored styles & injects them to the DOM.
Constructs all the stored styles & injects them to the DOM .