lib/utils/media-query.js
function distributeQueryAcrossQuery(firstQuery, secondQuery) {
  const aParts = explodeMediaQuery(firstQuery);
  const bParts = explodeMediaQuery(secondQuery);

  return aParts
    .map(aPart => bParts.map(bPart => `${aPart} and ${bPart}`).join(', '))
    .join(', ');
}
function distributeQueryAcrossQuery(firstQuery, secondQuery) {
  const aParts = explodeMediaQuery(firstQuery);
  const bParts = explodeMediaQuery(secondQuery);

  return aParts
    .map(aPart => bParts.map(bPart => `${aPart} and ${bPart}`).join(', '))
    .join(', ');
}
function distributeQueryAcrossQuery ( firstQuery , secondQuery ) { const aParts = explodeMediaQuery ( firstQuery ) ; const bParts = explodeMediaQuery ( secondQuery ) ; return aParts . map ( aPart => bParts . map ( bPart => ` ${ aPart } ${ bPart } ` ) . join ( ', ' ) ) . join ( ', ' ) ; }
Perform a "logic AND" on the two media queries

@example
const a = '(min-width: 600px)';
const b = '(max-width: 800px)';

distributeQueryAcrossQuery(a, b);
// => '(min-width: 600px), (max-width: 800px)'

@example
const a = '(min-width: 600px)';
const b = '(-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi)';

distributeQueryAcrossQuery(a, b);
// => '(-webkit-min-device-pixel-ratio: 2) and (min-width: 600px), (min-resolution: 192dpi) and (min-width: 600px)'

@param {string} firstQuery the first query to include
@param {string} secondQuery the second query to include
@return {string} the combined query
Perform a logic AND on the two media queries