packages/build-tools/plugins/postcss-themify/src/index.js
function getSelectorName(rule, variationName, isFallbackSelector = false) {
  const selectorPrefix = `.${options.classPrefix || ''}${variationName}`;

  // console.log(variationName);

  if (isFallbackSelector) {
    return rule.selectors
      .map(selector => {
        let selectors = [];
        let initialSelector = `${selectorPrefix} ${selector}`;

        if (variationName === 'xlight') {
          selectors.push(selector);
        }

        selectors.push(initialSelector);
        selectors.push(`[class*="t-bolt-"] ${initialSelector}`);

        return selectors.join(',');
      })
      .join(',');
  } else {
    return rule.selectors
      .map(selector => {
        return `${selectorPrefix} ${selector}`;
      })
      .join(',');
  }
}
function getSelectorName(rule, variationName, isFallbackSelector = false) {
  const selectorPrefix = `.${options.classPrefix || ''}${variationName}`;

  // console.log(variationName);

  if (isFallbackSelector) {
    return rule.selectors
      .map(selector => {
        let selectors = [];
        let initialSelector = `${selectorPrefix} ${selector}`;

        if (variationName === 'xlight') {
          selectors.push(selector);
        }

        selectors.push(initialSelector);
        selectors.push(`[class*="t-bolt-"] ${initialSelector}`);

        return selectors.join(',');
      })
      .join(',');
  } else {
    return rule.selectors
      .map(selector => {
        return `${selectorPrefix} ${selector}`;
      })
      .join(',');
  }
}
function getSelectorName ( rule , variationName , isFallbackSelector = false ) { const selectorPrefix = ` ${ options . classPrefix || '' } ${ variationName } ` ; // console.log(variationName); if ( isFallbackSelector ) { return rule . selectors . map ( selector => { let selectors = [ ] ; let initialSelector = ` ${ selectorPrefix } ${ selector } ` ; if ( variationName === 'xlight' ) { selectors . push ( selector ) ; } selectors . push ( initialSelector ) ; selectors . push ( ` ${ initialSelector } ` ) ; return selectors . join ( ',' ) ; } ) . join ( ',' ) ; } else { return rule . selectors . map ( selector => { return ` ${ selectorPrefix } ${ selector } ` ; } ) . join ( ',' ) ; } }
Get a selector name for the given rule and variation, deliberately increasing
the CSS class's specificity when generating CSS selectors for IE 11 so we can
account for specificity conflicts when nesting themed components inside other
themes.
@param rule
@param variationName
@param isFallbackSelector
Get a selector name for the given rule and variation deliberately increasing the CSS class s specificity when generating CSS selectors for IE 11 so we can account for specificity conflicts when nesting themed components inside other themes .