是否可以使用 Chrome 输入样式进行扩展?

Is it possible to utilize the Chrome input style for extensions?

我正在开发 Google Chrome 扩展。为了给用户一种统一的感觉,我复制了Google Chrome 控件的样式。它们看起来像这样:

但是,我想直接利用 Google Chrome 中的现有样式,而不是将它们复制到我的 CSS 代码中。有办法实现吗?

生成的按钮、复选框、选择框等应该看起来与 Google Chrome.

中的完全一样

仅适用于非常特殊的情况:new-style options page AKA optionsV2.

您可以指定要使用 Chrome 样式:

  "options_ui": {
    "page": "options.html",
    "chrome_style": true
  },

开发人员 specifically said 虽然提供用于每个页面的样式会很好,但 "became scary in the implementation"。


轶事证据表明它适用于 pageAction/browserAction 弹出窗口。对应bug:
Support chrome_style from options_ui.chrome_style in other extension view types(未标记为完整)。