Skip to content

Fix Kindle-style UI: remove conflicting button hover/focus styles and fix invisible icons#2

Merged
nkanf-dev merged 3 commits intomainfrom
copilot/fix-ui-styles-for-kindle
Mar 10, 2026
Merged

Fix Kindle-style UI: remove conflicting button hover/focus styles and fix invisible icons#2
nkanf-dev merged 3 commits intomainfrom
copilot/fix-ui-styles-for-kindle

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 10, 2026

The Vite-generated index.css defaults (dark button backgrounds, purple hover borders #646cff, browser focus rings) conflicted with the Kindle light theme. Additionally, several icon buttons were invisible due to near-white foreground colors (#eee) on light backgrounds.

Root cause

index.css shipped dark-mode-first button resets that component CSS couldn't fully override — specifically button:hover { border-color: #646cff } (specificity 0-1-1) leaked through on any button with a visible border, and button:focus { outline: 4px auto } outweighed the * { outline: none } reset in App.css.

Changes

  • src/index.css — Stripped all conflicting button defaults (dark bg, purple hover border, focus ring, dark :root color scheme). Retained only font and text-rendering resets.

  • src/styles/HeldPagesPanel.cssdel-btn-ux was color: #eee (invisible on #fff). Changed to var(--kindle-subtle) with progressive reveal on card hover → var(--kindle-gray), and red on direct hover.

  • src/styles/ReaderViewport.css — Added explicit Kindle hover/active states for .ux-btn and .mode-btn so they no longer fall through to the (now-removed) purple border default.

  • src/styles/WorkspaceCanvas.css — Tightened pane-actions and actions button interactions: added border-radius, transition, :active scale, and danger-specific red background tint.

  • src/app/App.css — Added body.is-panning (was missing; WorkspaceCanvas.tsx toggles it during drag). Added .kindle-btn.outline:hover fill inversion. Extracted --kindle-subtle: #c8c4be and --kindle-danger: #ef4444 as theme variables.

Original prompt

目前UI里面一些click后边框样式,以及hover没有适配kindle风格。另外很多图标没有正常显示,只是空白。修复这些问题,优化UI。


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits March 10, 2026 03:29
Co-authored-by: nkanf-dev <172456830+nkanf-dev@users.noreply.github.com>
… icons

Co-authored-by: nkanf-dev <172456830+nkanf-dev@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix UI styles and icon display issues for Kindle Fix Kindle-style UI: remove conflicting button hover/focus styles and fix invisible icons Mar 10, 2026
Comment thread src/index.css

body {
margin: 0;
display: flex;
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

解释一下为什么删掉flex

Copy link
Copy Markdown
Owner

@nkanf-dev nkanf-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

对应index.css文件,解释为什么要删掉那些语句

@nkanf-dev
Copy link
Copy Markdown
Owner

@copilot Try again.

@nkanf-dev
Copy link
Copy Markdown
Owner

@copilot 重试

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants