hematite 0.0.9 → 0.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/_sass/_elements.scss +28 -0
- data/assets/style.scss +2 -6
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1c347dece80da3456bf6c8cd42bc6daafc81212dd102ab9fffb664b4c49799e4
|
4
|
+
data.tar.gz: 6218c2a7ee4243942111a7a3e7dce23bfe1be5c96304a1fc671e044f16ab4906
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cdadf907f31e447adbf62dcd7dd849d56418de2a7ba975d9460d5248494065ff4ab5ad12355c60f4858928e9a7e1099434140e14e970a471bf2aa25664cf4aca
|
7
|
+
data.tar.gz: '093443b534ad09677b988852815e543e027060407de67399ca46b1006e28b174ecaaaf3181d52e87750bbcadf20ed928d2bc71fb77a01f3d32276ac0a1f51f61'
|
data/_sass/_elements.scss
CHANGED
@@ -149,3 +149,31 @@ a.settings-btn {
|
|
149
149
|
border: 1px solid var(--line-color-light);
|
150
150
|
}
|
151
151
|
}
|
152
|
+
|
153
|
+
// Invert while trying to preserve color hue.
|
154
|
+
@mixin img-invert {
|
155
|
+
filter: invert(1) hue-rotate(180deg);
|
156
|
+
}
|
157
|
+
|
158
|
+
@media (prefers-color-scheme: dark) {
|
159
|
+
:root:not(.lightTheme) main img.auto-invert {
|
160
|
+
@include img-invert;
|
161
|
+
}
|
162
|
+
}
|
163
|
+
|
164
|
+
:root.darkTheme main img.auto-invert {
|
165
|
+
@include img-invert;
|
166
|
+
}
|
167
|
+
|
168
|
+
// Users can `include' this to invert images automatically in dark mode.
|
169
|
+
@mixin auto-invert-images {
|
170
|
+
@media (prefers-color-scheme: dark) {
|
171
|
+
:root:not(.lightTheme) main img:not(.no-invert) {
|
172
|
+
@include img-invert;
|
173
|
+
}
|
174
|
+
}
|
175
|
+
|
176
|
+
:root.darkTheme main img:not(.no-invert) {
|
177
|
+
@include img-invert;
|
178
|
+
}
|
179
|
+
}
|
data/assets/style.scss
CHANGED
@@ -6,10 +6,6 @@ styles: true
|
|
6
6
|
@import "hematite";
|
7
7
|
|
8
8
|
{% if site.hematite.auto_invert_imgs %}
|
9
|
-
//
|
10
|
-
@
|
11
|
-
main img:not(.no-invert) {
|
12
|
-
filter: invert(1) hue-rotate(180deg);
|
13
|
-
}
|
14
|
-
}
|
9
|
+
// In dark mode, invert the brightness of images
|
10
|
+
@include auto-invert-images;
|
15
11
|
{% endif %}
|