{"record":{"id":"054b3b1842da42e5","repo":"Foundry376/Mailspring","slug":"mailspring-does-not-support-stylesheets-with-the-e","errorCode":null,"errorMessage":"Mailspring does not support stylesheets with the extension: %@","messagePattern":"Mailspring does not support stylesheets with the extension: %@","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"app/src/theme-manager.ts","lineNumber":310,"sourceCode":"      const p = path.resolve(__dirname, stylesheetPath);\n      return fs.existsSync(p) ? p : null;\n    }\n    for (const ext of ['css', 'less']) {\n      const p = path.resolve(__dirname, `${stylesheetPath}.${ext}`);\n      if (fs.existsSync(p)) return p;\n    }\n    return null;\n  }\n\n  cssContentsOfStylesheet(stylesheetPath) {\n    const ext = path.extname(stylesheetPath);\n\n    if (ext === '.less') {\n      return this.cssContentsOfLessStylesheet(stylesheetPath);\n    } else if (ext === '.css') {\n      return fs.readFileSync(stylesheetPath, 'utf8');\n    } else {\n      throw new Error(\n        localized(`Mailspring does not support stylesheets with the extension: %@`, ext)\n      );\n    }\n  }\n\n  cssContentsOfLessStylesheet(lessStylesheetPath) {\n    try {\n      const less = fs.readFileSync(lessStylesheetPath, 'utf8').toString();\n      return this.lessCache.cssForFile(lessStylesheetPath, less);\n    } catch (error) {\n      let message = `Error loading Less stylesheet: ${lessStylesheetPath}`;\n      let detail = error.message;\n\n      if (error.line !== undefined) {\n        message = `Error compiling Less stylesheet: ${lessStylesheetPath}`;\n        detail = `Line number: ${error.line}\\n${error.message}`;\n      }\n      console.error(message, { detail, dismissable: true });","sourceCodeStart":292,"sourceCodeEnd":328,"githubUrl":"https://github.com/Foundry376/Mailspring/blob/648c685d602ece6bb00c22534b8734de6ac644b3/app/src/theme-manager.ts#L292-L328","documentation":"cssContentsOfStylesheet was given a stylesheet whose extension is neither .less nor .css. Only those two formats are supported by the theme system; any other extension (or a path with no extension) is rejected instead of being read blindly.","triggerScenarios":"Thrown at app/src/theme-manager.ts:310 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Rename the stylesheet to .css or convert it to .less","Pass the path without relying on extension inference for non-style assets","Fix the theme/package manifest that references the unsupported file"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"648c685d602ece6bb00c22534b8734de6ac644b3","analyzedAt":"2026-09-03T02:00:24.311Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-10T07:17:11.731Z"}