al_folio_core 1.0.14 → 1.0.15

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f2f1858ae1303cd5ae1f61fde71d9222ca59d4df20d37cdce083789287f16eca
4
- data.tar.gz: 7bc84f2d2effc1dd18130d089d55d782c3262dd6fb86ae53f7f2314f0d30ba8c
3
+ metadata.gz: 33f4abd1450ddea086000cfada14301413b73290e2ceed10a64a6c6de52d3c43
4
+ data.tar.gz: cd5a489172370b4f7a8e8c7283dcfa9e5957e6306f3eb1de52f44b66ce6dfc3e
5
5
  SHA512:
6
- metadata.gz: db52abe776a109c94b27ecce1f18b11f334f159dcc431470f2b036fd9a332824481d39f9b522c111e75eaba63c7f9cad50a91fa326bb3f9b1933deddb67e3c35
7
- data.tar.gz: '008b6d4f07a0af5bee8315559fa4846b0ccef27128dc3329ebefb5d4e4b85ca0908845aaab4d82ff4fa0bdec2c63a6212d8e86ec1beb6e9862976c224b3aefd4'
6
+ metadata.gz: 253a185eb0d59b0e641a020774f605e6b132c71bb1c7376117651dbea1685e647d7116fc84d2ee810dc1b27fcf9ce5de357324017ce7ffa4cc7ce914ffa09429
7
+ data.tar.gz: 809c3daf737a1745b64459cddd4e7f27786e6926830bc22161ca8771d8a803b31ee39adfcb159708a4c7d5a3a163afb5723ae931e9513f21cda9f4380c2946ff
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.0.15 - 2026-08-03
4
+
5
+ - Fixed text colour staggering when switching between light and dark themes, which read as a flicker. `color`, `fill` and `stroke` are inherited properties, but the theme-transition rule applied them to `html.transition *`, so every inheriting element ran its own 240ms ease toward a parent whose colour was still animating — convergence compounded once per level of nesting, and deeper text landed visibly later before snapping when the class was removed. Measured on the about page, an `h2 > a` sat at `rgb(50,50,50)` while the paragraph beside it was already at `rgb(130,130,130)`. Those properties are now transitioned once, on the root and on `body`; non-inherited properties keep their per-element transitions. Text now changes uniformly rather than in waves.
6
+ - Fixed `transition-delay: 0` being silently dropped by the CSS parser — a `<time>` value requires a unit even for zero, unlike `<length>`. Now `0s`.
7
+ - Widened the margin before the `.transition` class is removed. It was 260ms against a 240ms transition, so a single slow frame during the theme repaint truncated the transition into a snap; the cleanup delay is now derived from the duration.
8
+
3
9
  ## 1.0.14 - 2026-08-02
4
10
 
5
11
  - Added invocation hooks for three new plugin gems: `al_rtl`, `al_email_protect` and `al_marimo`. Each is a parse-safe wrapper under `_includes/plugins/` called from `head.liquid`, `scripts.liquid` or `default.liquid`, and every call sits inside a `site.plugins contains` guard — an unguarded custom tag is a parse error on any site that has not installed the gem, which fails the whole build rather than just the feature.
@@ -120,14 +120,35 @@ progress::-moz-progress-bar {
120
120
 
121
121
  // Themes transition
122
122
 
123
+ // `color`, `fill` and `stroke` are INHERITED properties, so they are
124
+ // transitioned on the root only. Applying them to every descendant made each
125
+ // inheriting element run its own 240ms ease toward a parent that was itself
126
+ // still animating — so text converged later the deeper it sat in the tree, and
127
+ // then snapped when this class was removed. Measured on the about page: an
128
+ // `h2 > a` was roughly 2.5x behind the surrounding paragraph mid-transition.
129
+ // Transitioning them once at the root lets every descendant inherit the same
130
+ // animated value on the same frame.
131
+ // `body` is included because it declares `color` itself; without it the value
132
+ // every descendant inherits would change instantly and text would snap rather
133
+ // than fade.
123
134
  html.transition,
135
+ html.transition body {
136
+ transition-property: color, background-color, border-color, fill, stroke, box-shadow !important;
137
+ transition-duration: 240ms !important;
138
+ transition-timing-function: ease !important;
139
+ transition-delay: 0s !important;
140
+ }
141
+
142
+ // Non-inherited properties still need to be transitioned per element.
124
143
  html.transition *,
125
144
  html.transition *:before,
126
145
  html.transition *:after {
127
- transition-property: color, background-color, border-color, fill, stroke, box-shadow !important;
146
+ transition-property: background-color, border-color, box-shadow !important;
128
147
  transition-duration: 240ms !important;
129
148
  transition-timing-function: ease !important;
130
- transition-delay: 0 !important;
149
+ // `0` alone is invalid for a <time> value — unlike <length>, time requires a
150
+ // unit even for zero — so this declaration was being dropped by the parser.
151
+ transition-delay: 0s !important;
131
152
  }
132
153
 
133
154
  // Copy button
data/assets/js/theme.js CHANGED
@@ -245,11 +245,19 @@ let setSearchTheme = (theme) => {
245
245
  }
246
246
  };
247
247
 
248
+ // Keep this comfortably longer than the 240ms transition-duration in
249
+ // _utilities.scss. Removing the class mid-transition snaps every element still
250
+ // interpolating straight to its final colour, which reads as a flicker; at the
251
+ // previous 260ms there were only 20ms of slack, so one slow frame during the
252
+ // repaint was enough to truncate it.
253
+ const THEME_TRANSITION_MS = 240;
254
+ const THEME_TRANSITION_CLEANUP_MS = THEME_TRANSITION_MS + 120;
255
+
248
256
  let transTheme = () => {
249
257
  document.documentElement.classList.add("transition");
250
258
  window.setTimeout(() => {
251
259
  document.documentElement.classList.remove("transition");
252
- }, 260);
260
+ }, THEME_TRANSITION_CLEANUP_MS);
253
261
  };
254
262
 
255
263
  // Determine the expected state of the theme toggle, which can be "dark", "light", or
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AlFolioCore
4
- VERSION = "1.0.14"
4
+ VERSION = "1.0.15"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: al_folio_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.14
4
+ version: 1.0.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - al-folio maintainers
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-08-02 00:00:00.000000000 Z
11
+ date: 2026-08-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll