进行了一些小修复

This commit is contained in:
2026-08-26 18:06:44 +08:00
parent fb2bbb64c5
commit 7c0c21e984
7 changed files with 19 additions and 16 deletions
+1 -7
View File
@@ -538,17 +538,11 @@ a:hover {
color: var(--color-primary);
}
/* 焦点环:a11y 关键 */
/* 取消浏览器默认聚焦描边;组件按需声明自己的焦点状态。 */
:focus {
outline: none;
}
:focus-visible {
outline: none;
box-shadow: var(--focus-ring);
border-radius: 4px;
}
/* 选区色 */
::selection {
background: var(--color-primary-soft);
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -7
View File
@@ -68,17 +68,11 @@ a:hover {
color: var(--color-primary);
}
/* 焦点环:a11y 关键 */
/* 取消浏览器默认聚焦描边;组件按需声明自己的焦点状态。 */
:focus {
outline: none;
}
:focus-visible {
outline: none;
box-shadow: var(--focus-ring);
border-radius: 4px;
}
/* 选区色 */
::selection {
background: var(--color-primary-soft);
@@ -89,6 +89,8 @@
.quote_q [contenteditable="true"] {
outline: 0;
border-radius: 0;
box-shadow: none;
}
.qe_wzk_c-red {
+1 -1
View File
@@ -54,7 +54,7 @@ $is_can_new = !empty($ctx['is_can_new']);
if (!empty($ctx['can_hide'])) {
$toolbar1[] = 'aksrt_hide';
}
$toolbar1 = implode(',', array_merge($toolbar1, ['aksrt_quote', 'aksrt_precode', 'fullscreen']));
$toolbar1 = implode(',', array_merge($toolbar1, ['aksrt_quote', 'aksrt_precode', 'fullscreen', 'wp_adv']));
$plugins = 'paste,link,lists,fullscreen,wordpress,wplink,charmap,colorpicker,textcolor';
$editor_plugin_path = get_template_directory() . '/assets/js/front-submit-editor.js';
$editor_plugin_url = get_template_directory_uri() . '/assets/js/front-submit-editor.js';
@@ -77,3 +77,14 @@ test('theme runtime never changes native listener passivity for third-party edit
assert.doesNotMatch(publicRuntime, /EventTarget\.prototype\.addEventListener|__passiveSupported/);
assert.equal(fs.existsSync(path.join(root, 'assets/js/passive-events.js')), false);
});
test('public theme does not inject a global focus-visible ring', () => {
const globalFocusRule = /(^|})\s*:focus-visible\s*\{/m;
const reset = read('assets/css/core/reset.css');
const publicCss = read('assets/css/build/public.css');
const publicMinCss = read('assets/css/build/public.min.css');
assert.doesNotMatch(reset, globalFocusRule);
assert.doesNotMatch(publicCss, globalFocusRule);
assert.doesNotMatch(publicMinCss, globalFocusRule);
});
@@ -87,6 +87,7 @@ test('front submit exposes the complete reference media and formatting toolset',
assert.match(editor, new RegExp(`addButton\\(['"]${button}['"]`));
});
assert.doesNotMatch(main, /array_merge\(\$toolbar1, \['blockquote'/);
assert.match(main, /\['aksrt_quote', 'aksrt_precode', 'fullscreen', 'wp_adv'\]/);
assert.match(main, /toolbar2[\s\S]*forecolor/);
assert.match(main, /colorpicker,textcolor/);
@@ -110,6 +111,7 @@ test('front submit exposes the complete reference media and formatting toolset',
assert.match(editor, /qe_wzk_lan/);
assert.match(editor, /qe_wzk_lv/);
assert.match(editorCss, /\.quote_q/);
assert.match(editorCss, /\.quote_q \[contenteditable="true"\][\s\S]*?box-shadow:\s*none/);
assert.match(editorCss, /\.file-download-box/);
assert.match(editorCss, /\.enlighter-pre/);
assert.doesNotMatch(editor, /shop|forum|bbs_/i);