Skip to content

Customize select element styles on Windows - #17861

Merged
Vanessa219 merged 2 commits into
siyuan-note:devfrom
TCOTC:feat/select
Jun 15, 2026
Merged

Customize select element styles on Windows#17861
Vanessa219 merged 2 commits into
siyuan-note:devfrom
TCOTC:feat/select

Conversation

@TCOTC

@TCOTC TCOTC commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Description / 描述

Note

我不确定移动端实际上能不能用这个样式、要不要也统一使用这个样式,目前先统一用了

增加跨平台统一的 .b3-select 样式:

PixPin_2026-06-15_13-23-27 PixPin_2026-06-15_13-50-51

样式跟 .b3-menu 一样:

PixPin_2026-06-15_13-06-23

参考资料:

Type of change / 变更类型

  • Bug fix
    缺陷修复
  • Refactoring
    代码重构
  • New feature
    新功能
  • Text updates or new language additions
    修改文案或增加新语言

Checklist / 检查清单

  • I have performed a self-review of my own code
    我对自己的代码进行了自我审查
  • I have full rights to the submitted code and agree to license it under this project's AGPL-3.0 license
    我拥有所提交代码的完整权利,并同意其以本项目的 AGPL-3.0 许可证授权
  • PR is submitted to the dev branch and has no merge conflicts
    PR 提交到 dev 分支,并且没有合并冲突

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR adds an opt-in, modern CSS styling path for .b3-select so that browsers supporting the new customizable <select> feature can render the dropdown picker in a menu-like style consistent with the app’s .b3-menu visuals.

Changes:

  • Add an @supports (appearance: base-select) block to enable appearance: base-select on .b3-select where available.
  • Style the select picker popup via ::picker(select) to match menu theming (colors, radius, shadow, border, padding).
  • Hide the native picker icon (::picker-icon) and tune option presentation (padding/hover/checked/checkmark).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@TCOTC

TCOTC commented Jun 15, 2026

Copy link
Copy Markdown
Contributor Author

再改一下滚动条

@TCOTC
TCOTC marked this pull request as draft June 15, 2026 05:42
@TCOTC
TCOTC marked this pull request as ready for review June 15, 2026 05:50
@Vanessa219

Copy link
Copy Markdown
Member

改好了说

@TCOTC

TCOTC commented Jun 15, 2026

Copy link
Copy Markdown
Contributor Author

已经改好了

@Vanessa219
Vanessa219 merged commit 97ec73e into siyuan-note:dev Jun 15, 2026
2 checks passed
@TCOTC
TCOTC deleted the feat/select branch June 15, 2026 15:41
@Vanessa219

Copy link
Copy Markdown
Member

Mac 上原生的更好看,且滚动条粗细适配。
QQ_1781570001160

Vanessa219 added a commit that referenced this pull request Jun 16, 2026
@Vanessa219 Vanessa219 added this to the 3.7.0 milestone Jun 16, 2026
@Vanessa219 Vanessa219 changed the title Add a cross-platform unified .b3-select style Customize select element styles on Windows Jun 16, 2026
@TCOTC

TCOTC commented Jun 16, 2026

Copy link
Copy Markdown
Contributor Author

你截图那个是思源的菜单。Mac 上这种才是原生的,并且 Mac 上的原生下拉菜单是不会有滚动条的:

PixPin_2026-06-16_09-51-58

@Vanessa219

Copy link
Copy Markdown
Member

嗯嗯,看这个

QQ_1781582271578

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants