-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
refactor: migrate to new <style> theme system
#1007
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
🎊 PR Preview has been successfully built and deployed to https://doocs-md-preview-pr-1007.surge.sh |
Deploying doocs-md with
|
| Latest commit: |
0e6a674
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://37ed02de.doocs-md.pages.dev |
| Branch Preview URL: | https://feat-theme-export.doocs-md.pages.dev |
|
@M-Kepler 可以再提供一个我导出的版本,方便我 diff |
方案1-merged-theme.css 这个是导出的 |
|
好的,稍等修复 |
921b284 to
0e6a674
Compare
|
好像导出的css不包含暗色。 /* 暗色主题支持 */
/* 支持通过.dark类、VSCode暗色主题和高对比度主题触发 */
.dark,
body.vscode-dark,
body.vscode-high-contrast {
--background: 0 0% 3.9%;
--foreground: 0 0% 98%;
--card: 0 0% 3.9%;
--card-foreground: 0 0% 98%;
--popover: 0 0% 3.9%;
--popover-foreground: 0 0% 98%;
--primary: 0 0% 98%;
--primary-foreground: 0 0% 9%;
--secondary: 0 0% 14.9%;
--secondary-foreground: 0 0% 98%;
--muted: 0 0% 14.9%;
--muted-foreground: 0 0% 63.9%;
--accent: 0 0% 14.9%;
--accent-foreground: 0 0% 98%;
--destructive: 0 62.8% 30.6%;
--destructive-foreground: 0 0% 98%;
--border: 0 0% 14.9%;
--input: 0 0% 14.9%;
--ring: 0 0% 83.1%;
--blockquote-background: #212121;
} |
|
应该是导出的时候我根据 内置主题 key 去合并了,所以丢失了一些内容,需要先重构主题系统,这块可能需要一点时间。 |
|
内置主题为 JS 对象,需要动态转换为 CSS 内联样式,而自定义样式为 CSS 字符串,需要转换为 JS 对象再和内置主题合并,最终再转换为内联对象。
|
|
😭 Cloudflare Workers Preview deployment failed. Please check the workflow run for details. |
|
🚀 Surge Preview has been successfully deployed! Preview URL: https://doocs-md-preview-pr-1007.surge.sh Built with commit c332e2b |
64907f1 to
0c26896
Compare
b70eaf5 to
42c6c9c
Compare
|
🚀 Cloudflare Workers Preview has been successfully deployed! Preview URL: https://md-pr-1007.doocs.workers.dev Built with commit c332e2b |
<style> theme system
6288741 to
6fea764
Compare
|
🗑️ Cloudflare Workers preview deployment has been cleaned up. |





close
使用新主题系统,分离 render 和 theme,使用 css style 注入而非行内样式注入。