function getRemoteStylesheetPath(fileObj, documentObj, filename) {
  let {hostname: styleHost, port: stylePort, pathname} = fileObj;
  const {hostname: docHost, port: docPort} = documentObj || {};

  if (filename) {
    pathname = joinPath(path.dirname(pathname), path.basename(filename));
    fileObj.pathname = normalizePath(pathname);
  }

  if (`${styleHost}:${stylePort}` === `${docHost}:${docPort}`) {
    return pathname;
  }

  return url.format(fileObj);
}
Get path for remote stylesheet. Compares document host with stylesheet host
@param {object} fileObj Result of urlParse(style url)
@param {object} documentObj Result of urlParse(document url)
@param {string} filename Filename
@returns {string} Path to css (can be remote or local relative to document base)