Repository navigation
fix: show the reading line in production - #34
Merged
Merged
Conversation
The production minifier folded animation-timeline into the animation shorthand, which cannot carry a timeline, so browsers dropped the whole declaration and the line stayed at zero. In dev the CSS is not minified, which is why it worked there. The timeline now lives in its own rule.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The reading line from #33 works in
pnpm devbut stays at zero on bounda.dev.Why. The production minifier merges
animationandanimation-timeline: --postfrom one rule intoanimation: linear both read --post.animation-timelineis a reset-only longhand ofanimation, so the shorthand cannot carry it: browsers drop the whole declaration and the animation never runs. Dev serves the CSS unminified, which is why it worked there.Fix.
animation-timelineandanimation-rangego in their own, more specific rule after the shorthand, which the minifier leaves alone.Checked on the production build (
pnpm build,dist/served statically): the computedanimation-timelineis--post, and the line is atscaleX(0.3)at 30 % of the article and1at its end.