docs: function flattenCss(fileName, fileContents, cssImportIgnore) {
          //Find the last slash in the name.
          fileName = fileName.replace(lang.backSlashRegExp, "/");
          var endIndex = fileName.lastIndexOf("/"),
              //Make a file path based on the last slash.
              //If no slash, so must be just a file name. Use empty string then.
              filePath = (endIndex !== -1) ? fileName.substring(0, endIndex + 1) : "";
  
          //Make sure we have a delimited ignore list to make matching faster
          if (cssImportIgnore && cssImportIgnore.charAt(cssImportIgnore.length - 1) !== ",") {
              cssImportIgnore += ",";
          }
  
          return fileContents.replace(cssImportRegExp, function (fullMatch, urlStart, importFileName, urlEnd, mediaTypes) {
              //Only process media type "all" or empty media type rules.
              if (mediaTypes && ((mediaTypes.replace(/^\s\s*/, '').replace(/\s\s*$/, '')) !== "all")) {
                  return fullMatch;
              }
  
              importFileName = cleanCssUrlQuotes(importFileName);
  
              //Ignore the file import if it is part of an ignore list.
              if (cssImportIgnore && cssImportIgnore.indexOf(importFileName + ",") !== -1) {
                  return fullMatch;
              }
  
              //Make sure we have a unix path for the rest of the operation.
              importFileName = importFileName.replace(lang.backSlashRegExp, "/");
  
              try {
                  //if a relative path, then tack on the filePath.
                  //If it is not a relative path, then the readFile below will fail,
                  //and we will just skip that import.
                  var fullImportFileName = importFileName.charAt(0) === "/" ? importFileName : filePath + importFileName,
                      importContents = file.readFile(fullImportFileName), i,
                      importEndIndex, importPath, fixedUrlMatch, colonIndex, parts;
  
                  //Make sure to flatten any nested imports.
                  importContents = flattenCss(fullImportFileName, importContents);
  
                  //Make the full import path
                  importEndIndex = importFileName.lastIndexOf("/");
  
                  //Make a file path based on the last slash.
                  //If no slash, so must be just a file name. Use empty string then.
                  importPath = (importEndIndex !== -1) ? importFileName.substring(0, importEndIndex + 1) : "";
  
                  //Modify URL paths to match the path represented by this file.
                  importContents = importContents.replace(cssUrlRegExp, function (fullMatch, urlMatch) {
                      fixedUrlMatch = cleanCssUrlQuotes(urlMatch);
                      fixedUrlMatch = fixedUrlMatch.replace(lang.backSlashRegExp, "/");
  
                      //Only do the work for relative URLs. Skip things that start with / or have
                      //a protocol.
                      colonIndex = fixedUrlMatch.indexOf(":");
                      if (fixedUrlMatch.charAt(0) !== "/" && (colonIndex === -1 || colonIndex > fixedUrlMatch.indexOf("/"))) {
                          //It is a relative URL, tack on the path prefix
                          urlMatch = importPath + fixedUrlMatch;
                      } else {
                          logger.trace(importFileName + "\n  URL not a relative URL, skipping: " + urlMatch);
                      }
  
                      //Collapse .. and .
                      parts = urlMatch.split("/");
                      for (i = parts.length - 1; i > 0; i--) {
                          if (parts[i] === ".") {
                              parts.splice(i, 1);
                          } else if (parts[i] === "..") {
                              if (i !== 0 && parts[i - 1] !== "..") {
                                  parts.splice(i - 1, 2);
                                  i -= 1;
                              }
                          }
                      }
  
                      return "url(" + parts.join("/") + ")";
                  });
  
                  return importContents;
              } catch (e) {
                  logger.trace(fileName + "\n  Cannot inline css import, skipping: " + importFileName);
                  return fullMatch;
              }
          });
      }