ReedenReeden

高亮规则

Reeden 高亮规则当前支持的 CSS 属性和值

高亮规则 CSS 概述

Reeden 的高亮规则支持部分 CSS 属性,用于控制命中文字的样式。

这些属性可以直接写在高亮规则的 CSS 输入框中,未支持的属性会自动忽略。

使用方式

color: {primaryColor};
background-color: #FFF3C4;
font-weight: 700;
border-left: 4px solid {primaryColor};
padding: 4px 10px;

当前支持的 CSS 属性

文字与装饰

属性支持的值示例
color#FFB800 rgba(255,184,0,.8) {textColor} {primaryColor}color: {primaryColor};
font-weightnormal 400 700 boldfont-weight: 700;
font-stylenormal italicfont-style: italic;
font-size14px 1em 1.1remfont-size: 14px;
font-family字体名列表font-family: "Source Han Serif SC", serif;
line-height1.5 24pxline-height: 1.5;
text-alignleft center right justifytext-align: center;
text-decoration下划线组合表达式text-decoration: underline wavy {primaryColor};
text-decoration-lineunderlinetext-decoration-line: underline;
text-decoration-stylesolid wavy dashed dotted doubletext-decoration-style: wavy;
text-decoration-color颜色值 {primaryColor}text-decoration-color: {primaryColor};

背景与图片

属性支持的值示例
background-color#FFF3C4 {primaryColor}background-color: #FFF3C4;
background-imageurl("reeden://bg/xxx")background-image: url("reeden://bg/xxx");
background-positionleft top center right bottombackground-position: center;
background-repeatno-repeat repeatbackground-repeat: no-repeat;
background-sizecover contain autobackground-size: cover;

边框与圆角

属性支持的值示例
border1px solid #22C55Eborder: 1px solid #22C55E;
border-left4px solid #94A3B8border-left: 4px solid #94A3B8;
border-right1px solid #CBD5E1border-right: 1px solid #CBD5E1;
border-top1px solid #CBD5E1border-top: 1px solid #CBD5E1;
border-bottom1px solid #CBD5E1border-bottom: 1px solid #CBD5E1;
border-radius12px 999pxborder-radius: 12px;

内边距与外边距

属性支持的值示例
padding4px 10pxpadding: 4px 10px;
padding-left8pxpadding-left: 8px;
padding-right8pxpadding-right: 8px;
padding-top4pxpadding-top: 4px;
padding-bottom4pxpadding-bottom: 4px;
margin4px 8pxmargin: 4px 8px;
margin-left8pxmargin-left: 8px;
margin-right8pxmargin-right: 8px;
margin-top8pxmargin-top: 8px;
margin-bottom8pxmargin-bottom: 8px;

展示语义

属性支持的值示例
displayinline blockdisplay: block;
opacity01opacity: .85;

动态颜色占位符

占位符说明示例
{textColor}当前主题文字色color: {textColor};
{primaryColor}当前主题强调色border-left: 4px solid {primaryColor};

注意事项

  • display: block 更适合整段、连续整段或标题命中。
  • margin-topmargin-bottom 更适合块级命中场景。
  • 这页只列出当前支持的属性,未支持内容会自动忽略。