Skip to content

Commit

Permalink
Format code according to stylint
Browse files Browse the repository at this point in the history
  • Loading branch information
sghuang19 committed Aug 15, 2024
1 parent f18d2d1 commit 74cc1d0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
6 changes: 3 additions & 3 deletions source/css/_common/scaffolding/tags/note.styl
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ if (hexo-config('note.style') != 'disabled') {

if (hexo-config('darkmode')) {
@media (prefers-color-scheme: dark) {
background: $note-modern-bg-dark[$type]
border-color: $note-modern-border-dark[$type]
color: $note-modern-text-dark[$type]
background: $note-modern-bg-dark[$type];
border-color: $note-modern-border-dark[$type];
color: $note-modern-text-dark[$type];

a:not(.btn) {
border-bottom-color: $note-modern-text-dark[$type];
Expand Down
9 changes: 6 additions & 3 deletions source/css/_variables/base.styl
Original file line number Diff line number Diff line change
Expand Up @@ -374,11 +374,14 @@ $note-modern-hover = {
danger : darken(spin($note-modern-text.danger, -10), 22%)
};

transform-map(map, transform)
new-map = {};
for key, val in map
transform-map(map, transform) {
new-map = {
}
for key, val in map {
new-map[key] = transform(val);
}
return new-map;
}

$note-modern-border-dark = transform-map($note-modern-hover, @(val) { lighten(val, 10%) });
$note-modern-bg-dark = transform-map($note-modern-text, @(val) { desaturate(darken(val, 20%), 20%) });
Expand Down

0 comments on commit 74cc1d0

Please sign in to comment.