umputun/remark42

support color-scheme

Open

#1,430 建立於 2022年7月22日

在 GitHub 查看
 (3 留言) (0 反應) (0 負責人)Go (5,500 star) (432 fork)user submission
frontendgood-first-issuehelp wanted

描述

  • add new option for theme to the config in order to understand if site supports auto switch between light and dart theme
  • add color-scheme: light dark when the param is true, add light or dark when false and switch coloe-scheme value accordingly
  • remove this change https://github.com/umputun/remark42/pull/1429

Cases

Auto

var remark_config = {
  theme: 'auto'
}
color-scheme: light dark;

Add support for auto switch between themes

Dark

var remark_config = {
  theme: 'dark'
}
color-scheme: dark;

Light

var remark_config = {
  theme: 'light'
}
color-scheme: light;

貢獻者指南

support color-scheme · umputun/remark42#1430 | Good First Issue