[CRX] Drop chrome_style from manifest.json

MV3 does not support chrome_style in options_ui. Remove it and replace
it with the minimal amount of styles that still has some spacing around
the individual settings for readability.
This commit is contained in:
Rob Wu 2024-09-01 20:38:47 +02:00
parent bd3d993180
commit b23829fc60
2 changed files with 10 additions and 6 deletions

View File

@ -31,8 +31,7 @@
"managed_schema": "preferences_schema.json" "managed_schema": "preferences_schema.json"
}, },
"options_ui": { "options_ui": {
"page": "options/options.html", "page": "options/options.html"
"chrome_style": true
}, },
"options_page": "options/options.html", "options_page": "options/options.html",
"background": { "background": {

View File

@ -19,13 +19,19 @@ limitations under the License.
<meta charset="utf-8"> <meta charset="utf-8">
<title>PDF.js viewer options</title> <title>PDF.js viewer options</title>
<style> <style>
/* TODO: Remove as much custom CSS as possible - crbug.com/446511 */
body { body {
min-width: 400px; /* a page at the settings page is at least 400px wide */ min-width: 400px; /* a page at the settings page is at least 400px wide */
margin: 14px 17px; /* already added by default in Chrome 40.0.2212.0 */ margin: 14px 17px; /* already added by default in Chrome 40.0.2212.0 */
} }
.settings-row { .settings-row {
margin: 0.65em 0; margin: 1em 0;
}
.checkbox label {
display: inline-flex;
align-items: center;
}
.checkbox label input {
flex-shrink: 0;
} }
</style> </style>
</head> </head>
@ -34,8 +40,7 @@ body {
<button id="reset-button" type="button">Restore default settings</button> <button id="reset-button" type="button">Restore default settings</button>
<template id="checkbox-template"> <template id="checkbox-template">
<!-- Chromium's style: //src/extensions/renderer/resources/extension.css --> <div class="settings-row checkbox">
<div class="checkbox">
<label> <label>
<input type="checkbox"> <input type="checkbox">
<span></span> <span></span>