Skip to content

Fix(Component): 修复固有组件会覆盖开发者样式问题#239

Merged
dos1in merged 2 commits into
didi:mainfrom
EchoTechFE:fix/button-style-specificity
May 29, 2026
Merged

Fix(Component): 修复固有组件会覆盖开发者样式问题#239
dos1in merged 2 commits into
didi:mainfrom
EchoTechFE:fix/button-style-specificity

Conversation

@Hierifer

Copy link
Copy Markdown
Contributor
screenshot-20260528-175543

Wrap all attribute selectors in :where() so user classes can override built-in styles without needing higher specificity.

… specificity

Wrap all attribute selectors in :where() so user classes can override
built-in styles without needing higher specificity.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@dos1in

dos1in commented May 29, 2026

Copy link
Copy Markdown
Member

:where() 需要 Chromium/WebView 88+,对于低版本 android 会有兼容性问题,看看其他方案。

…city

Use BEM modifier classes (dd-button--primary, dd-button--disabled, etc.)
instead of :where() pseudo-class for attribute selectors. This lowers
specificity to allow user class overrides while maintaining compatibility
with Android WebView < 88 (Chromium < 88 does not support :where()).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@dos1in dos1in merged commit 49642c0 into didi:main May 29, 2026
2 checks passed
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