注入スタイルシート

注入スタイルシート

[2] Chrome拡張内容スクリプトとして CSS を指定できます >>1開発者ツールではこれは injected stylesheet と表示されます。

[1] Content Scripts - Google Chrome ( 版) <https://developer.chrome.com/extensions/content_scripts>

[3] Chrome拡張注入スタイルシートは、 document.styleSheets には含まれません。

[4] Chrome拡張注入スタイルシートは、通常の利用者エージェントスタイルシートよりは後から読み込まれた利用者エージェントスタイルシートの1つとして扱われるようです。

[6] Safari拡張注入スタイルシートは、利用者スタイルシートとして扱われるようです >>5

[5] Injecting Styles ( 版) <https://developer.apple.com/library/safari/documentation/Tools/Conceptual/SafariExtensionGuide/AddingStyles/AddingStyles.html#//apple_ref/doc/uid/TP40009977-CH7-SW1>

Injected style sheets are treated as user style sheets, as defined by the W3C. This means that first your injected styles are defined, then the author’s styles are added, then any of the author’s properties declared as !important are added, then your properties defined as !important are added. At each stage, a new definition overrides any previous one.