Skip to content

Commit 4553d03

Browse files
committed
Refactor as nested structure the callout type part too
1 parent a330b71 commit 4553d03

File tree

1 file changed

+25
-23
lines changed

1 file changed

+25
-23
lines changed

src/resources/formats/revealjs/quarto.scss

Lines changed: 25 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1130,34 +1130,36 @@ $callouts: (
11301130
);
11311131

11321132
@each $name, $info in $callouts {
1133-
div.callout.callout-#{$name} {
1134-
border-left-color: shift-color(
1135-
quarto-map.get($info, "color"),
1136-
$callout-border-scale
1137-
);
1138-
}
1139-
1140-
div.callout.callout-#{$name}.callout-style-default .callout-title {
1141-
@include shift_to_dark(
1142-
"background-color",
1143-
shift-color(quarto-map.get($info, "color"), 70%),
1144-
shift-color(quarto-map.get($info, "color"), -90%)
1145-
);
1146-
}
1147-
11481133
$shifted-color: #{shift-color(
11491134
quarto-map.get($info, "color"),
11501135
$callout-icon-scale
11511136
)};
11521137
$shifted-color-svg: str-replace($shifted-color, "#", "%23");
11531138

1154-
div.callout-#{$name} .callout-icon::before {
1155-
background-image: #{"url('data:image/svg+xml," +
1156-
str-replace(
1157-
quarto-map.get($info, "icon"),
1158-
'fill="currentColor"',
1159-
'style="fill: #{$shifted-color-svg}"'
1160-
) +
1161-
"');"};
1139+
div.callout {
1140+
&.callout-#{$name} {
1141+
border-left-color: shift-color(
1142+
quarto-map.get($info, "color"),
1143+
$callout-border-scale
1144+
);
1145+
&.callout-style-default {
1146+
.callout-title {
1147+
@include shift_to_dark(
1148+
"background-color",
1149+
shift-color(quarto-map.get($info, "color"), 70%),
1150+
shift-color(quarto-map.get($info, "color"), -90%)
1151+
);
1152+
}
1153+
}
1154+
.callout-icon::before {
1155+
background-image: #{"url('data:image/svg+xml," +
1156+
str-replace(
1157+
quarto-map.get($info, "icon"),
1158+
'fill="currentColor"',
1159+
'style="fill: #{$shifted-color-svg}"'
1160+
) +
1161+
"');"};
1162+
}
1163+
}
11621164
}
11631165
}

0 commit comments

Comments
 (0)