hematite 0.0.9 → 0.0.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3d623b260279dabc636598983bebf15e547d963ead82e21b5e8357572597bb48
4
- data.tar.gz: 00bba21df3b38ea1db9bf57d631b3ce2da97c5f077c0680831550192cc4c58d7
3
+ metadata.gz: 1c347dece80da3456bf6c8cd42bc6daafc81212dd102ab9fffb664b4c49799e4
4
+ data.tar.gz: 6218c2a7ee4243942111a7a3e7dce23bfe1be5c96304a1fc671e044f16ab4906
5
5
  SHA512:
6
- metadata.gz: 51bc1b4fbea55a7bf316d03ac9c291c3f233ab7e91fe163dd3412f23518e3f4b247c3aeafd0cc1b72bb941ec3f721b90dc949bed6cfb3572ee8a4b6ae5fff182
7
- data.tar.gz: fe620903b815435c84c0a2d45b3edb1ca10c9d2727eb129ca24c0837b55adbf5fc384086feb0228b164084616419048fec8df8c62138ad976d4a8db990a1d79b
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
- // Auto-invert images in dark mode!
10
- @media (prefers-color-scheme: dark) {
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 %}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hematite
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Henry Heino