样式修改
themes\stellar\source\css\_components\tag-plugins\note.styl
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157
| .md-text .tag-plugin.note position: relative padding: 0.5rem 0.8rem border-radius: 12px background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%) box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) margin: 1rem 0 overflow: hidden color: var(--text-p1) >.title --fsp: $fsp2 font-size: 0.95rem line-height: 1.4 margin: 0 0 0.4rem 0 font-weight: 600 color: #667eea // 默认蓝色,与背景渐变呼应 display: flex align-items: center &:first-child margin-top: 0 &::before content: '' display: inline-block width: 16px height: 16px margin-right: 8px background: currentColor // 继承标题颜色 mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z'/%3E%3C/svg%3E") no-repeat center mask-size: contain flex-shrink: 0 >.body &,p --fsp: $fsp3 font-size: 0.9rem line-height: 1.5 margin: 0 color: #4a5568 >.body:only-child margin: 0
.md-text .tag-plugin.note[color="blue"] background: linear-gradient(135deg, #e8f4fe 0%, #ffffff 100%) >.title color: #2196f3 // 蓝色 >.title::before mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z'/%3E%3C/svg%3E") no-repeat center
.md-text .tag-plugin.note[color="yellow"] background: linear-gradient(135deg, #fff9e6 0%, #ffffff 100%) >.title color: #ffb300 // 黄色 >.title::before mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z'/%3E%3C/svg%3E") no-repeat center
.md-text .tag-plugin.note[color="red"] background: linear-gradient(135deg, #ffeaea 0%, #ffffff 100%) >.title color: #f44336 // 红色 >.title::before mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z'/%3E%3C/svg%3E") no-repeat center
.md-text .tag-plugin.note[color="green"] background: linear-gradient(135deg, #e8f5e8 0%, #ffffff 100%) >.title color: #4caf50 // 绿色 >.title::before mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z'/%3E%3C/svg%3E") no-repeat center
.md-text .tag-plugin.note[color="purple"] background: linear-gradient(135deg, #f3e8ff 0%, #ffffff 100%) >.title color: #9c27b0 // 紫色 >.title::before mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z'/%3E%3C/svg%3E") no-repeat center
.md-text .tag-plugin.note[color] code background: none
.md-text .tag-plugin.note[child=codeblock] padding: 0 background: var(--theme-codeblock) border-radius: 8px >.title color: var(--text) // 代码块标题使用默认文本颜色 >.title, >.body:only-child margin-top: 0 >.body margin-bottom: 0 .highlight margin: 0 border: none background: none border-radius: 0 0 8px 8px figcaption span background: var(--theme-block) .highlight+.highlight border-top: 1px dashed var(--theme-border) border-top-left-radius: 0 border-top-right-radius: 0
.md-text .tag-plugin.note[child=tabs] border-radius: 12px >.body margin: 0 >.tabs margin-top: .5rem border-radius: 0 0 12px 12px
.md-text .tag-plugin.note[child=iframe] padding: 0 border-radius: 8px >.title color: var(--text) // iframe标题使用默认文本颜色 >.body margin: 0 iframe margin: 0 border-radius: 8px
.md-text .tag-plugin .tag-plugin.note --gap-p: 0.75rem margin: 0.75rem 0 border-radius: 10px
.l_body[type=story] .tag-plugin.note .title p:not([class]) text-indent: 0
@media (max-width: 768px) .md-text .tag-plugin.note padding: 0.6rem 0.8rem margin: 0.8rem 0 border-radius: 10px >.title font-size: 0.9rem &::before width: 14px height: 14px margin-right: 6px >.body &,p font-size: 0.85rem
|