How to serve a CSS file from Google Apps Script

Is it possible to serve a CSS file from Apps Script to a web page via @import and, if so, how?

Here is what I have in my Apps Script project:

function doGet() {
    return ContentService.createTextOutput("#topbar {display: none;}").setMimeType(ContentService.MimeType.TEXT);

And here is what I have on my web page:

    @import url("//");

The script is published and can be accessed anonymously. It does in fact serve the text when viewed in the browser.

However, the styles on the page do not appear to take effect, nor are they even registered upon the elements which they target (#topbar), as verified using dev. tools/inspector. In other words, it’s not a case of being overridden by another rule.

Chrome displays the following notice in console:

Resource interpreted as Stylesheet but transferred with MIME type text/plain: "".

Note that:

  1. Apps Script is limited in the MIME types it allows, and I don’t believe ‘text/css’ is one of them
  2. Chrome does still seem to know to interpret it as a CSS file, so I don’t think MIME type is the problem.
  3. I must use @import due to client-side restrictions for the project.
  4. I noticed here that returning a blob offers additional MIME types, but I’m unsure if that’s an applicable path to solving this problem.