Normalized attribute name in HTML

Add prefix `data-` for following attributes:
- `topbar-visible`
- `mode`
- `label-text`
- `title-succeed`
This commit is contained in:
Cotes Chung
2022-01-13 00:23:08 +08:00
parent 96e7cd79af
commit f8f4dd889e
14 changed files with 43 additions and 40 deletions

View File

@@ -5,22 +5,22 @@
@import "colors/light-syntax";
@import "colors/dark-syntax";
html:not([mode]),
html[mode=light] {
html:not([data-mode]),
html[data-mode=light] {
@include light-syntax;
}
html[mode=dark] {
html[data-mode=dark] {
@include dark-syntax;
}
@media (prefers-color-scheme: dark) {
html:not([mode]),
html[mode=dark] {
html:not([data-mode]),
html[data-mode=dark] {
@include dark-syntax;
}
html[mode=light] {
html[data-mode=light] {
@include light-syntax;
}
}
@@ -206,7 +206,7 @@ div {
// label text
&::after {
content: attr(label-text);
content: attr(data-label-text);
font-size: 0.85rem;
font-weight: 600;
color: var(--code-header-text-color);