Chrome扩展程序弹出窗口和选项页面的默认样式表在哪里? [英] Where is the default stylesheet for Chrome extension popups and options pages?
问题描述
Chrome浏览器扩展程序的弹出窗口和选项页面有一个额外的用户代理样式表,可添加类似于Chrome自己的 chrome:// settings
和其他页面的样式。这些样式在解释如何声明您的V2选项页时提到:
chrome_style(boolean) - 可选
如果为true,Chrome用户代理样式表将应用于您的选项页面。默认值为false,但我们建议您启用Chrome以获得一致的用户界面。
该样式表是稳定的API吗?
该样式表在哪里?
我在Chromium资源。使用 chrome_style:true
添加以下两个样式表到选项页面:
- .css:
https:/ /chromium.googlesource.com/chromium/src/+/master/extensions/renderer/resources/extension.css - extension_fonts.css:
https://chromium.googlesource.com/chromium/src /+/master/extensions/renderer/resources/extension_fonts.css
Popups and Options Pages for Chrome extensions have an additional user agent stylesheet that adds styles similar to Chrome's own chrome://settings
and other pages. The styles are mentioned in explaining how to declare your V2 options page:
chrome_style (boolean) - optional
If true, a Chrome user agent stylesheet will be applied to your options page. The default value is false, but we recommend you enable it for a consistent UI with Chrome.
Is that stylesheet a stable API?
Where is that stylesheet?
I found the answer in Chromium source. The following two stylesheets are added to Options Pages with chrome_style:true
:
- extension.css: https://chromium.googlesource.com/chromium/src/+/master/extensions/renderer/resources/extension.css
- extension_fonts.css: https://chromium.googlesource.com/chromium/src/+/master/extensions/renderer/resources/extension_fonts.css
这篇关于Chrome扩展程序弹出窗口和选项页面的默认样式表在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!