Skip to content

Commit 939ec0f

Browse files
authored
refactor: replace deprecated sass global imports (#965)
1 parent 540fa35 commit 939ec0f

16 files changed

+315
-293
lines changed

layouts/shortcodes/gist.html

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<script src="https://gist.github.com/{{ index .Params 0 }}/{{ index .Params 1 }}.js{{if len .Params | eq 3 }}?file={{ index .Params 2 }}{{end}}"></script>

src/sass/_asciidoc.scss

+13-10
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
1+
@use "sass:color";
2+
@use "defaults";
3+
14
.admonitionblock {
2-
@each $name, $color in $hint-colors {
5+
@each $name, $color in defaults.$hint-colors {
36
&.#{$name} {
47
border-left-color: $color;
58
background-color: color.scale($color, $lightness: 95%, $saturation: -30%);
6-
color: $body-font-color;
9+
color: defaults.$body-font-color;
710
}
811
}
912

1013
& {
11-
margin: $padding-16 0;
14+
margin: defaults.$padding-16 0;
1215
padding: 0;
1316

14-
border-left: $border-4 solid var(--accent-color);
15-
border-radius: $border-radius;
17+
border-left: defaults.$border-4 solid var(--accent-color);
18+
border-radius: defaults.$border-radius;
1619
}
1720

1821
table {
@@ -25,10 +28,10 @@
2528

2629
td {
2730
display: block;
28-
padding: $padding-4 $padding-16 !important;
31+
padding: defaults.$padding-4 defaults.$padding-16 !important;
2932

3033
&:first-child {
31-
background-color: color.scale($gray-600, $alpha: -95%);
34+
background-color: color.scale(defaults.$gray-600, $alpha: -95%);
3235
font-weight: bold;
3336

3437
&.icon {
@@ -40,18 +43,18 @@
4043
i.fa::after {
4144
content: attr(title);
4245
font-style: normal;
43-
padding-left: $padding-24;
46+
padding-left: defaults.$padding-24;
4447
}
4548

4649
i.fa {
47-
color: $black;
50+
color: defaults.$black;
4851
background-size: auto 90%;
4952
background-repeat: no-repeat;
5053
filter: invert(30%);
5154
margin-left: -5px;
5255
}
5356

54-
@each $name, $icon in $hint-icons {
57+
@each $name, $icon in defaults.$hint-icons {
5558
i.fa.icon-#{$name} {
5659
background-image: url(img/geekdoc-stack.svg##{$icon});
5760
}

0 commit comments

Comments
 (0)