mirror of
https://github.com/Boof2015/prism.git
synced 2026-08-12 05:10:51 +02:00
fix close button missed hardcoded color
This commit is contained in:
@@ -1665,7 +1665,7 @@ button.toolbar__version:hover {
|
|||||||
padding: 0 14px;
|
padding: 0 14px;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
border: 1px solid transparent;
|
border: 1px solid transparent;
|
||||||
background: linear-gradient(180deg, var(--input-bg), var(--settings-bg-bottom));
|
background: var(--control-bg);
|
||||||
color: var(--text-secondary);
|
color: var(--text-secondary);
|
||||||
font-size: 9px;
|
font-size: 9px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
@@ -1678,7 +1678,7 @@ button.toolbar__version:hover {
|
|||||||
.settings-panel__close:hover {
|
.settings-panel__close:hover {
|
||||||
color: var(--text-primary);
|
color: var(--text-primary);
|
||||||
border-color: var(--control-border-active);
|
border-color: var(--control-border-active);
|
||||||
background: linear-gradient(180deg, var(--input-bg-focus), var(--settings-bg-bottom));
|
background: var(--control-bg-hover);
|
||||||
}
|
}
|
||||||
|
|
||||||
.bottom-bar {
|
.bottom-bar {
|
||||||
|
|||||||
@@ -2490,6 +2490,21 @@ test('BottomBar theme section renders compact credit metadata and opens valid li
|
|||||||
assert.match(stylesSource, /\.bottom-bar__theme-credit--link \{/)
|
assert.match(stylesSource, /\.bottom-bar__theme-credit--link \{/)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
test('BottomBar close button uses flat themed control backgrounds', async () => {
|
||||||
|
const stylesSource = await readFile(join(process.cwd(), 'src', 'renderer', 'styles', 'globals.css'), 'utf8')
|
||||||
|
const closeBlock = [...stylesSource.matchAll(/^\.settings-panel__close \{([\s\S]*?)\n\}/gm)]
|
||||||
|
.map((match) => match[1])
|
||||||
|
.find((block) => block.includes('min-height: 34px;'))
|
||||||
|
const closeHoverBlock = stylesSource.match(/\.settings-panel__close:hover \{([\s\S]*?)\n\}/)?.[1]
|
||||||
|
|
||||||
|
assert.ok(closeBlock)
|
||||||
|
assert.ok(closeHoverBlock)
|
||||||
|
assert.match(closeBlock, /background: var\(--control-bg\);/)
|
||||||
|
assert.match(closeHoverBlock, /background: var\(--control-bg-hover\);/)
|
||||||
|
assert.doesNotMatch(closeBlock, /linear-gradient/)
|
||||||
|
assert.doesNotMatch(closeHoverBlock, /linear-gradient/)
|
||||||
|
})
|
||||||
|
|
||||||
test('toolbar uses the Prism logo support link and static package icons are configured', async () => {
|
test('toolbar uses the Prism logo support link and static package icons are configured', async () => {
|
||||||
const toolbarSource = await readFile(join(process.cwd(), 'src', 'renderer', 'components', 'Toolbar.tsx'), 'utf8')
|
const toolbarSource = await readFile(join(process.cwd(), 'src', 'renderer', 'components', 'Toolbar.tsx'), 'utf8')
|
||||||
const stylesSource = await readFile(join(process.cwd(), 'src', 'renderer', 'styles', 'globals.css'), 'utf8')
|
const stylesSource = await readFile(join(process.cwd(), 'src', 'renderer', 'styles', 'globals.css'), 'utf8')
|
||||||
|
|||||||
Reference in New Issue
Block a user