CJK punctuation can look unexpectedly loose at a line edge or crowded beside another punctuation mark, especially when a font gives each fullwidth character a complete ideographic advance. Fixing the text by deleting characters or inserting manual spaces attacks the content rather than the typesetting rule.
CSS text-spacing-trim controls spacing around CJK punctuation in the same inline formatting context. Its values decide when fullwidth punctuation is set fullwidth or visually trimmed toward halfwidth at line starts, line ends and adjacent punctuation pairs. The property is inherited, discrete and currently specified in CSS Text Level 4.
This guide teaches the exact value model, punctuation classes, font and writing-mode boundaries, feature detection, visual tests and parent-friendly diagnostics. Because the specification itself notes spotty coverage in parts of this area, observation is labelled carefully and unsupported browsers must keep readable fallback text.
Punggol families can use this guide in short sessions around homework, CCAs and rest. The examples are proposed learning activities. They do not claim a physical tuition branch, timetable, fee, class size, school relationship or guaranteed result.
Use disposable data and repositories, preserve backups and check version-sensitive details against the linked primary source. Current documentation settles a technical contract; observation and explanation turn that contract into usable knowledge.
Find your next learning step
Choose the route that matches the present difficulty. A complete course can follow the index in order; a repair session can begin at the first unstable distinction.
Build the model
Chapters 1–4. See the property as CJK punctuation spacing, not character deletion.
Read the contract
Chapters 5–8. Learn the six spacing values plus auto and normal.
Test the boundary
Chapters 9–12. Test line edges, adjacent pairs, fonts and writing modes.
Diagnose and repair
Chapters 13–16. Diagnose specification, implementation and content boundaries.
Transfer with judgment
Chapters 17–20. Choose progressive enhancement without damaging semantics.
Open the full chapter index · Jump to capstone practice · Use the How Studying Works hub · Read the primary technical source
Complete chapter index
Chapters 1–4 · Build the model
Chapters 5–8 · Read the contract
Chapters 9–12 · Test the boundary
Chapters 13–16 · Diagnose and repair
text-spacing-trim adjusts the spacing associated with classified fullwidth punctuation; it does not remove punctuation characters from the DOM. That is the invariant to preserve when names, data or surrounding project details change.
Content remains selectable, searchable and semantically intact while layout changes. The useful question is not “Which line should I copy?” but “Which state, value or rendering decision does this operation control?” Answering that question prevents a correct-looking result from hiding a wrong mental model.
The most revealing near-miss is editing Japanese or Chinese source text to mimic the desired line edge. A learner should predict the result first, run the smallest safe case, label the observation and explain the earliest point where the prediction diverges. This turns an error into evidence rather than a verdict on ability.
Core worked example
article {
text-spacing-trim: normal;
}Explained result. The string is unchanged; the user agent changes glyph spacing or kerning where the rule applies. The explanation should identify the input, the governing rule, the observable outcome and one boundary that would change the conclusion. If any of those four parts is missing, reduce the example and trace it again.
Read the trace, not just the last line
Trace source characters, computed value and rendered advance as separate evidence. Write the trace as a sequence of labelled states. For CSS text-spacing-trim, the decisive evidence may be an iterator close, a cached classification, a glyph-spacing decision or a repository object path; printing only the final Boolean or filename can hide the mechanism that produced it.
For “The property changes spacing rather than text”, separate contract from coincidence. The contract is “text-spacing-trim adjusts the spacing associated with classified fullwidth punctuation; it does not remove punctuation characters from the DOM.” and comes from the primary specification or manual. Coincidence is what happened on one machine, font, filesystem or repository. Record both, then use “Inspect textContent before and after styling and compare only rendered geometry.” to decide whether another observation challenges the model or merely reflects the environment.
Four purposeful transfer cases
Case 1: homework evidence folder. Model “The property changes spacing rather than text” with subject folders, draft answers and a reviewed copy. Before touching a tool, state which part of the case corresponds to the input, why “text-spacing-trim adjusts the spacing associated with classified fullwidth punctuation; it does not remove punctuation characters from the DOM.” should remain invariant and what observation would expose editing Japanese or Chinese source text to mimic the desired line edge.
Reasoned route. Begin with “text-spacing-trim adjusts the spacing associated with classified fullwidth punctuation; it does not remove punctuation characters from the DOM.” Apply this procedure: Inspect textContent before and after styling and compare only rendered geometry. For the homework evidence folder, introduce one controlled variation that exposes editing Japanese or Chinese source text to mimic the desired line edge. The string is unchanged; the user agent changes glyph spacing or kerning where the rule applies. A complete answer explains why the near-miss fails, names the evidence that distinguishes it from the corrected case and transfers the rule without relying on the original variable names.
Case 2: CCA media catalogue. Contrast “The property changes spacing rather than text” with event folders, selected images and caption notes. Before touching a tool, state which part of the case corresponds to the input, why “text-spacing-trim adjusts the spacing associated with classified fullwidth punctuation; it does not remove punctuation characters from the DOM.” should remain invariant and what observation would expose editing Japanese or Chinese source text to mimic the desired line edge.
Reasoned route. Begin with “text-spacing-trim adjusts the spacing associated with classified fullwidth punctuation; it does not remove punctuation characters from the DOM.” Apply this procedure: Inspect textContent before and after styling and compare only rendered geometry. For the CCA media catalogue, introduce one controlled variation that exposes editing Japanese or Chinese source text to mimic the desired line edge. The string is unchanged; the user agent changes glyph spacing or kerning where the rule applies. A complete answer explains why the near-miss fails, names the evidence that distinguishes it from the corrected case and transfers the rule without relying on the original variable names.
Case 3: science investigation archive. Stress-test “The property changes spacing rather than text” with raw readings, cleaned tables and chart exports. Before touching a tool, state which part of the case corresponds to the input, why “text-spacing-trim adjusts the spacing associated with classified fullwidth punctuation; it does not remove punctuation characters from the DOM.” should remain invariant and what observation would expose editing Japanese or Chinese source text to mimic the desired line edge.
Reasoned route. Begin with “text-spacing-trim adjusts the spacing associated with classified fullwidth punctuation; it does not remove punctuation characters from the DOM.” Apply this procedure: Inspect textContent before and after styling and compare only rendered geometry. For the science investigation archive, introduce one controlled variation that exposes editing Japanese or Chinese source text to mimic the desired line edge. The string is unchanged; the user agent changes glyph spacing or kerning where the rule applies. A complete answer explains why the near-miss fails, names the evidence that distinguishes it from the corrected case and transfers the rule without relying on the original variable names.
Case 4: revision-note builder. Explain “The property changes spacing rather than text” with topic notes, worked examples and a generated index. Before touching a tool, state which part of the case corresponds to the input, why “text-spacing-trim adjusts the spacing associated with classified fullwidth punctuation; it does not remove punctuation characters from the DOM.” should remain invariant and what observation would expose editing Japanese or Chinese source text to mimic the desired line edge.
Reasoned route. Begin with “text-spacing-trim adjusts the spacing associated with classified fullwidth punctuation; it does not remove punctuation characters from the DOM.” Apply this procedure: Inspect textContent before and after styling and compare only rendered geometry. For the revision-note builder, introduce one controlled variation that exposes editing Japanese or Chinese source text to mimic the desired line edge. The string is unchanged; the user agent changes glyph spacing or kerning where the rule applies. A complete answer explains why the near-miss fails, names the evidence that distinguishes it from the corrected case and transfers the rule without relying on the original variable names.
Diagnostic route
- Model check: draw or list the exact values, objects, paths, characters or repository states before the operation.
- Boundary check: construct the smallest safe input that reveals editing Japanese or Chinese source text to mimic the desired line edge.
- Evidence check: distinguish a displayed result from ownership, caching, consumption, font behaviour or object type.
- Repair check: Inspect textContent before and after styling and compare only rendered geometry.
- Transfer check: repeat the rule in a second context and name what remains unchanged.
A parent does not need to memorise CSS text-spacing-trim to support “The property changes spacing rather than text”. Useful prompts are: “What did you expect?”, “Which state changed first?”, “What evidence tests text-spacing-trim adjusts the spacing associated with classified fullwidth punctuation; it does not remove punctuation characters from the DOM.?”, and “Can you make a smaller example of editing Japanese or Chinese source text to mimic the desired line edge?” These questions keep ownership with the learner while making the reasoning visible.
Practice with an explained answer
Task. Explain why copying the paragraph should preserve its punctuation. Write the prediction before running anything. Include one ordinary case and one boundary case, then explain the difference in two causal sentences.
Answer route. CSS affects layout, while the characters remain in the content. The final output alone earns only partial credit. A strong answer connects it to “text-spacing-trim adjusts the spacing associated with classified fullwidth punctuation; it does not remove punctuation characters from the DOM.”, shows the relevant intermediate evidence and states why editing Japanese or Chinese source text to mimic the desired line edge would lead to a different conclusion.
Decision and transfer
Prefer styling over manual spaces, halfwidth substitutions or deleted punctuation. Prefer the choice whose semantics and failure modes are easiest to explain for the actual job. Shorter syntax is useful only when it preserves that clarity.
Mastery of “The property changes spacing rather than text” means the learner can predict the ordinary case, recognise editing Japanese or Chinese source text to mimic the desired line edge, diagnose the earliest mistaken assumption, recover with “Inspect textContent before and after styling and compare only rendered geometry.” and defend this decision: Prefer styling over manual spaces, halfwidth substitutions or deleted punctuation. Once that causal chain is stable, continue to the next chapter rather than adding repetitions of the same surface exercise.
Previous section · Contents · Next section
text-spacing-trim is inherited and applies to text. That is the invariant to preserve when names, data or surrounding project details change.
A value on a language container can shape descendant text unless overridden. The useful question is not “Which line should I copy?” but “Which state, value or rendering decision does this operation control?” Answering that question prevents a correct-looking result from hiding a wrong mental model.
The most revealing near-miss is setting trim-all on a broad page wrapper and forgetting embedded examples with different needs. A learner should predict the result first, run the smallest safe case, label the observation and explain the earliest point where the prediction diverges. This turns an error into evidence rather than a verdict on ability.
Core worked example
[lang="ja"] { text-spacing-trim: normal; }
.demo-space { text-spacing-trim: space-all; }Explained result. The descendant receives the inherited value until a closer rule changes it. The explanation should identify the input, the governing rule, the observable outcome and one boundary that would change the conclusion. If any of those four parts is missing, reduce the example and trace it again.
Read the trace, not just the last line
Trace cascade origin, inheritance and final computed keyword. Write the trace as a sequence of labelled states. For CSS text-spacing-trim, the decisive evidence may be an iterator close, a cached classification, a glyph-spacing decision or a repository object path; printing only the final Boolean or filename can hide the mechanism that produced it.
For “The property is inherited”, separate contract from coincidence. The contract is “text-spacing-trim is inherited and applies to text.” and comes from the primary specification or manual. Coincidence is what happened on one machine, font, filesystem or repository. Record both, then use “Scope the declaration to a language or typography component and inspect computed values on descendants.” to decide whether another observation challenges the model or merely reflects the environment.
Four purposeful transfer cases
Case 1: homework evidence folder. Model “The property is inherited” with subject folders, draft answers and a reviewed copy. Before touching a tool, state which part of the case corresponds to the input, why “text-spacing-trim is inherited and applies to text.” should remain invariant and what observation would expose setting trim-all on a broad page wrapper and forgetting embedded examples with different needs.
Reasoned route. Begin with “text-spacing-trim is inherited and applies to text.” Apply this procedure: Scope the declaration to a language or typography component and inspect computed values on descendants. For the homework evidence folder, introduce one controlled variation that exposes setting trim-all on a broad page wrapper and forgetting embedded examples with different needs. The descendant receives the inherited value until a closer rule changes it. A complete answer explains why the near-miss fails, names the evidence that distinguishes it from the corrected case and transfers the rule without relying on the original variable names.
Case 2: CCA media catalogue. Contrast “The property is inherited” with event folders, selected images and caption notes. Before touching a tool, state which part of the case corresponds to the input, why “text-spacing-trim is inherited and applies to text.” should remain invariant and what observation would expose setting trim-all on a broad page wrapper and forgetting embedded examples with different needs.
Reasoned route. Begin with “text-spacing-trim is inherited and applies to text.” Apply this procedure: Scope the declaration to a language or typography component and inspect computed values on descendants. For the CCA media catalogue, introduce one controlled variation that exposes setting trim-all on a broad page wrapper and forgetting embedded examples with different needs. The descendant receives the inherited value until a closer rule changes it. A complete answer explains why the near-miss fails, names the evidence that distinguishes it from the corrected case and transfers the rule without relying on the original variable names.
Case 3: science investigation archive. Stress-test “The property is inherited” with raw readings, cleaned tables and chart exports. Before touching a tool, state which part of the case corresponds to the input, why “text-spacing-trim is inherited and applies to text.” should remain invariant and what observation would expose setting trim-all on a broad page wrapper and forgetting embedded examples with different needs.
Reasoned route. Begin with “text-spacing-trim is inherited and applies to text.” Apply this procedure: Scope the declaration to a language or typography component and inspect computed values on descendants. For the science investigation archive, introduce one controlled variation that exposes setting trim-all on a broad page wrapper and forgetting embedded examples with different needs. The descendant receives the inherited value until a closer rule changes it. A complete answer explains why the near-miss fails, names the evidence that distinguishes it from the corrected case and transfers the rule without relying on the original variable names.
Case 4: revision-note builder. Explain “The property is inherited” with topic notes, worked examples and a generated index. Before touching a tool, state which part of the case corresponds to the input, why “text-spacing-trim is inherited and applies to text.” should remain invariant and what observation would expose setting trim-all on a broad page wrapper and forgetting embedded examples with different needs.
Reasoned route. Begin with “text-spacing-trim is inherited and applies to text.” Apply this procedure: Scope the declaration to a language or typography component and inspect computed values on descendants. For the revision-note builder, introduce one controlled variation that exposes setting trim-all on a broad page wrapper and forgetting embedded examples with different needs. The descendant receives the inherited value until a closer rule changes it. A complete answer explains why the near-miss fails, names the evidence that distinguishes it from the corrected case and transfers the rule without relying on the original variable names.
Diagnostic route
- Model check: draw or list the exact values, objects, paths, characters or repository states before the operation.
- Boundary check: construct the smallest safe input that reveals setting trim-all on a broad page wrapper and forgetting embedded examples with different needs.
- Evidence check: distinguish a displayed result from ownership, caching, consumption, font behaviour or object type.
- Repair check: Scope the declaration to a language or typography component and inspect computed values on descendants.
- Transfer check: repeat the rule in a second context and name what remains unchanged.
A parent does not need to memorise CSS text-spacing-trim to support “The property is inherited”. Useful prompts are: “What did you expect?”, “Which state changed first?”, “What evidence tests text-spacing-trim is inherited and applies to text.?”, and “Can you make a smaller example of setting trim-all on a broad page wrapper and forgetting embedded examples with different needs?” These questions keep ownership with the learner while making the reasoning visible.
Practice with an explained answer
Task. Explain why a nested comparison sample needs an explicit override. Write the prediction before running anything. Include one ordinary case and one boundary case, then explain the difference in two causal sentences.
Answer route. Without it, the sample inherits the surrounding rule and cannot demonstrate a contrast. The final output alone earns only partial credit. A strong answer connects it to “text-spacing-trim is inherited and applies to text.”, shows the relevant intermediate evidence and states why setting trim-all on a broad page wrapper and forgetting embedded examples with different needs would lead to a different conclusion.
Decision and transfer
Use language-aware component boundaries rather than one global aggressive rule. Prefer the choice whose semantics and failure modes are easiest to explain for the actual job. Shorter syntax is useful only when it preserves that clarity.
Mastery of “The property is inherited” means the learner can predict the ordinary case, recognise setting trim-all on a broad page wrapper and forgetting embedded examples with different needs, diagnose the earliest mistaken assumption, recover with “Scope the declaration to a language or typography component and inspect computed values on descendants.” and defend this decision: Use language-aware component boundaries rather than one global aggressive rule. Once that causal chain is stable, continue to the next chapter rather than adding repetitions of the same surface exercise.
Previous section · Contents · Next section
CHAPTER 3 OF 20 · Build the model
3. space-all preserves fullwidth punctuation spacing
space-all sets all fullwidth punctuation characters with full-width glyph spacing. That is the invariant to preserve when names, data or surrounding project details change.
It is the baseline for keeping the full advance rather than contextually collapsing blank halves. The useful question is not “Which line should I copy?” but “Which state, value or rendering decision does this operation control?” Answering that question prevents a correct-looking result from hiding a wrong mental model.
The most revealing near-miss is describing space-all as inserting ordinary U+0020 spaces. A learner should predict the result first, run the smallest safe case, label the observation and explain the earliest point where the prediction diverges. This turns an error into evidence rather than a verdict on ability.
Core worked example
p { text-spacing-trim: space-all; }Explained result. The punctuation keeps fullwidth spacing without new text nodes. The explanation should identify the input, the governing rule, the observable outcome and one boundary that would change the conclusion. If any of those four parts is missing, reduce the example and trace it again.
Read the trace, not just the last line
Trace character, classified punctuation and chosen fullwidth spacing. Write the trace as a sequence of labelled states. For CSS text-spacing-trim, the decisive evidence may be an iterator close, a cached classification, a glyph-spacing decision or a repository object path; printing only the final Boolean or filename can hide the mechanism that produced it.
For “space-all preserves fullwidth punctuation spacing”, separate contract from coincidence. The contract is “space-all sets all fullwidth punctuation characters with full-width glyph spacing.” and comes from the primary specification or manual. Coincidence is what happened on one machine, font, filesystem or repository. Record both, then use “Compare glyph boxes or advances; do not search the DOM for added spaces.” to decide whether another observation challenges the model or merely reflects the environment.
Four purposeful transfer cases
Case 1: homework evidence folder. Model “space-all preserves fullwidth punctuation spacing” with subject folders, draft answers and a reviewed copy. Before touching a tool, state which part of the case corresponds to the input, why “space-all sets all fullwidth punctuation characters with full-width glyph spacing.” should remain invariant and what observation would expose describing space-all as inserting ordinary U+0020 spaces.
Reasoned route. Begin with “space-all sets all fullwidth punctuation characters with full-width glyph spacing.” Apply this procedure: Compare glyph boxes or advances; do not search the DOM for added spaces. For the homework evidence folder, introduce one controlled variation that exposes describing space-all as inserting ordinary U+0020 spaces. The punctuation keeps fullwidth spacing without new text nodes. A complete answer explains why the near-miss fails, names the evidence that distinguishes it from the corrected case and transfers the rule without relying on the original variable names.
Case 2: CCA media catalogue. Contrast “space-all preserves fullwidth punctuation spacing” with event folders, selected images and caption notes. Before touching a tool, state which part of the case corresponds to the input, why “space-all sets all fullwidth punctuation characters with full-width glyph spacing.” should remain invariant and what observation would expose describing space-all as inserting ordinary U+0020 spaces.
Reasoned route. Begin with “space-all sets all fullwidth punctuation characters with full-width glyph spacing.” Apply this procedure: Compare glyph boxes or advances; do not search the DOM for added spaces. For the CCA media catalogue, introduce one controlled variation that exposes describing space-all as inserting ordinary U+0020 spaces. The punctuation keeps fullwidth spacing without new text nodes. A complete answer explains why the near-miss fails, names the evidence that distinguishes it from the corrected case and transfers the rule without relying on the original variable names.
Case 3: science investigation archive. Stress-test “space-all preserves fullwidth punctuation spacing” with raw readings, cleaned tables and chart exports. Before touching a tool, state which part of the case corresponds to the input, why “space-all sets all fullwidth punctuation characters with full-width glyph spacing.” should remain invariant and what observation would expose describing space-all as inserting ordinary U+0020 spaces.
Reasoned route. Begin with “space-all sets all fullwidth punctuation characters with full-width glyph spacing.” Apply this procedure: Compare glyph boxes or advances; do not search the DOM for added spaces. For the science investigation archive, introduce one controlled variation that exposes describing space-all as inserting ordinary U+0020 spaces. The punctuation keeps fullwidth spacing without new text nodes. A complete answer explains why the near-miss fails, names the evidence that distinguishes it from the corrected case and transfers the rule without relying on the original variable names.
Case 4: revision-note builder. Explain “space-all preserves fullwidth punctuation spacing” with topic notes, worked examples and a generated index. Before touching a tool, state which part of the case corresponds to the input, why “space-all sets all fullwidth punctuation characters with full-width glyph spacing.” should remain invariant and what observation would expose describing space-all as inserting ordinary U+0020 spaces.
Reasoned route. Begin with “space-all sets all fullwidth punctuation characters with full-width glyph spacing.” Apply this procedure: Compare glyph boxes or advances; do not search the DOM for added spaces. For the revision-note builder, introduce one controlled variation that exposes describing space-all as inserting ordinary U+0020 spaces. The punctuation keeps fullwidth spacing without new text nodes. A complete answer explains why the near-miss fails, names the evidence that distinguishes it from the corrected case and transfers the rule without relying on the original variable names.
Diagnostic route
- Model check: draw or list the exact values, objects, paths, characters or repository states before the operation.
- Boundary check: construct the smallest safe input that reveals describing space-all as inserting ordinary U+0020 spaces.
- Evidence check: distinguish a displayed result from ownership, caching, consumption, font behaviour or object type.
- Repair check: Compare glyph boxes or advances; do not search the DOM for added spaces.
- Transfer check: repeat the rule in a second context and name what remains unchanged.
A parent does not need to memorise CSS text-spacing-trim to support “space-all preserves fullwidth punctuation spacing”. Useful prompts are: “What did you expect?”, “Which state changed first?”, “What evidence tests space-all sets all fullwidth punctuation characters with full-width glyph spacing.?”, and “Can you make a smaller example of describing space-all as inserting ordinary U+0020 spaces?” These questions keep ownership with the learner while making the reasoning visible.
Practice with an explained answer
Task. Use a bracket pair and explain what space-all preserves. Write the prediction before running anything. Include one ordinary case and one boundary case, then explain the difference in two causal sentences.
Answer route. It preserves the punctuation’s fullwidth advance rather than adding text. The final output alone earns only partial credit. A strong answer connects it to “space-all sets all fullwidth punctuation characters with full-width glyph spacing.”, shows the relevant intermediate evidence and states why describing space-all as inserting ordinary U+0020 spaces would lead to a different conclusion.
Decision and transfer
Choose space-all when faithful fullwidth alignment is the intended convention or fallback. Prefer the choice whose semantics and failure modes are easiest to explain for the actual job. Shorter syntax is useful only when it preserves that clarity.
Mastery of “space-all preserves fullwidth punctuation spacing” means the learner can predict the ordinary case, recognise describing space-all as inserting ordinary U+0020 spaces, diagnose the earliest mistaken assumption, recover with “Compare glyph boxes or advances; do not search the DOM for added spaces.” and defend this decision: Choose space-all when faithful fullwidth alignment is the intended convention or fallback. Once that causal chain is stable, continue to the next chapter rather than adding repetitions of the same surface exercise.
Previous section · Contents · Next section
normal keeps opening punctuation spaced at line starts, conditionally trims closing punctuation at the end when it otherwise would not fit before justification, and collapses applicable adjacent pairs. That is the invariant to preserve when names, data or surrounding project details change.
Its behaviour is contextual rather than uniformly trimmed. The useful question is not “Which line should I copy?” but “Which state, value or rendering decision does this operation control?” Answering that question prevents a correct-looking result from hiding a wrong mental model.
The most revealing near-miss is summarising normal as trim-both. A learner should predict the result first, run the smallest safe case, label the observation and explain the earliest point where the prediction diverges. This turns an error into evidence rather than a verdict on ability.
Core worked example
p { text-spacing-trim: normal; max-width: 12em; }Explained result. The three positions can produce different spacing decisions under the same value. The explanation should identify the input, the governing rule, the observable outcome and one boundary that would change the conclusion. If any of those four parts is missing, reduce the example and trace it again.
Read the trace, not just the last line
Trace line-breaking context before judging the end-edge result. Write the trace as a sequence of labelled states. For CSS text-spacing-trim, the decisive evidence may be an iterator close, a cached classification, a glyph-spacing decision or a repository object path; printing only the final Boolean or filename can hide the mechanism that produced it.
For “normal balances starts, ends and adjacent pairs”, separate contract from coincidence. The contract is “normal keeps opening punctuation spaced at line starts, conditionally trims closing punctuation at the end when it otherwise would not fit before justification, and collapses applicable adjacent pairs.” and comes from the primary specification or manual. Coincidence is what happened on one machine, font, filesystem or repository. Record both, then use “Test a line start, a line end and an adjacent pair as three distinct fixtures.” to decide whether another observation challenges the model or merely reflects the environment.
Four purposeful transfer cases
Case 1: homework evidence folder. Model “normal balances starts, ends and adjacent pairs” with subject folders, draft answers and a reviewed copy. Before touching a tool, state which part of the case corresponds to the input, why “normal keeps opening punctuation spaced at line starts, conditionally trims closing punctuation at the end when it otherwise would not fit before justification, and collapses applicable adjacent pairs.” should remain invariant and what observation would expose summarising normal as trim-both.
Reasoned route. Begin with “normal keeps opening punctuation spaced at line starts, conditionally trims closing punctuation at the end when it otherwise would not fit before justification, and collapses applicable adjacent pairs.” Apply this procedure: Test a line start, a line end and an adjacent pair as three distinct fixtures. For the homework evidence folder, introduce one controlled variation that exposes summarising normal as trim-both. The three positions can produce different spacing decisions under the same value. A complete answer explains why the near-miss fails, names the evidence that distinguishes it from the corrected case and transfers the rule without relying on the original variable names.
Case 2: CCA media catalogue. Contrast “normal balances starts, ends and adjacent pairs” with event folders, selected images and caption notes. Before touching a tool, state which part of the case corresponds to the input, why “normal keeps opening punctuation spaced at line starts, conditionally trims closing punctuation at the end when it otherwise would not fit before justification, and collapses applicable adjacent pairs.” should remain invariant and what observation would expose summarising normal as trim-both.
Reasoned route. Begin with “normal keeps opening punctuation spaced at line starts, conditionally trims closing punctuation at the end when it otherwise would not fit before justification, and collapses applicable adjacent pairs.” Apply this procedure: Test a line start, a line end and an adjacent pair as three distinct fixtures. For the CCA media catalogue, introduce one controlled variation that exposes summarising normal as trim-both. The three positions can produce different spacing decisions under the same value. A complete answer explains why the near-miss fails, names the evidence that distinguishes it from the corrected case and transfers the rule without relying on the original variable names.
Case 3: science investigation archive. Stress-test “normal balances starts, ends and adjacent pairs” with raw readings, cleaned tables and chart exports. Before touching a tool, state which part of the case corresponds to the input, why “normal keeps opening punctuation spaced at line starts, conditionally trims closing punctuation at the end when it otherwise would not fit before justification, and collapses applicable adjacent pairs.” should remain invariant and what observation would expose summarising normal as trim-both.
Reasoned route. Begin with “normal keeps opening punctuation spaced at line starts, conditionally trims closing punctuation at the end when it otherwise would not fit before justification, and collapses applicable adjacent pairs.” Apply this procedure: Test a line start, a line end and an adjacent pair as three distinct fixtures. For the science investigation archive, introduce one controlled variation that exposes summarising normal as trim-both. The three positions can produce different spacing decisions under the same value. A complete answer explains why the near-miss fails, names the evidence that distinguishes it from the corrected case and transfers the rule without relying on the original variable names.
Case 4: revision-note builder. Explain “normal balances starts, ends and adjacent pairs” with topic notes, worked examples and a generated index. Before touching a tool, state which part of the case corresponds to the input, why “normal keeps opening punctuation spaced at line starts, conditionally trims closing punctuation at the end when it otherwise would not fit before justification, and collapses applicable adjacent pairs.” should remain invariant and what observation would expose summarising normal as trim-both.
Reasoned route. Begin with “normal keeps opening punctuation spaced at line starts, conditionally trims closing punctuation at the end when it otherwise would not fit before justification, and collapses applicable adjacent pairs.” Apply this procedure: Test a line start, a line end and an adjacent pair as three distinct fixtures. For the revision-note builder, introduce one controlled variation that exposes summarising normal as trim-both. The three positions can produce different spacing decisions under the same value. A complete answer explains why the near-miss fails, names the evidence that distinguishes it from the corrected case and transfers the rule without relying on the original variable names.
Diagnostic route
- Model check: draw or list the exact values, objects, paths, characters or repository states before the operation.
- Boundary check: construct the smallest safe input that reveals summarising normal as trim-both.
- Evidence check: distinguish a displayed result from ownership, caching, consumption, font behaviour or object type.
- Repair check: Test a line start, a line end and an adjacent pair as three distinct fixtures.
- Transfer check: repeat the rule in a second context and name what remains unchanged.
A parent does not need to memorise CSS text-spacing-trim to support “normal balances starts, ends and adjacent pairs”. Useful prompts are: “What did you expect?”, “Which state changed first?”, “What evidence tests normal keeps opening punctuation spaced at line starts, conditionally trims closing punctuation at the end when it otherwise would not fit before justification, and collapses applicable adjacent pairs.?”, and “Can you make a smaller example of summarising normal as trim-both?” These questions keep ownership with the learner while making the reasoning visible.
Practice with an explained answer
Task. Create three screenshots at fixed width and annotate which rule each exercises. Write the prediction before running anything. Include one ordinary case and one boundary case, then explain the difference in two causal sentences.
Answer route. A valid test isolates start, end and adjacency rather than mixing them. The final output alone earns only partial credit. A strong answer connects it to “normal keeps opening punctuation spaced at line starts, conditionally trims closing punctuation at the end when it otherwise would not fit before justification, and collapses applicable adjacent pairs.”, shows the relevant intermediate evidence and states why summarising normal as trim-both would lead to a different conclusion.
Decision and transfer
Use normal for a balanced default and reach for stricter values only with a typographic reason. Prefer the choice whose semantics and failure modes are easiest to explain for the actual job. Shorter syntax is useful only when it preserves that clarity.
Mastery of “normal balances starts, ends and adjacent pairs” means the learner can predict the ordinary case, recognise summarising normal as trim-both, diagnose the earliest mistaken assumption, recover with “Test a line start, a line end and an adjacent pair as three distinct fixtures.” and defend this decision: Use normal for a balanced default and reach for stricter values only with a typographic reason. Once that causal chain is stable, continue to the next chapter rather than adding repetitions of the same surface exercise.
Previous section · Contents · Next section
CHAPTER 5 OF 20 · Read the contract
5. trim-start flushes opening punctuation at line starts
trim-start sets fullwidth opening punctuation flush at the start of each line and otherwise behaves as normal. That is the invariant to preserve when names, data or surrounding project details change.
It targets a start-edge problem without forcing all punctuation halfwidth. The useful question is not “Which line should I copy?” but “Which state, value or rendering decision does this operation control?” Answering that question prevents a correct-looking result from hiding a wrong mental model.
The most revealing near-miss is using trim-all when only leading brackets need correction. A learner should predict the result first, run the smallest safe case, label the observation and explain the earliest point where the prediction diverges. This turns an error into evidence rather than a verdict on ability.
Core worked example
p { text-spacing-trim: trim-start; }Explained result. Opening punctuation is trimmed at each line start while other normal rules remain. The explanation should identify the input, the governing rule, the observable outcome and one boundary that would change the conclusion. If any of those four parts is missing, reduce the example and trace it again.
Read the trace, not just the last line
Trace visual line starts, which can differ from paragraph starts. Write the trace as a sequence of labelled states. For CSS text-spacing-trim, the decisive evidence may be an iterator close, a cached classification, a glyph-spacing decision or a repository object path; printing only the final Boolean or filename can hide the mechanism that produced it.
For “trim-start flushes opening punctuation at line starts”, separate contract from coincidence. The contract is “trim-start sets fullwidth opening punctuation flush at the start of each line and otherwise behaves as normal.” and comes from the primary specification or manual. Coincidence is what happened on one machine, font, filesystem or repository. Record both, then use “Create wrapped lines with opening punctuation at the first visual position.” to decide whether another observation challenges the model or merely reflects the environment.
Four purposeful transfer cases
Case 1: homework evidence folder. Model “trim-start flushes opening punctuation at line starts” with subject folders, draft answers and a reviewed copy. Before touching a tool, state which part of the case corresponds to the input, why “trim-start sets fullwidth opening punctuation flush at the start of each line and otherwise behaves as normal.” should remain invariant and what observation would expose using trim-all when only leading brackets need correction.
Reasoned route. Begin with “trim-start sets fullwidth opening punctuation flush at the start of each line and otherwise behaves as normal.” Apply this procedure: Create wrapped lines with opening punctuation at the first visual position. For the homework evidence folder, introduce one controlled variation that exposes using trim-all when only leading brackets need correction. Opening punctuation is trimmed at each line start while other normal rules remain. A complete answer explains why the near-miss fails, names the evidence that distinguishes it from the corrected case and transfers the rule without relying on the original variable names.
Case 2: CCA media catalogue. Contrast “trim-start flushes opening punctuation at line starts” with event folders, selected images and caption notes. Before touching a tool, state which part of the case corresponds to the input, why “trim-start sets fullwidth opening punctuation flush at the start of each line and otherwise behaves as normal.” should remain invariant and what observation would expose using trim-all when only leading brackets need correction.
Reasoned route. Begin with “trim-start sets fullwidth opening punctuation flush at the start of each line and otherwise behaves as normal.” Apply this procedure: Create wrapped lines with opening punctuation at the first visual position. For the CCA media catalogue, introduce one controlled variation that exposes using trim-all when only leading brackets need correction. Opening punctuation is trimmed at each line start while other normal rules remain. A complete answer explains why the near-miss fails, names the evidence that distinguishes it from the corrected case and transfers the rule without relying on the original variable names.
Case 3: science investigation archive. Stress-test “trim-start flushes opening punctuation at line starts” with raw readings, cleaned tables and chart exports. Before touching a tool, state which part of the case corresponds to the input, why “trim-start sets fullwidth opening punctuation flush at the start of each line and otherwise behaves as normal.” should remain invariant and what observation would expose using trim-all when only leading brackets need correction.
Reasoned route. Begin with “trim-start sets fullwidth opening punctuation flush at the start of each line and otherwise behaves as normal.” Apply this procedure: Create wrapped lines with opening punctuation at the first visual position. For the science investigation archive, introduce one controlled variation that exposes using trim-all when only leading brackets need correction. Opening punctuation is trimmed at each line start while other normal rules remain. A complete answer explains why the near-miss fails, names the evidence that distinguishes it from the corrected case and transfers the rule without relying on the original variable names.
Case 4: revision-note builder. Explain “trim-start flushes opening punctuation at line starts” with topic notes, worked examples and a generated index. Before touching a tool, state which part of the case corresponds to the input, why “trim-start sets fullwidth opening punctuation flush at the start of each line and otherwise behaves as normal.” should remain invariant and what observation would expose using trim-all when only leading brackets need correction.
Reasoned route. Begin with “trim-start sets fullwidth opening punctuation flush at the start of each line and otherwise behaves as normal.” Apply this procedure: Create wrapped lines with opening punctuation at the first visual position. For the revision-note builder, introduce one controlled variation that exposes using trim-all when only leading brackets need correction. Opening punctuation is trimmed at each line start while other normal rules remain. A complete answer explains why the near-miss fails, names the evidence that distinguishes it from the corrected case and transfers the rule without relying on the original variable names.
Diagnostic route
- Model check: draw or list the exact values, objects, paths, characters or repository states before the operation.
- Boundary check: construct the smallest safe input that reveals using trim-all when only leading brackets need correction.
- Evidence check: distinguish a displayed result from ownership, caching, consumption, font behaviour or object type.
- Repair check: Create wrapped lines with opening punctuation at the first visual position.
- Transfer check: repeat the rule in a second context and name what remains unchanged.
A parent does not need to memorise CSS text-spacing-trim to support “trim-start flushes opening punctuation at line starts”. Useful prompts are: “What did you expect?”, “Which state changed first?”, “What evidence tests trim-start sets fullwidth opening punctuation flush at the start of each line and otherwise behaves as normal.?”, and “Can you make a smaller example of using trim-all when only leading brackets need correction?” These questions keep ownership with the learner while making the reasoning visible.
Practice with an explained answer
Task. Explain why a wrapped line beginning with an opening bracket is part of the test. Write the prediction before running anything. Include one ordinary case and one boundary case, then explain the difference in two causal sentences.
Answer route. The rule is line-start based, so wrapping can expose it. The final output alone earns only partial credit. A strong answer connects it to “trim-start sets fullwidth opening punctuation flush at the start of each line and otherwise behaves as normal.”, shows the relevant intermediate evidence and states why using trim-all when only leading brackets need correction would lead to a different conclusion.
Decision and transfer
Choose trim-start for start-edge alignment while preserving normal elsewhere. Prefer the choice whose semantics and failure modes are easiest to explain for the actual job. Shorter syntax is useful only when it preserves that clarity.
Mastery of “trim-start flushes opening punctuation at line starts” means the learner can predict the ordinary case, recognise using trim-all when only leading brackets need correction, diagnose the earliest mistaken assumption, recover with “Create wrapped lines with opening punctuation at the first visual position.” and defend this decision: Choose trim-start for start-edge alignment while preserving normal elsewhere. Once that causal chain is stable, continue to the next chapter rather than adding repetitions of the same surface exercise.
Previous section · Contents · Next section
trim-both trims fullwidth opening punctuation at each line start and closing punctuation at each line end, while also applying adjacent-pair collapsing. That is the invariant to preserve when names, data or surrounding project details change.
It provides a stronger edge treatment than normal. The useful question is not “Which line should I copy?” but “Which state, value or rendering decision does this operation control?” Answering that question prevents a correct-looking result from hiding a wrong mental model.
The most revealing near-miss is thinking trim-both trims every punctuation mark everywhere. A learner should predict the result first, run the smallest safe case, label the observation and explain the earliest point where the prediction diverges. This turns an error into evidence rather than a verdict on ability.
Core worked example
p { text-spacing-trim: trim-both; }Explained result. Edge marks are targeted, while interior behaviour still depends on contextual rules. The explanation should identify the input, the governing rule, the observable outcome and one boundary that would change the conclusion. If any of those four parts is missing, reduce the example and trace it again.
Read the trace, not just the last line
Trace line start, interior, line end and adjacent pair separately. Write the trace as a sequence of labelled states. For CSS text-spacing-trim, the decisive evidence may be an iterator close, a cached classification, a glyph-spacing decision or a repository object path; printing only the final Boolean or filename can hide the mechanism that produced it.
For “trim-both controls both line edges”, separate contract from coincidence. The contract is “trim-both trims fullwidth opening punctuation at each line start and closing punctuation at each line end, while also applying adjacent-pair collapsing.” and comes from the primary specification or manual. Coincidence is what happened on one machine, font, filesystem or repository. Record both, then use “Contrast an interior isolated punctuation mark with marks at both edges.” to decide whether another observation challenges the model or merely reflects the environment.
Four purposeful transfer cases
Case 1: homework evidence folder. Model “trim-both controls both line edges” with subject folders, draft answers and a reviewed copy. Before touching a tool, state which part of the case corresponds to the input, why “trim-both trims fullwidth opening punctuation at each line start and closing punctuation at each line end, while also applying adjacent-pair collapsing.” should remain invariant and what observation would expose thinking trim-both trims every punctuation mark everywhere.
Reasoned route. Begin with “trim-both trims fullwidth opening punctuation at each line start and closing punctuation at each line end, while also applying adjacent-pair collapsing.” Apply this procedure: Contrast an interior isolated punctuation mark with marks at both edges. For the homework evidence folder, introduce one controlled variation that exposes thinking trim-both trims every punctuation mark everywhere. Edge marks are targeted, while interior behaviour still depends on contextual rules. A complete answer explains why the near-miss fails, names the evidence that distinguishes it from the corrected case and transfers the rule without relying on the original variable names.
Case 2: CCA media catalogue. Contrast “trim-both controls both line edges” with event folders, selected images and caption notes. Before touching a tool, state which part of the case corresponds to the input, why “trim-both trims fullwidth opening punctuation at each line start and closing punctuation at each line end, while also applying adjacent-pair collapsing.” should remain invariant and what observation would expose thinking trim-both trims every punctuation mark everywhere.
Reasoned route. Begin with “trim-both trims fullwidth opening punctuation at each line start and closing punctuation at each line end, while also applying adjacent-pair collapsing.” Apply this procedure: Contrast an interior isolated punctuation mark with marks at both edges. For the CCA media catalogue, introduce one controlled variation that exposes thinking trim-both trims every punctuation mark everywhere. Edge marks are targeted, while interior behaviour still depends on contextual rules. A complete answer explains why the near-miss fails, names the evidence that distinguishes it from the corrected case and transfers the rule without relying on the original variable names.
Case 3: science investigation archive. Stress-test “trim-both controls both line edges” with raw readings, cleaned tables and chart exports. Before touching a tool, state which part of the case corresponds to the input, why “trim-both trims fullwidth opening punctuation at each line start and closing punctuation at each line end, while also applying adjacent-pair collapsing.” should remain invariant and what observation would expose thinking trim-both trims every punctuation mark everywhere.
Reasoned route. Begin with “trim-both trims fullwidth opening punctuation at each line start and closing punctuation at each line end, while also applying adjacent-pair collapsing.” Apply this procedure: Contrast an interior isolated punctuation mark with marks at both edges. For the science investigation archive, introduce one controlled variation that exposes thinking trim-both trims every punctuation mark everywhere. Edge marks are targeted, while interior behaviour still depends on contextual rules. A complete answer explains why the near-miss fails, names the evidence that distinguishes it from the corrected case and transfers the rule without relying on the original variable names.
Case 4: revision-note builder. Explain “trim-both controls both line edges” with topic notes, worked examples and a generated index. Before touching a tool, state which part of the case corresponds to the input, why “trim-both trims fullwidth opening punctuation at each line start and closing punctuation at each line end, while also applying adjacent-pair collapsing.” should remain invariant and what observation would expose thinking trim-both trims every punctuation mark everywhere.
Reasoned route. Begin with “trim-both trims fullwidth opening punctuation at each line start and closing punctuation at each line end, while also applying adjacent-pair collapsing.” Apply this procedure: Contrast an interior isolated punctuation mark with marks at both edges. For the revision-note builder, introduce one controlled variation that exposes thinking trim-both trims every punctuation mark everywhere. Edge marks are targeted, while interior behaviour still depends on contextual rules. A complete answer explains why the near-miss fails, names the evidence that distinguishes it from the corrected case and transfers the rule without relying on the original variable names.
Diagnostic route
- Model check: draw or list the exact values, objects, paths, characters or repository states before the operation.
- Boundary check: construct the smallest safe input that reveals thinking trim-both trims every punctuation mark everywhere.
- Evidence check: distinguish a displayed result from ownership, caching, consumption, font behaviour or object type.
- Repair check: Contrast an interior isolated punctuation mark with marks at both edges.
- Transfer check: repeat the rule in a second context and name what remains unchanged.
A parent does not need to memorise CSS text-spacing-trim to support “trim-both controls both line edges”. Useful prompts are: “What did you expect?”, “Which state changed first?”, “What evidence tests trim-both trims fullwidth opening punctuation at each line start and closing punctuation at each line end, while also applying adjacent-pair collapsing.?”, and “Can you make a smaller example of thinking trim-both trims every punctuation mark everywhere?” These questions keep ownership with the learner while making the reasoning visible.
Practice with an explained answer
Task. Predict which of four punctuation positions are directly affected. Write the prediction before running anything. Include one ordinary case and one boundary case, then explain the difference in two causal sentences.
Answer route. Starts and ends are direct edge targets; interior isolated marks are not universally trimmed. The final output alone earns only partial credit. A strong answer connects it to “trim-both trims fullwidth opening punctuation at each line start and closing punctuation at each line end, while also applying adjacent-pair collapsing.”, shows the relevant intermediate evidence and states why thinking trim-both trims every punctuation mark everywhere would lead to a different conclusion.
Decision and transfer
Use trim-both when flush line edges are an explicit typesetting goal. Prefer the choice whose semantics and failure modes are easiest to explain for the actual job. Shorter syntax is useful only when it preserves that clarity.
Mastery of “trim-both controls both line edges” means the learner can predict the ordinary case, recognise thinking trim-both trims every punctuation mark everywhere, diagnose the earliest mistaken assumption, recover with “Contrast an interior isolated punctuation mark with marks at both edges.” and defend this decision: Use trim-both when flush line edges are an explicit typesetting goal. Once that causal chain is stable, continue to the next chapter rather than adding repetitions of the same surface exercise.
Previous section · Contents · Next section
trim-all sets fullwidth opening, closing and middle-dot punctuation with half-width spacing regardless of position or neighbours. That is the invariant to preserve when names, data or surrounding project details change.
This is the most aggressive value and can change rhythm throughout a paragraph. The useful question is not “Which line should I copy?” but “Which state, value or rendering decision does this operation control?” Answering that question prevents a correct-looking result from hiding a wrong mental model.
The most revealing near-miss is using trim-all as a generic compact mode without reading the language and font context. A learner should predict the result first, run the smallest safe case, label the observation and explain the earliest point where the prediction diverges. This turns an error into evidence rather than a verdict on ability.
Core worked example
p { text-spacing-trim: trim-all; }Explained result. The rule applies beyond edges and adjacency, so interior rhythm can change. The explanation should identify the input, the governing rule, the observable outcome and one boundary that would change the conclusion. If any of those four parts is missing, reduce the example and trace it again.
Read the trace, not just the last line
Trace punctuation class and the unconditional trim decision. Write the trace as a sequence of labelled states. For CSS text-spacing-trim, the decisive evidence may be an iterator close, a cached classification, a glyph-spacing decision or a repository object path; printing only the final Boolean or filename can hide the mechanism that produced it.
For “trim-all removes contextual restraint”, separate contract from coincidence. The contract is “trim-all sets fullwidth opening, closing and middle-dot punctuation with half-width spacing regardless of position or neighbours.” and comes from the primary specification or manual. Coincidence is what happened on one machine, font, filesystem or repository. Record both, then use “Compare whole paragraphs, not one isolated pair, and include middle-dot punctuation.” to decide whether another observation challenges the model or merely reflects the environment.
Four purposeful transfer cases
Case 1: homework evidence folder. Model “trim-all removes contextual restraint” with subject folders, draft answers and a reviewed copy. Before touching a tool, state which part of the case corresponds to the input, why “trim-all sets fullwidth opening, closing and middle-dot punctuation with half-width spacing regardless of position or neighbours.” should remain invariant and what observation would expose using trim-all as a generic compact mode without reading the language and font context.
Reasoned route. Begin with “trim-all sets fullwidth opening, closing and middle-dot punctuation with half-width spacing regardless of position or neighbours.” Apply this procedure: Compare whole paragraphs, not one isolated pair, and include middle-dot punctuation. For the homework evidence folder, introduce one controlled variation that exposes using trim-all as a generic compact mode without reading the language and font context. The rule applies beyond edges and adjacency, so interior rhythm can change. A complete answer explains why the near-miss fails, names the evidence that distinguishes it from the corrected case and transfers the rule without relying on the original variable names.
Case 2: CCA media catalogue. Contrast “trim-all removes contextual restraint” with event folders, selected images and caption notes. Before touching a tool, state which part of the case corresponds to the input, why “trim-all sets fullwidth opening, closing and middle-dot punctuation with half-width spacing regardless of position or neighbours.” should remain invariant and what observation would expose using trim-all as a generic compact mode without reading the language and font context.
Reasoned route. Begin with “trim-all sets fullwidth opening, closing and middle-dot punctuation with half-width spacing regardless of position or neighbours.” Apply this procedure: Compare whole paragraphs, not one isolated pair, and include middle-dot punctuation. For the CCA media catalogue, introduce one controlled variation that exposes using trim-all as a generic compact mode without reading the language and font context. The rule applies beyond edges and adjacency, so interior rhythm can change. A complete answer explains why the near-miss fails, names the evidence that distinguishes it from the corrected case and transfers the rule without relying on the original variable names.
Case 3: science investigation archive. Stress-test “trim-all removes contextual restraint” with raw readings, cleaned tables and chart exports. Before touching a tool, state which part of the case corresponds to the input, why “trim-all sets fullwidth opening, closing and middle-dot punctuation with half-width spacing regardless of position or neighbours.” should remain invariant and what observation would expose using trim-all as a generic compact mode without reading the language and font context.
Reasoned route. Begin with “trim-all sets fullwidth opening, closing and middle-dot punctuation with half-width spacing regardless of position or neighbours.” Apply this procedure: Compare whole paragraphs, not one isolated pair, and include middle-dot punctuation. For the science investigation archive, introduce one controlled variation that exposes using trim-all as a generic compact mode without reading the language and font context. The rule applies beyond edges and adjacency, so interior rhythm can change. A complete answer explains why the near-miss fails, names the evidence that distinguishes it from the corrected case and transfers the rule without relying on the original variable names.
Case 4: revision-note builder. Explain “trim-all removes contextual restraint” with topic notes, worked examples and a generated index. Before touching a tool, state which part of the case corresponds to the input, why “trim-all sets fullwidth opening, closing and middle-dot punctuation with half-width spacing regardless of position or neighbours.” should remain invariant and what observation would expose using trim-all as a generic compact mode without reading the language and font context.
Reasoned route. Begin with “trim-all sets fullwidth opening, closing and middle-dot punctuation with half-width spacing regardless of position or neighbours.” Apply this procedure: Compare whole paragraphs, not one isolated pair, and include middle-dot punctuation. For the revision-note builder, introduce one controlled variation that exposes using trim-all as a generic compact mode without reading the language and font context. The rule applies beyond edges and adjacency, so interior rhythm can change. A complete answer explains why the near-miss fails, names the evidence that distinguishes it from the corrected case and transfers the rule without relying on the original variable names.
Diagnostic route
- Model check: draw or list the exact values, objects, paths, characters or repository states before the operation.
- Boundary check: construct the smallest safe input that reveals using trim-all as a generic compact mode without reading the language and font context.
- Evidence check: distinguish a displayed result from ownership, caching, consumption, font behaviour or object type.
- Repair check: Compare whole paragraphs, not one isolated pair, and include middle-dot punctuation.
- Transfer check: repeat the rule in a second context and name what remains unchanged.
A parent does not need to memorise CSS text-spacing-trim to support “trim-all removes contextual restraint”. Useful prompts are: “What did you expect?”, “Which state changed first?”, “What evidence tests trim-all sets fullwidth opening, closing and middle-dot punctuation with half-width spacing regardless of position or neighbours.?”, and “Can you make a smaller example of using trim-all as a generic compact mode without reading the language and font context?” These questions keep ownership with the learner while making the reasoning visible.
Practice with an explained answer
Task. Explain why a middle dot belongs in the fixture. Write the prediction before running anything. Include one ordinary case and one boundary case, then explain the difference in two causal sentences.
Answer route. trim-all explicitly includes fullwidth middle-dot punctuation. The final output alone earns only partial credit. A strong answer connects it to “trim-all sets fullwidth opening, closing and middle-dot punctuation with half-width spacing regardless of position or neighbours.”, shows the relevant intermediate evidence and states why using trim-all as a generic compact mode without reading the language and font context would lead to a different conclusion.
Decision and transfer
Reserve trim-all for reviewed typographic systems rather than casual compression. Prefer the choice whose semantics and failure modes are easiest to explain for the actual job. Shorter syntax is useful only when it preserves that clarity.
Mastery of “trim-all removes contextual restraint” means the learner can predict the ordinary case, recognise using trim-all as a generic compact mode without reading the language and font context, diagnose the earliest mistaken assumption, recover with “Compare whole paragraphs, not one isolated pair, and include middle-dot punctuation.” and defend this decision: Reserve trim-all for reviewed typographic systems rather than casual compression. Once that causal chain is stable, continue to the next chapter rather than adding repetitions of the same surface exercise.
Previous section · Contents · Next section
space-first keeps opening punctuation fullwidth on the first line of a block and after forced line breaks, then otherwise follows normal-related behaviour. That is the invariant to preserve when names, data or surrounding project details change.
It supports existing content that simulated indentation with ideographic spaces and omitted them before hanging punctuation. The useful question is not “Which line should I copy?” but “Which state, value or rendering decision does this operation control?” Answering that question prevents a correct-looking result from hiding a wrong mental model.
The most revealing near-miss is choosing space-first simply because the name sounds beginner-friendly. A learner should predict the result first, run the smallest safe case, label the observation and explain the earliest point where the prediction diverges. This turns an error into evidence rather than a verdict on ability.
Core worked example
p.legacy { text-spacing-trim: space-first; }Explained result. The first-line treatment protects the expected indent distinction in that content model. The explanation should identify the input, the governing rule, the observable outcome and one boundary that would change the conclusion. If any of those four parts is missing, reduce the example and trace it again.
Read the trace, not just the last line
Trace first line, forced-break line and ordinary wrapped line separately. Write the trace as a sequence of labelled states. For CSS text-spacing-trim, the decisive evidence may be an iterator close, a cached classification, a glyph-spacing decision or a repository object path; printing only the final Boolean or filename can hide the mechanism that produced it.
For “space-first exists for compatibility”, separate contract from coincidence. The contract is “space-first keeps opening punctuation fullwidth on the first line of a block and after forced line breaks, then otherwise follows normal-related behaviour.” and comes from the primary specification or manual. Coincidence is what happened on one machine, font, filesystem or repository. Record both, then use “Reproduce the legacy indentation pattern before deciding whether compatibility is needed.” to decide whether another observation challenges the model or merely reflects the environment.
Four purposeful transfer cases
Case 1: homework evidence folder. Model “space-first exists for compatibility” with subject folders, draft answers and a reviewed copy. Before touching a tool, state which part of the case corresponds to the input, why “space-first keeps opening punctuation fullwidth on the first line of a block and after forced line breaks, then otherwise follows normal-related behaviour.” should remain invariant and what observation would expose choosing space-first simply because the name sounds beginner-friendly.
Reasoned route. Begin with “space-first keeps opening punctuation fullwidth on the first line of a block and after forced line breaks, then otherwise follows normal-related behaviour.” Apply this procedure: Reproduce the legacy indentation pattern before deciding whether compatibility is needed. For the homework evidence folder, introduce one controlled variation that exposes choosing space-first simply because the name sounds beginner-friendly. The first-line treatment protects the expected indent distinction in that content model. A complete answer explains why the near-miss fails, names the evidence that distinguishes it from the corrected case and transfers the rule without relying on the original variable names.
Case 2: CCA media catalogue. Contrast “space-first exists for compatibility” with event folders, selected images and caption notes. Before touching a tool, state which part of the case corresponds to the input, why “space-first keeps opening punctuation fullwidth on the first line of a block and after forced line breaks, then otherwise follows normal-related behaviour.” should remain invariant and what observation would expose choosing space-first simply because the name sounds beginner-friendly.
Reasoned route. Begin with “space-first keeps opening punctuation fullwidth on the first line of a block and after forced line breaks, then otherwise follows normal-related behaviour.” Apply this procedure: Reproduce the legacy indentation pattern before deciding whether compatibility is needed. For the CCA media catalogue, introduce one controlled variation that exposes choosing space-first simply because the name sounds beginner-friendly. The first-line treatment protects the expected indent distinction in that content model. A complete answer explains why the near-miss fails, names the evidence that distinguishes it from the corrected case and transfers the rule without relying on the original variable names.
Case 3: science investigation archive. Stress-test “space-first exists for compatibility” with raw readings, cleaned tables and chart exports. Before touching a tool, state which part of the case corresponds to the input, why “space-first keeps opening punctuation fullwidth on the first line of a block and after forced line breaks, then otherwise follows normal-related behaviour.” should remain invariant and what observation would expose choosing space-first simply because the name sounds beginner-friendly.
Reasoned route. Begin with “space-first keeps opening punctuation fullwidth on the first line of a block and after forced line breaks, then otherwise follows normal-related behaviour.” Apply this procedure: Reproduce the legacy indentation pattern before deciding whether compatibility is needed. For the science investigation archive, introduce one controlled variation that exposes choosing space-first simply because the name sounds beginner-friendly. The first-line treatment protects the expected indent distinction in that content model. A complete answer explains why the near-miss fails, names the evidence that distinguishes it from the corrected case and transfers the rule without relying on the original variable names.
Case 4: revision-note builder. Explain “space-first exists for compatibility” with topic notes, worked examples and a generated index. Before touching a tool, state which part of the case corresponds to the input, why “space-first keeps opening punctuation fullwidth on the first line of a block and after forced line breaks, then otherwise follows normal-related behaviour.” should remain invariant and what observation would expose choosing space-first simply because the name sounds beginner-friendly.
Reasoned route. Begin with “space-first keeps opening punctuation fullwidth on the first line of a block and after forced line breaks, then otherwise follows normal-related behaviour.” Apply this procedure: Reproduce the legacy indentation pattern before deciding whether compatibility is needed. For the revision-note builder, introduce one controlled variation that exposes choosing space-first simply because the name sounds beginner-friendly. The first-line treatment protects the expected indent distinction in that content model. A complete answer explains why the near-miss fails, names the evidence that distinguishes it from the corrected case and transfers the rule without relying on the original variable names.
Diagnostic route
- Model check: draw or list the exact values, objects, paths, characters or repository states before the operation.
- Boundary check: construct the smallest safe input that reveals choosing space-first simply because the name sounds beginner-friendly.
- Evidence check: distinguish a displayed result from ownership, caching, consumption, font behaviour or object type.
- Repair check: Reproduce the legacy indentation pattern before deciding whether compatibility is needed.
- Transfer check: repeat the rule in a second context and name what remains unchanged.
A parent does not need to memorise CSS text-spacing-trim to support “space-first exists for compatibility”. Useful prompts are: “What did you expect?”, “Which state changed first?”, “What evidence tests space-first keeps opening punctuation fullwidth on the first line of a block and after forced line breaks, then otherwise follows normal-related behaviour.?”, and “Can you make a smaller example of choosing space-first simply because the name sounds beginner-friendly?” These questions keep ownership with the learner while making the reasoning visible.
Practice with an explained answer
Task. Explain why this value is not the default recommendation for new semantic HTML. Write the prediction before running anything. Include one ordinary case and one boundary case, then explain the difference in two causal sentences.
Answer route. It addresses legacy content conventions rather than replacing text-indent and hanging-punctuation. The final output alone earns only partial credit. A strong answer connects it to “space-first keeps opening punctuation fullwidth on the first line of a block and after forced line breaks, then otherwise follows normal-related behaviour.”, shows the relevant intermediate evidence and states why choosing space-first simply because the name sounds beginner-friendly would lead to a different conclusion.
Decision and transfer
For new work, keep indentation in CSS; use space-first only for a verified compatibility job. Prefer the choice whose semantics and failure modes are easiest to explain for the actual job. Shorter syntax is useful only when it preserves that clarity.
Mastery of “space-first exists for compatibility” means the learner can predict the ordinary case, recognise choosing space-first simply because the name sounds beginner-friendly, diagnose the earliest mistaken assumption, recover with “Reproduce the legacy indentation pattern before deciding whether compatibility is needed.” and defend this decision: For new work, keep indentation in CSS; use space-first only for a verified compatibility job. Once that causal chain is stable, continue to the next chapter rather than adding repetitions of the same surface exercise.
Previous section · Contents · Next section
auto lets the user agent choose typographically high-quality spacing values, potentially by platform. That is the invariant to preserve when names, data or surrounding project details change.
The result can differ across environments by design. The useful question is not “Which line should I copy?” but “Which state, value or rendering decision does this operation control?” Answering that question prevents a correct-looking result from hiding a wrong mental model.
The most revealing near-miss is using auto in a pixel-identical cross-platform acceptance test. A learner should predict the result first, run the smallest safe case, label the observation and explain the earliest point where the prediction diverges. This turns an error into evidence rather than a verdict on ability.
Core worked example
p { text-spacing-trim: auto; }Explained result. Platform variation is permitted, so exact geometry is not the contract. The explanation should identify the input, the governing rule, the observable outcome and one boundary that would change the conclusion. If any of those four parts is missing, reduce the example and trace it again.
Read the trace, not just the last line
Trace specified auto, computed keyword and observed platform choice separately. Write the trace as a sequence of labelled states. For CSS text-spacing-trim, the decisive evidence may be an iterator close, a cached classification, a glyph-spacing decision or a repository object path; printing only the final Boolean or filename can hide the mechanism that produced it.
For “auto delegates the choice to the user agent”, separate contract from coincidence. The contract is “auto lets the user agent choose typographically high-quality spacing values, potentially by platform.” and comes from the primary specification or manual. Coincidence is what happened on one machine, font, filesystem or repository. Record both, then use “Test readability and invariants rather than one universal screenshot, or choose a specific keyword.” to decide whether another observation challenges the model or merely reflects the environment.
Four purposeful transfer cases
Case 1: homework evidence folder. Model “auto delegates the choice to the user agent” with subject folders, draft answers and a reviewed copy. Before touching a tool, state which part of the case corresponds to the input, why “auto lets the user agent choose typographically high-quality spacing values, potentially by platform.” should remain invariant and what observation would expose using auto in a pixel-identical cross-platform acceptance test.
Reasoned route. Begin with “auto lets the user agent choose typographically high-quality spacing values, potentially by platform.” Apply this procedure: Test readability and invariants rather than one universal screenshot, or choose a specific keyword. For the homework evidence folder, introduce one controlled variation that exposes using auto in a pixel-identical cross-platform acceptance test. Platform variation is permitted, so exact geometry is not the contract. A complete answer explains why the near-miss fails, names the evidence that distinguishes it from the corrected case and transfers the rule without relying on the original variable names.
Case 2: CCA media catalogue. Contrast “auto delegates the choice to the user agent” with event folders, selected images and caption notes. Before touching a tool, state which part of the case corresponds to the input, why “auto lets the user agent choose typographically high-quality spacing values, potentially by platform.” should remain invariant and what observation would expose using auto in a pixel-identical cross-platform acceptance test.
Reasoned route. Begin with “auto lets the user agent choose typographically high-quality spacing values, potentially by platform.” Apply this procedure: Test readability and invariants rather than one universal screenshot, or choose a specific keyword. For the CCA media catalogue, introduce one controlled variation that exposes using auto in a pixel-identical cross-platform acceptance test. Platform variation is permitted, so exact geometry is not the contract. A complete answer explains why the near-miss fails, names the evidence that distinguishes it from the corrected case and transfers the rule without relying on the original variable names.
Case 3: science investigation archive. Stress-test “auto delegates the choice to the user agent” with raw readings, cleaned tables and chart exports. Before touching a tool, state which part of the case corresponds to the input, why “auto lets the user agent choose typographically high-quality spacing values, potentially by platform.” should remain invariant and what observation would expose using auto in a pixel-identical cross-platform acceptance test.
Reasoned route. Begin with “auto lets the user agent choose typographically high-quality spacing values, potentially by platform.” Apply this procedure: Test readability and invariants rather than one universal screenshot, or choose a specific keyword. For the science investigation archive, introduce one controlled variation that exposes using auto in a pixel-identical cross-platform acceptance test. Platform variation is permitted, so exact geometry is not the contract. A complete answer explains why the near-miss fails, names the evidence that distinguishes it from the corrected case and transfers the rule without relying on the original variable names.
Case 4: revision-note builder. Explain “auto delegates the choice to the user agent” with topic notes, worked examples and a generated index. Before touching a tool, state which part of the case corresponds to the input, why “auto lets the user agent choose typographically high-quality spacing values, potentially by platform.” should remain invariant and what observation would expose using auto in a pixel-identical cross-platform acceptance test.
Reasoned route. Begin with “auto lets the user agent choose typographically high-quality spacing values, potentially by platform.” Apply this procedure: Test readability and invariants rather than one universal screenshot, or choose a specific keyword. For the revision-note builder, introduce one controlled variation that exposes using auto in a pixel-identical cross-platform acceptance test. Platform variation is permitted, so exact geometry is not the contract. A complete answer explains why the near-miss fails, names the evidence that distinguishes it from the corrected case and transfers the rule without relying on the original variable names.
Diagnostic route
- Model check: draw or list the exact values, objects, paths, characters or repository states before the operation.
- Boundary check: construct the smallest safe input that reveals using auto in a pixel-identical cross-platform acceptance test.
- Evidence check: distinguish a displayed result from ownership, caching, consumption, font behaviour or object type.
- Repair check: Test readability and invariants rather than one universal screenshot, or choose a specific keyword.
- Transfer check: repeat the rule in a second context and name what remains unchanged.
A parent does not need to memorise CSS text-spacing-trim to support “auto delegates the choice to the user agent”. Useful prompts are: “What did you expect?”, “Which state changed first?”, “What evidence tests auto lets the user agent choose typographically high-quality spacing values, potentially by platform.?”, and “Can you make a smaller example of using auto in a pixel-identical cross-platform acceptance test?” These questions keep ownership with the learner while making the reasoning visible.
Practice with an explained answer
Task. Write an acceptance criterion appropriate for auto. Write the prediction before running anything. Include one ordinary case and one boundary case, then explain the difference in two causal sentences.
Answer route. Require legible punctuation and preserved content, not identical spacing on every platform. The final output alone earns only partial credit. A strong answer connects it to “auto lets the user agent choose typographically high-quality spacing values, potentially by platform.”, shows the relevant intermediate evidence and states why using auto in a pixel-identical cross-platform acceptance test would lead to a different conclusion.
Decision and transfer
Choose auto when native quality matters more than cross-platform uniformity. Prefer the choice whose semantics and failure modes are easiest to explain for the actual job. Shorter syntax is useful only when it preserves that clarity.
Mastery of “auto delegates the choice to the user agent” means the learner can predict the ordinary case, recognise using auto in a pixel-identical cross-platform acceptance test, diagnose the earliest mistaken assumption, recover with “Test readability and invariants rather than one universal screenshot, or choose a specific keyword.” and defend this decision: Choose auto when native quality matters more than cross-platform uniformity. Once that causal chain is stable, continue to the next chapter rather than adding repetitions of the same surface exercise.
Previous section · Contents · Next section
CHAPTER 10 OF 20 · Test the boundary
10. Adjacent punctuation pairs have special collapsing rules
Except for space-all and some font cases, contextual values can collapse spacing between classified adjacent punctuation pairs. That is the invariant to preserve when names, data or surrounding project details change.
Repeated brackets, closing-opening sequences and middle dots expose this rule. The useful question is not “Which line should I copy?” but “Which state, value or rendering decision does this operation control?” Answering that question prevents a correct-looking result from hiding a wrong mental model.
The most revealing near-miss is testing only one isolated full stop and concluding the property does nothing. A learner should predict the result first, run the smallest safe case, label the observation and explain the earliest point where the prediction diverges. This turns an error into evidence rather than a verdict on ability.
Core worked example
const samples = ["〔(", "〕(", ")〕", ")・"];Explained result. The pair fixture reveals contextual collapse that isolated punctuation cannot. The explanation should identify the input, the governing rule, the observable outcome and one boundary that would change the conclusion. If any of those four parts is missing, reduce the example and trace it again.
Read the trace, not just the last line
Trace both characters’ classes and which blank half is collapsed. Write the trace as a sequence of labelled states. For CSS text-spacing-trim, the decisive evidence may be an iterator close, a cached classification, a glyph-spacing decision or a repository object path; printing only the final Boolean or filename can hide the mechanism that produced it.
For “Adjacent punctuation pairs have special collapsing rules”, separate contract from coincidence. The contract is “Except for space-all and some font cases, contextual values can collapse spacing between classified adjacent punctuation pairs.” and comes from the primary specification or manual. Coincidence is what happened on one machine, font, filesystem or repository. Record both, then use “Build a matrix of opening-opening, closing-opening, closing-closing and middle-dot pairs.” to decide whether another observation challenges the model or merely reflects the environment.
Four purposeful transfer cases
Case 1: homework evidence folder. Model “Adjacent punctuation pairs have special collapsing rules” with subject folders, draft answers and a reviewed copy. Before touching a tool, state which part of the case corresponds to the input, why “Except for space-all and some font cases, contextual values can collapse spacing between classified adjacent punctuation pairs.” should remain invariant and what observation would expose testing only one isolated full stop and concluding the property does nothing.
Reasoned route. Begin with “Except for space-all and some font cases, contextual values can collapse spacing between classified adjacent punctuation pairs.” Apply this procedure: Build a matrix of opening-opening, closing-opening, closing-closing and middle-dot pairs. For the homework evidence folder, introduce one controlled variation that exposes testing only one isolated full stop and concluding the property does nothing. The pair fixture reveals contextual collapse that isolated punctuation cannot. A complete answer explains why the near-miss fails, names the evidence that distinguishes it from the corrected case and transfers the rule without relying on the original variable names.
Case 2: CCA media catalogue. Contrast “Adjacent punctuation pairs have special collapsing rules” with event folders, selected images and caption notes. Before touching a tool, state which part of the case corresponds to the input, why “Except for space-all and some font cases, contextual values can collapse spacing between classified adjacent punctuation pairs.” should remain invariant and what observation would expose testing only one isolated full stop and concluding the property does nothing.
Reasoned route. Begin with “Except for space-all and some font cases, contextual values can collapse spacing between classified adjacent punctuation pairs.” Apply this procedure: Build a matrix of opening-opening, closing-opening, closing-closing and middle-dot pairs. For the CCA media catalogue, introduce one controlled variation that exposes testing only one isolated full stop and concluding the property does nothing. The pair fixture reveals contextual collapse that isolated punctuation cannot. A complete answer explains why the near-miss fails, names the evidence that distinguishes it from the corrected case and transfers the rule without relying on the original variable names.
Case 3: science investigation archive. Stress-test “Adjacent punctuation pairs have special collapsing rules” with raw readings, cleaned tables and chart exports. Before touching a tool, state which part of the case corresponds to the input, why “Except for space-all and some font cases, contextual values can collapse spacing between classified adjacent punctuation pairs.” should remain invariant and what observation would expose testing only one isolated full stop and concluding the property does nothing.
Reasoned route. Begin with “Except for space-all and some font cases, contextual values can collapse spacing between classified adjacent punctuation pairs.” Apply this procedure: Build a matrix of opening-opening, closing-opening, closing-closing and middle-dot pairs. For the science investigation archive, introduce one controlled variation that exposes testing only one isolated full stop and concluding the property does nothing. The pair fixture reveals contextual collapse that isolated punctuation cannot. A complete answer explains why the near-miss fails, names the evidence that distinguishes it from the corrected case and transfers the rule without relying on the original variable names.
Case 4: revision-note builder. Explain “Adjacent punctuation pairs have special collapsing rules” with topic notes, worked examples and a generated index. Before touching a tool, state which part of the case corresponds to the input, why “Except for space-all and some font cases, contextual values can collapse spacing between classified adjacent punctuation pairs.” should remain invariant and what observation would expose testing only one isolated full stop and concluding the property does nothing.
Reasoned route. Begin with “Except for space-all and some font cases, contextual values can collapse spacing between classified adjacent punctuation pairs.” Apply this procedure: Build a matrix of opening-opening, closing-opening, closing-closing and middle-dot pairs. For the revision-note builder, introduce one controlled variation that exposes testing only one isolated full stop and concluding the property does nothing. The pair fixture reveals contextual collapse that isolated punctuation cannot. A complete answer explains why the near-miss fails, names the evidence that distinguishes it from the corrected case and transfers the rule without relying on the original variable names.
Diagnostic route
- Model check: draw or list the exact values, objects, paths, characters or repository states before the operation.
- Boundary check: construct the smallest safe input that reveals testing only one isolated full stop and concluding the property does nothing.
- Evidence check: distinguish a displayed result from ownership, caching, consumption, font behaviour or object type.
- Repair check: Build a matrix of opening-opening, closing-opening, closing-closing and middle-dot pairs.
- Transfer check: repeat the rule in a second context and name what remains unchanged.
A parent does not need to memorise CSS text-spacing-trim to support “Adjacent punctuation pairs have special collapsing rules”. Useful prompts are: “What did you expect?”, “Which state changed first?”, “What evidence tests Except for space-all and some font cases, contextual values can collapse spacing between classified adjacent punctuation pairs.?”, and “Can you make a smaller example of testing only one isolated full stop and concluding the property does nothing?” These questions keep ownership with the learner while making the reasoning visible.
Practice with an explained answer
Task. Explain why the pair “〕(” is more diagnostic than a single “。” Write the prediction before running anything. Include one ordinary case and one boundary case, then explain the difference in two causal sentences.
Answer route. It presents a closing-opening adjacency that can trigger pair rules. The final output alone earns only partial credit. A strong answer connects it to “Except for space-all and some font cases, contextual values can collapse spacing between classified adjacent punctuation pairs.”, shows the relevant intermediate evidence and states why testing only one isolated full stop and concluding the property does nothing would lead to a different conclusion.
Decision and transfer
Use representative real text after the matrix; do not optimise only for synthetic pairs. Prefer the choice whose semantics and failure modes are easiest to explain for the actual job. Shorter syntax is useful only when it preserves that clarity.
Mastery of “Adjacent punctuation pairs have special collapsing rules” means the learner can predict the ordinary case, recognise testing only one isolated full stop and concluding the property does nothing, diagnose the earliest mistaken assumption, recover with “Build a matrix of opening-opening, closing-opening, closing-closing and middle-dot pairs.” and defend this decision: Use representative real text after the matrix; do not optimise only for synthetic pairs. Once that causal chain is stable, continue to the next chapter rather than adding repetitions of the same surface exercise.
Previous section · Contents · Next section
CHAPTER 11 OF 20 · Test the boundary
11. Punctuation classes depend on Unicode and convention
The specification classifies fullwidth opening, closing, middle-dot, colon and dot punctuation using Unicode categories, East Asian Width and language conventions. That is the invariant to preserve when names, data or surrounding project details change.
A visible mark’s familiar name is not enough to predict its class in every language and writing mode. The useful question is not “Which line should I copy?” but “Which state, value or rendering decision does this operation control?” Answering that question prevents a correct-looking result from hiding a wrong mental model.
The most revealing near-miss is assuming all colons and full stops belong to one universal class. A learner should predict the result first, run the smallest safe case, label the observation and explain the earliest point where the prediction diverges. This turns an error into evidence rather than a verdict on ability.
Core worked example
<p lang="ja">(例):項目・項目。</p>Explained result. The classification question becomes reproducible and avoids glyph-shape guesses. The explanation should identify the input, the governing rule, the observable outcome and one boundary that would change the conclusion. If any of those four parts is missing, reduce the example and trace it again.
Read the trace, not just the last line
Trace code point before interpreting appearance. Write the trace as a sequence of labelled states. For CSS text-spacing-trim, the decisive evidence may be an iterator close, a cached classification, a glyph-spacing decision or a repository object path; printing only the final Boolean or filename can hide the mechanism that produced it.
For “Punctuation classes depend on Unicode and convention”, separate contract from coincidence. The contract is “The specification classifies fullwidth opening, closing, middle-dot, colon and dot punctuation using Unicode categories, East Asian Width and language conventions.” and comes from the primary specification or manual. Coincidence is what happened on one machine, font, filesystem or repository. Record both, then use “Record code points, lang, writing mode and font in the test case.” to decide whether another observation challenges the model or merely reflects the environment.
Four purposeful transfer cases
Case 1: homework evidence folder. Model “Punctuation classes depend on Unicode and convention” with subject folders, draft answers and a reviewed copy. Before touching a tool, state which part of the case corresponds to the input, why “The specification classifies fullwidth opening, closing, middle-dot, colon and dot punctuation using Unicode categories, East Asian Width and language conventions.” should remain invariant and what observation would expose assuming all colons and full stops belong to one universal class.
Reasoned route. Begin with “The specification classifies fullwidth opening, closing, middle-dot, colon and dot punctuation using Unicode categories, East Asian Width and language conventions.” Apply this procedure: Record code points, lang, writing mode and font in the test case. For the homework evidence folder, introduce one controlled variation that exposes assuming all colons and full stops belong to one universal class. The classification question becomes reproducible and avoids glyph-shape guesses. A complete answer explains why the near-miss fails, names the evidence that distinguishes it from the corrected case and transfers the rule without relying on the original variable names.
Case 2: CCA media catalogue. Contrast “Punctuation classes depend on Unicode and convention” with event folders, selected images and caption notes. Before touching a tool, state which part of the case corresponds to the input, why “The specification classifies fullwidth opening, closing, middle-dot, colon and dot punctuation using Unicode categories, East Asian Width and language conventions.” should remain invariant and what observation would expose assuming all colons and full stops belong to one universal class.
Reasoned route. Begin with “The specification classifies fullwidth opening, closing, middle-dot, colon and dot punctuation using Unicode categories, East Asian Width and language conventions.” Apply this procedure: Record code points, lang, writing mode and font in the test case. For the CCA media catalogue, introduce one controlled variation that exposes assuming all colons and full stops belong to one universal class. The classification question becomes reproducible and avoids glyph-shape guesses. A complete answer explains why the near-miss fails, names the evidence that distinguishes it from the corrected case and transfers the rule without relying on the original variable names.
Case 3: science investigation archive. Stress-test “Punctuation classes depend on Unicode and convention” with raw readings, cleaned tables and chart exports. Before touching a tool, state which part of the case corresponds to the input, why “The specification classifies fullwidth opening, closing, middle-dot, colon and dot punctuation using Unicode categories, East Asian Width and language conventions.” should remain invariant and what observation would expose assuming all colons and full stops belong to one universal class.
Reasoned route. Begin with “The specification classifies fullwidth opening, closing, middle-dot, colon and dot punctuation using Unicode categories, East Asian Width and language conventions.” Apply this procedure: Record code points, lang, writing mode and font in the test case. For the science investigation archive, introduce one controlled variation that exposes assuming all colons and full stops belong to one universal class. The classification question becomes reproducible and avoids glyph-shape guesses. A complete answer explains why the near-miss fails, names the evidence that distinguishes it from the corrected case and transfers the rule without relying on the original variable names.
Case 4: revision-note builder. Explain “Punctuation classes depend on Unicode and convention” with topic notes, worked examples and a generated index. Before touching a tool, state which part of the case corresponds to the input, why “The specification classifies fullwidth opening, closing, middle-dot, colon and dot punctuation using Unicode categories, East Asian Width and language conventions.” should remain invariant and what observation would expose assuming all colons and full stops belong to one universal class.
Reasoned route. Begin with “The specification classifies fullwidth opening, closing, middle-dot, colon and dot punctuation using Unicode categories, East Asian Width and language conventions.” Apply this procedure: Record code points, lang, writing mode and font in the test case. For the revision-note builder, introduce one controlled variation that exposes assuming all colons and full stops belong to one universal class. The classification question becomes reproducible and avoids glyph-shape guesses. A complete answer explains why the near-miss fails, names the evidence that distinguishes it from the corrected case and transfers the rule without relying on the original variable names.
Diagnostic route
- Model check: draw or list the exact values, objects, paths, characters or repository states before the operation.
- Boundary check: construct the smallest safe input that reveals assuming all colons and full stops belong to one universal class.
- Evidence check: distinguish a displayed result from ownership, caching, consumption, font behaviour or object type.
- Repair check: Record code points, lang, writing mode and font in the test case.
- Transfer check: repeat the rule in a second context and name what remains unchanged.
A parent does not need to memorise CSS text-spacing-trim to support “Punctuation classes depend on Unicode and convention”. Useful prompts are: “What did you expect?”, “Which state changed first?”, “What evidence tests The specification classifies fullwidth opening, closing, middle-dot, colon and dot punctuation using Unicode categories, East Asian Width and language conventions.?”, and “Can you make a smaller example of assuming all colons and full stops belong to one universal class?” These questions keep ownership with the learner while making the reasoning visible.
Practice with an explained answer
Task. Compare U+3002 ideographic full stop with ASCII full stop in the same fixture. Write the prediction before running anything. Include one ordinary case and one boundary case, then explain the difference in two causal sentences.
Answer route. Only the classified fullwidth punctuation is in the property’s intended domain. The final output alone earns only partial credit. A strong answer connects it to “The specification classifies fullwidth opening, closing, middle-dot, colon and dot punctuation using Unicode categories, East Asian Width and language conventions.”, shows the relevant intermediate evidence and states why assuming all colons and full stops belong to one universal class would lead to a different conclusion.
Decision and transfer
Keep Unicode-aware fixtures and label language explicitly. Prefer the choice whose semantics and failure modes are easiest to explain for the actual job. Shorter syntax is useful only when it preserves that clarity.
Mastery of “Punctuation classes depend on Unicode and convention” means the learner can predict the ordinary case, recognise assuming all colons and full stops belong to one universal class, diagnose the earliest mistaken assumption, recover with “Record code points, lang, writing mode and font in the test case.” and defend this decision: Keep Unicode-aware fixtures and label language explicitly. Once that causal chain is stable, continue to the next chapter rather than adding repetitions of the same surface exercise.
Previous section · Contents · Next section
If a font uses proportional punctuation or lacks a useful distinction, the user agent may have little or no spacing to add or remove. That is the invariant to preserve when names, data or surrounding project details change.
A correct computed value can therefore produce a subtle visual change. The useful question is not “Which line should I copy?” but “Which state, value or rendering decision does this operation control?” Answering that question prevents a correct-looking result from hiding a wrong mental model.
The most revealing near-miss is declaring the browser unsupported because one font shows no obvious difference. A learner should predict the result first, run the smallest safe case, label the observation and explain the earliest point where the prediction diverges. This turns an error into evidence rather than a verdict on ability.
Core worked example
p { font-family: "Noto Sans CJK JP", sans-serif; text-spacing-trim: trim-both; }Explained result. The CSS value can apply while font metrics constrain the visible result. The explanation should identify the input, the governing rule, the observable outcome and one boundary that would change the conclusion. If any of those four parts is missing, reduce the example and trace it again.
Read the trace, not just the last line
Trace font selection before measuring glyph advance. Write the trace as a sequence of labelled states. For CSS text-spacing-trim, the decisive evidence may be an iterator close, a cached classification, a glyph-spacing decision or a repository object path; printing only the final Boolean or filename can hide the mechanism that produced it.
For “Fonts can limit visible trimming”, separate contract from coincidence. The contract is “If a font uses proportional punctuation or lacks a useful distinction, the user agent may have little or no spacing to add or remove.” and comes from the primary specification or manual. Coincidence is what happened on one machine, font, filesystem or repository. Record both, then use “Repeat the same text with two appropriate CJK fonts and inspect computed style plus geometry.” to decide whether another observation challenges the model or merely reflects the environment.
Four purposeful transfer cases
Case 1: homework evidence folder. Model “Fonts can limit visible trimming” with subject folders, draft answers and a reviewed copy. Before touching a tool, state which part of the case corresponds to the input, why “If a font uses proportional punctuation or lacks a useful distinction, the user agent may have little or no spacing to add or remove.” should remain invariant and what observation would expose declaring the browser unsupported because one font shows no obvious difference.
Reasoned route. Begin with “If a font uses proportional punctuation or lacks a useful distinction, the user agent may have little or no spacing to add or remove.” Apply this procedure: Repeat the same text with two appropriate CJK fonts and inspect computed style plus geometry. For the homework evidence folder, introduce one controlled variation that exposes declaring the browser unsupported because one font shows no obvious difference. The CSS value can apply while font metrics constrain the visible result. A complete answer explains why the near-miss fails, names the evidence that distinguishes it from the corrected case and transfers the rule without relying on the original variable names.
Case 2: CCA media catalogue. Contrast “Fonts can limit visible trimming” with event folders, selected images and caption notes. Before touching a tool, state which part of the case corresponds to the input, why “If a font uses proportional punctuation or lacks a useful distinction, the user agent may have little or no spacing to add or remove.” should remain invariant and what observation would expose declaring the browser unsupported because one font shows no obvious difference.
Reasoned route. Begin with “If a font uses proportional punctuation or lacks a useful distinction, the user agent may have little or no spacing to add or remove.” Apply this procedure: Repeat the same text with two appropriate CJK fonts and inspect computed style plus geometry. For the CCA media catalogue, introduce one controlled variation that exposes declaring the browser unsupported because one font shows no obvious difference. The CSS value can apply while font metrics constrain the visible result. A complete answer explains why the near-miss fails, names the evidence that distinguishes it from the corrected case and transfers the rule without relying on the original variable names.
Case 3: science investigation archive. Stress-test “Fonts can limit visible trimming” with raw readings, cleaned tables and chart exports. Before touching a tool, state which part of the case corresponds to the input, why “If a font uses proportional punctuation or lacks a useful distinction, the user agent may have little or no spacing to add or remove.” should remain invariant and what observation would expose declaring the browser unsupported because one font shows no obvious difference.
Reasoned route. Begin with “If a font uses proportional punctuation or lacks a useful distinction, the user agent may have little or no spacing to add or remove.” Apply this procedure: Repeat the same text with two appropriate CJK fonts and inspect computed style plus geometry. For the science investigation archive, introduce one controlled variation that exposes declaring the browser unsupported because one font shows no obvious difference. The CSS value can apply while font metrics constrain the visible result. A complete answer explains why the near-miss fails, names the evidence that distinguishes it from the corrected case and transfers the rule without relying on the original variable names.
Case 4: revision-note builder. Explain “Fonts can limit visible trimming” with topic notes, worked examples and a generated index. Before touching a tool, state which part of the case corresponds to the input, why “If a font uses proportional punctuation or lacks a useful distinction, the user agent may have little or no spacing to add or remove.” should remain invariant and what observation would expose declaring the browser unsupported because one font shows no obvious difference.
Reasoned route. Begin with “If a font uses proportional punctuation or lacks a useful distinction, the user agent may have little or no spacing to add or remove.” Apply this procedure: Repeat the same text with two appropriate CJK fonts and inspect computed style plus geometry. For the revision-note builder, introduce one controlled variation that exposes declaring the browser unsupported because one font shows no obvious difference. The CSS value can apply while font metrics constrain the visible result. A complete answer explains why the near-miss fails, names the evidence that distinguishes it from the corrected case and transfers the rule without relying on the original variable names.
Diagnostic route
- Model check: draw or list the exact values, objects, paths, characters or repository states before the operation.
- Boundary check: construct the smallest safe input that reveals declaring the browser unsupported because one font shows no obvious difference.
- Evidence check: distinguish a displayed result from ownership, caching, consumption, font behaviour or object type.
- Repair check: Repeat the same text with two appropriate CJK fonts and inspect computed style plus geometry.
- Transfer check: repeat the rule in a second context and name what remains unchanged.
A parent does not need to memorise CSS text-spacing-trim to support “Fonts can limit visible trimming”. Useful prompts are: “What did you expect?”, “Which state changed first?”, “What evidence tests If a font uses proportional punctuation or lacks a useful distinction, the user agent may have little or no spacing to add or remove.?”, and “Can you make a smaller example of declaring the browser unsupported because one font shows no obvious difference?” These questions keep ownership with the learner while making the reasoning visible.
Practice with an explained answer
Task. Explain why a font fallback can change the screenshot without changing CSS. Write the prediction before running anything. Include one ordinary case and one boundary case, then explain the difference in two causal sentences.
Answer route. Different font metrics supply different punctuation geometry to the same rule. The final output alone earns only partial credit. A strong answer connects it to “If a font uses proportional punctuation or lacks a useful distinction, the user agent may have little or no spacing to add or remove.”, shows the relevant intermediate evidence and states why declaring the browser unsupported because one font shows no obvious difference would lead to a different conclusion.
Decision and transfer
Test with production fonts and avoid promises based on one development machine. Prefer the choice whose semantics and failure modes are easiest to explain for the actual job. Shorter syntax is useful only when it preserves that clarity.
Mastery of “Fonts can limit visible trimming” means the learner can predict the ordinary case, recognise declaring the browser unsupported because one font shows no obvious difference, diagnose the earliest mistaken assumption, recover with “Repeat the same text with two appropriate CJK fonts and inspect computed style plus geometry.” and defend this decision: Test with production fonts and avoid promises based on one development machine. Once that causal chain is stable, continue to the next chapter rather than adding repetitions of the same surface exercise.
Previous section · Contents · Next section
CHAPTER 13 OF 20 · Diagnose and repair
13. Horizontal and vertical writing need separate fixtures
The trimming edges map to inline-start and inline-end, so vertical writing changes the physical direction of the effect. That is the invariant to preserve when names, data or surrounding project details change.
A horizontal screenshot cannot validate vertical typography. The useful question is not “Which line should I copy?” but “Which state, value or rendering decision does this operation control?” Answering that question prevents a correct-looking result from hiding a wrong mental model.
The most revealing near-miss is calling “left half” the universal trimmed side. A learner should predict the result first, run the smallest safe case, label the observation and explain the earliest point where the prediction diverges. This turns an error into evidence rather than a verdict on ability.
Core worked example
p.vertical { writing-mode: vertical-rl; text-spacing-trim: trim-both; }Explained result. The relevant start/end geometry rotates with the writing mode. The explanation should identify the input, the governing rule, the observable outcome and one boundary that would change the conclusion. If any of those four parts is missing, reduce the example and trace it again.
Read the trace, not just the last line
Trace inline direction, line start and line end before physical sides. Write the trace as a sequence of labelled states. For CSS text-spacing-trim, the decisive evidence may be an iterator close, a cached classification, a glyph-spacing decision or a repository object path; printing only the final Boolean or filename can hide the mechanism that produced it.
For “Horizontal and vertical writing need separate fixtures”, separate contract from coincidence. The contract is “The trimming edges map to inline-start and inline-end, so vertical writing changes the physical direction of the effect.” and comes from the primary specification or manual. Coincidence is what happened on one machine, font, filesystem or repository. Record both, then use “Use logical edge language and create writing-mode: vertical-rl fixture.” to decide whether another observation challenges the model or merely reflects the environment.
Four purposeful transfer cases
Case 1: homework evidence folder. Model “Horizontal and vertical writing need separate fixtures” with subject folders, draft answers and a reviewed copy. Before touching a tool, state which part of the case corresponds to the input, why “The trimming edges map to inline-start and inline-end, so vertical writing changes the physical direction of the effect.” should remain invariant and what observation would expose calling “left half” the universal trimmed side.
Reasoned route. Begin with “The trimming edges map to inline-start and inline-end, so vertical writing changes the physical direction of the effect.” Apply this procedure: Use logical edge language and create writing-mode: vertical-rl fixture. For the homework evidence folder, introduce one controlled variation that exposes calling “left half” the universal trimmed side. The relevant start/end geometry rotates with the writing mode. A complete answer explains why the near-miss fails, names the evidence that distinguishes it from the corrected case and transfers the rule without relying on the original variable names.
Case 2: CCA media catalogue. Contrast “Horizontal and vertical writing need separate fixtures” with event folders, selected images and caption notes. Before touching a tool, state which part of the case corresponds to the input, why “The trimming edges map to inline-start and inline-end, so vertical writing changes the physical direction of the effect.” should remain invariant and what observation would expose calling “left half” the universal trimmed side.
Reasoned route. Begin with “The trimming edges map to inline-start and inline-end, so vertical writing changes the physical direction of the effect.” Apply this procedure: Use logical edge language and create writing-mode: vertical-rl fixture. For the CCA media catalogue, introduce one controlled variation that exposes calling “left half” the universal trimmed side. The relevant start/end geometry rotates with the writing mode. A complete answer explains why the near-miss fails, names the evidence that distinguishes it from the corrected case and transfers the rule without relying on the original variable names.
Case 3: science investigation archive. Stress-test “Horizontal and vertical writing need separate fixtures” with raw readings, cleaned tables and chart exports. Before touching a tool, state which part of the case corresponds to the input, why “The trimming edges map to inline-start and inline-end, so vertical writing changes the physical direction of the effect.” should remain invariant and what observation would expose calling “left half” the universal trimmed side.
Reasoned route. Begin with “The trimming edges map to inline-start and inline-end, so vertical writing changes the physical direction of the effect.” Apply this procedure: Use logical edge language and create writing-mode: vertical-rl fixture. For the science investigation archive, introduce one controlled variation that exposes calling “left half” the universal trimmed side. The relevant start/end geometry rotates with the writing mode. A complete answer explains why the near-miss fails, names the evidence that distinguishes it from the corrected case and transfers the rule without relying on the original variable names.
Case 4: revision-note builder. Explain “Horizontal and vertical writing need separate fixtures” with topic notes, worked examples and a generated index. Before touching a tool, state which part of the case corresponds to the input, why “The trimming edges map to inline-start and inline-end, so vertical writing changes the physical direction of the effect.” should remain invariant and what observation would expose calling “left half” the universal trimmed side.
Reasoned route. Begin with “The trimming edges map to inline-start and inline-end, so vertical writing changes the physical direction of the effect.” Apply this procedure: Use logical edge language and create writing-mode: vertical-rl fixture. For the revision-note builder, introduce one controlled variation that exposes calling “left half” the universal trimmed side. The relevant start/end geometry rotates with the writing mode. A complete answer explains why the near-miss fails, names the evidence that distinguishes it from the corrected case and transfers the rule without relying on the original variable names.
Diagnostic route
- Model check: draw or list the exact values, objects, paths, characters or repository states before the operation.
- Boundary check: construct the smallest safe input that reveals calling “left half” the universal trimmed side.
- Evidence check: distinguish a displayed result from ownership, caching, consumption, font behaviour or object type.
- Repair check: Use logical edge language and create writing-mode: vertical-rl fixture.
- Transfer check: repeat the rule in a second context and name what remains unchanged.
A parent does not need to memorise CSS text-spacing-trim to support “Horizontal and vertical writing need separate fixtures”. Useful prompts are: “What did you expect?”, “Which state changed first?”, “What evidence tests The trimming edges map to inline-start and inline-end, so vertical writing changes the physical direction of the effect.?”, and “Can you make a smaller example of calling “left half” the universal trimmed side?” These questions keep ownership with the learner while making the reasoning visible.
Practice with an explained answer
Task. Describe which physical half may be kerned for opening punctuation in vertical text. Write the prediction before running anything. Include one ordinary case and one boundary case, then explain the difference in two causal sentences.
Answer route. The specification maps the trimmed blank to top/bottom rather than assuming left/right. The final output alone earns only partial credit. A strong answer connects it to “The trimming edges map to inline-start and inline-end, so vertical writing changes the physical direction of the effect.”, shows the relevant intermediate evidence and states why calling “left half” the universal trimmed side would lead to a different conclusion.
Decision and transfer
Use logical terminology in code reviews and test both writing modes when supported content needs them. Prefer the choice whose semantics and failure modes are easiest to explain for the actual job. Shorter syntax is useful only when it preserves that clarity.
Mastery of “Horizontal and vertical writing need separate fixtures” means the learner can predict the ordinary case, recognise calling “left half” the universal trimmed side, diagnose the earliest mistaken assumption, recover with “Use logical edge language and create writing-mode: vertical-rl fixture.” and defend this decision: Use logical terminology in code reviews and test both writing modes when supported content needs them. Once that causal chain is stable, continue to the next chapter rather than adding repetitions of the same surface exercise.
Previous section · Contents · Next section
Several values act at each visual line start or end, and wrapping determines those positions. That is the invariant to preserve when names, data or surrounding project details change.
Container width, font metrics and language can move punctuation into or out of an edge case. The useful question is not “Which line should I copy?” but “Which state, value or rendering decision does this operation control?” Answering that question prevents a correct-looking result from hiding a wrong mental model.
The most revealing near-miss is changing viewport width between screenshots and attributing all differences to the property. A learner should predict the result first, run the smallest safe case, label the observation and explain the earliest point where the prediction diverges. This turns an error into evidence rather than a verdict on ability.
Core worked example
p.test { width: 12em; font-size: 24px; }Explained result. Only the chosen property value changes, so the observed edge difference is meaningful. The explanation should identify the input, the governing rule, the observable outcome and one boundary that would change the conclusion. If any of those four parts is missing, reduce the example and trace it again.
Read the trace, not just the last line
Trace layout constraints before the line-break result. Write the trace as a sequence of labelled states. For CSS text-spacing-trim, the decisive evidence may be an iterator close, a cached classification, a glyph-spacing decision or a repository object path; printing only the final Boolean or filename can hide the mechanism that produced it.
For “Line wrapping is part of the input”, separate contract from coincidence. The contract is “Several values act at each visual line start or end, and wrapping determines those positions.” and comes from the primary specification or manual. Coincidence is what happened on one machine, font, filesystem or repository. Record both, then use “Fix width, font, size, text and zoom for the comparison.” to decide whether another observation challenges the model or merely reflects the environment.
Four purposeful transfer cases
Case 1: homework evidence folder. Model “Line wrapping is part of the input” with subject folders, draft answers and a reviewed copy. Before touching a tool, state which part of the case corresponds to the input, why “Several values act at each visual line start or end, and wrapping determines those positions.” should remain invariant and what observation would expose changing viewport width between screenshots and attributing all differences to the property.
Reasoned route. Begin with “Several values act at each visual line start or end, and wrapping determines those positions.” Apply this procedure: Fix width, font, size, text and zoom for the comparison. For the homework evidence folder, introduce one controlled variation that exposes changing viewport width between screenshots and attributing all differences to the property. Only the chosen property value changes, so the observed edge difference is meaningful. A complete answer explains why the near-miss fails, names the evidence that distinguishes it from the corrected case and transfers the rule without relying on the original variable names.
Case 2: CCA media catalogue. Contrast “Line wrapping is part of the input” with event folders, selected images and caption notes. Before touching a tool, state which part of the case corresponds to the input, why “Several values act at each visual line start or end, and wrapping determines those positions.” should remain invariant and what observation would expose changing viewport width between screenshots and attributing all differences to the property.
Reasoned route. Begin with “Several values act at each visual line start or end, and wrapping determines those positions.” Apply this procedure: Fix width, font, size, text and zoom for the comparison. For the CCA media catalogue, introduce one controlled variation that exposes changing viewport width between screenshots and attributing all differences to the property. Only the chosen property value changes, so the observed edge difference is meaningful. A complete answer explains why the near-miss fails, names the evidence that distinguishes it from the corrected case and transfers the rule without relying on the original variable names.
Case 3: science investigation archive. Stress-test “Line wrapping is part of the input” with raw readings, cleaned tables and chart exports. Before touching a tool, state which part of the case corresponds to the input, why “Several values act at each visual line start or end, and wrapping determines those positions.” should remain invariant and what observation would expose changing viewport width between screenshots and attributing all differences to the property.
Reasoned route. Begin with “Several values act at each visual line start or end, and wrapping determines those positions.” Apply this procedure: Fix width, font, size, text and zoom for the comparison. For the science investigation archive, introduce one controlled variation that exposes changing viewport width between screenshots and attributing all differences to the property. Only the chosen property value changes, so the observed edge difference is meaningful. A complete answer explains why the near-miss fails, names the evidence that distinguishes it from the corrected case and transfers the rule without relying on the original variable names.
Case 4: revision-note builder. Explain “Line wrapping is part of the input” with topic notes, worked examples and a generated index. Before touching a tool, state which part of the case corresponds to the input, why “Several values act at each visual line start or end, and wrapping determines those positions.” should remain invariant and what observation would expose changing viewport width between screenshots and attributing all differences to the property.
Reasoned route. Begin with “Several values act at each visual line start or end, and wrapping determines those positions.” Apply this procedure: Fix width, font, size, text and zoom for the comparison. For the revision-note builder, introduce one controlled variation that exposes changing viewport width between screenshots and attributing all differences to the property. Only the chosen property value changes, so the observed edge difference is meaningful. A complete answer explains why the near-miss fails, names the evidence that distinguishes it from the corrected case and transfers the rule without relying on the original variable names.
Diagnostic route
- Model check: draw or list the exact values, objects, paths, characters or repository states before the operation.
- Boundary check: construct the smallest safe input that reveals changing viewport width between screenshots and attributing all differences to the property.
- Evidence check: distinguish a displayed result from ownership, caching, consumption, font behaviour or object type.
- Repair check: Fix width, font, size, text and zoom for the comparison.
- Transfer check: repeat the rule in a second context and name what remains unchanged.
A parent does not need to memorise CSS text-spacing-trim to support “Line wrapping is part of the input”. Useful prompts are: “What did you expect?”, “Which state changed first?”, “What evidence tests Several values act at each visual line start or end, and wrapping determines those positions.?”, and “Can you make a smaller example of changing viewport width between screenshots and attributing all differences to the property?” These questions keep ownership with the learner while making the reasoning visible.
Practice with an explained answer
Task. Design a two-column A/B test with identical text and dimensions. Write the prediction before running anything. Include one ordinary case and one boundary case, then explain the difference in two causal sentences.
Answer route. The fixture isolates the property because all other wrapping inputs match. The final output alone earns only partial credit. A strong answer connects it to “Several values act at each visual line start or end, and wrapping determines those positions.”, shows the relevant intermediate evidence and states why changing viewport width between screenshots and attributing all differences to the property would lead to a different conclusion.
Decision and transfer
Keep responsive tests too, but use controlled fixtures for diagnosis. Prefer the choice whose semantics and failure modes are easiest to explain for the actual job. Shorter syntax is useful only when it preserves that clarity.
Mastery of “Line wrapping is part of the input” means the learner can predict the ordinary case, recognise changing viewport width between screenshots and attributing all differences to the property, diagnose the earliest mistaken assumption, recover with “Fix width, font, size, text and zoom for the comparison.” and defend this decision: Keep responsive tests too, but use controlled fixtures for diagnosis. Once that causal chain is stable, continue to the next chapter rather than adding repetitions of the same surface exercise.
Previous section · Contents · Next section
text-spacing-trim animates discretely rather than interpolating between spacing modes. That is the invariant to preserve when names, data or surrounding project details change.
A transition switches keyword behaviour rather than smoothly blending glyph advances. The useful question is not “Which line should I copy?” but “Which state, value or rendering decision does this operation control?” Answering that question prevents a correct-looking result from hiding a wrong mental model.
The most revealing near-miss is expecting a gradual 50-percent trim halfway through a transition. A learner should predict the result first, run the smallest safe case, label the observation and explain the earliest point where the prediction diverges. This turns an error into evidence rather than a verdict on ability.
Core worked example
p { transition: text-spacing-trim 1s; }
p:hover { text-spacing-trim: trim-all; }Explained result. The value changes as a discrete step. The explanation should identify the input, the governing rule, the observable outcome and one boundary that would change the conclusion. If any of those four parts is missing, reduce the example and trace it again.
Read the trace, not just the last line
Trace keyword state rather than imagined numeric progress. Write the trace as a sequence of labelled states. For CSS text-spacing-trim, the decisive evidence may be an iterator close, a cached classification, a glyph-spacing decision or a repository object path; printing only the final Boolean or filename can hide the mechanism that produced it.
For “The animation type is discrete”, separate contract from coincidence. The contract is “text-spacing-trim animates discretely rather than interpolating between spacing modes.” and comes from the primary specification or manual. Coincidence is what happened on one machine, font, filesystem or repository. Record both, then use “Inspect computed values at several times and design interaction without relying on smooth interpolation.” to decide whether another observation challenges the model or merely reflects the environment.
Four purposeful transfer cases
Case 1: homework evidence folder. Model “The animation type is discrete” with subject folders, draft answers and a reviewed copy. Before touching a tool, state which part of the case corresponds to the input, why “text-spacing-trim animates discretely rather than interpolating between spacing modes.” should remain invariant and what observation would expose expecting a gradual 50-percent trim halfway through a transition.
Reasoned route. Begin with “text-spacing-trim animates discretely rather than interpolating between spacing modes.” Apply this procedure: Inspect computed values at several times and design interaction without relying on smooth interpolation. For the homework evidence folder, introduce one controlled variation that exposes expecting a gradual 50-percent trim halfway through a transition. The value changes as a discrete step. A complete answer explains why the near-miss fails, names the evidence that distinguishes it from the corrected case and transfers the rule without relying on the original variable names.
Case 2: CCA media catalogue. Contrast “The animation type is discrete” with event folders, selected images and caption notes. Before touching a tool, state which part of the case corresponds to the input, why “text-spacing-trim animates discretely rather than interpolating between spacing modes.” should remain invariant and what observation would expose expecting a gradual 50-percent trim halfway through a transition.
Reasoned route. Begin with “text-spacing-trim animates discretely rather than interpolating between spacing modes.” Apply this procedure: Inspect computed values at several times and design interaction without relying on smooth interpolation. For the CCA media catalogue, introduce one controlled variation that exposes expecting a gradual 50-percent trim halfway through a transition. The value changes as a discrete step. A complete answer explains why the near-miss fails, names the evidence that distinguishes it from the corrected case and transfers the rule without relying on the original variable names.
Case 3: science investigation archive. Stress-test “The animation type is discrete” with raw readings, cleaned tables and chart exports. Before touching a tool, state which part of the case corresponds to the input, why “text-spacing-trim animates discretely rather than interpolating between spacing modes.” should remain invariant and what observation would expose expecting a gradual 50-percent trim halfway through a transition.
Reasoned route. Begin with “text-spacing-trim animates discretely rather than interpolating between spacing modes.” Apply this procedure: Inspect computed values at several times and design interaction without relying on smooth interpolation. For the science investigation archive, introduce one controlled variation that exposes expecting a gradual 50-percent trim halfway through a transition. The value changes as a discrete step. A complete answer explains why the near-miss fails, names the evidence that distinguishes it from the corrected case and transfers the rule without relying on the original variable names.
Case 4: revision-note builder. Explain “The animation type is discrete” with topic notes, worked examples and a generated index. Before touching a tool, state which part of the case corresponds to the input, why “text-spacing-trim animates discretely rather than interpolating between spacing modes.” should remain invariant and what observation would expose expecting a gradual 50-percent trim halfway through a transition.
Reasoned route. Begin with “text-spacing-trim animates discretely rather than interpolating between spacing modes.” Apply this procedure: Inspect computed values at several times and design interaction without relying on smooth interpolation. For the revision-note builder, introduce one controlled variation that exposes expecting a gradual 50-percent trim halfway through a transition. The value changes as a discrete step. A complete answer explains why the near-miss fails, names the evidence that distinguishes it from the corrected case and transfers the rule without relying on the original variable names.
Diagnostic route
- Model check: draw or list the exact values, objects, paths, characters or repository states before the operation.
- Boundary check: construct the smallest safe input that reveals expecting a gradual 50-percent trim halfway through a transition.
- Evidence check: distinguish a displayed result from ownership, caching, consumption, font behaviour or object type.
- Repair check: Inspect computed values at several times and design interaction without relying on smooth interpolation.
- Transfer check: repeat the rule in a second context and name what remains unchanged.
A parent does not need to memorise CSS text-spacing-trim to support “The animation type is discrete”. Useful prompts are: “What did you expect?”, “Which state changed first?”, “What evidence tests text-spacing-trim animates discretely rather than interpolating between spacing modes.?”, and “Can you make a smaller example of expecting a gradual 50-percent trim halfway through a transition?” These questions keep ownership with the learner while making the reasoning visible.
Practice with an explained answer
Task. Explain why the midpoint has no meaningful half-trim contract. Write the prediction before running anything. Include one ordinary case and one boundary case, then explain the difference in two causal sentences.
Answer route. The property’s animation type is discrete and values are keywords. The final output alone earns only partial credit. A strong answer connects it to “text-spacing-trim animates discretely rather than interpolating between spacing modes.”, shows the relevant intermediate evidence and states why expecting a gradual 50-percent trim halfway through a transition would lead to a different conclusion.
Decision and transfer
Avoid motion-dependent teaching examples; compare static states side by side. Prefer the choice whose semantics and failure modes are easiest to explain for the actual job. Shorter syntax is useful only when it preserves that clarity.
Mastery of “The animation type is discrete” means the learner can predict the ordinary case, recognise expecting a gradual 50-percent trim halfway through a transition, diagnose the earliest mistaken assumption, recover with “Inspect computed values at several times and design interaction without relying on smooth interpolation.” and defend this decision: Avoid motion-dependent teaching examples; compare static states side by side. Once that causal chain is stable, continue to the next chapter rather than adding repetitions of the same surface exercise.
Previous section · Contents · Next section
CHAPTER 16 OF 20 · Diagnose and repair
16. Feature detection should protect the fallback
@supports can select text-spacing-trim styling where a user agent recognises the declaration. That is the invariant to preserve when names, data or surrounding project details change.
Unsupported browsers should retain readable, semantically correct text. The useful question is not “Which line should I copy?” but “Which state, value or rendering decision does this operation control?” Answering that question prevents a correct-looking result from hiding a wrong mental model.
The most revealing near-miss is hiding punctuation or changing content when the feature is unavailable. A learner should predict the result first, run the smallest safe case, label the observation and explain the earliest point where the prediction diverges. This turns an error into evidence rather than a verdict on ability.
Core worked example
@supports (text-spacing-trim: trim-both) {
[lang="ja"] { text-spacing-trim: trim-both; }
}Explained result. The fallback remains readable; recognition enables the chosen spacing rule. The explanation should identify the input, the governing rule, the observable outcome and one boundary that would change the conclusion. If any of those four parts is missing, reduce the example and trace it again.
Read the trace, not just the last line
Trace base rule, support result and enhanced rule. Write the trace as a sequence of labelled states. For CSS text-spacing-trim, the decisive evidence may be an iterator close, a cached classification, a glyph-spacing decision or a repository object path; printing only the final Boolean or filename can hide the mechanism that produced it.
For “Feature detection should protect the fallback”, separate contract from coincidence. The contract is “@supports can select text-spacing-trim styling where a user agent recognises the declaration.” and comes from the primary specification or manual. Coincidence is what happened on one machine, font, filesystem or repository. Record both, then use “Start with unmodified text and add the typographic enhancement inside @supports.” to decide whether another observation challenges the model or merely reflects the environment.
Four purposeful transfer cases
Case 1: homework evidence folder. Model “Feature detection should protect the fallback” with subject folders, draft answers and a reviewed copy. Before touching a tool, state which part of the case corresponds to the input, why “@supports can select text-spacing-trim styling where a user agent recognises the declaration.” should remain invariant and what observation would expose hiding punctuation or changing content when the feature is unavailable.
Reasoned route. Begin with “@supports can select text-spacing-trim styling where a user agent recognises the declaration.” Apply this procedure: Start with unmodified text and add the typographic enhancement inside @supports. For the homework evidence folder, introduce one controlled variation that exposes hiding punctuation or changing content when the feature is unavailable. The fallback remains readable; recognition enables the chosen spacing rule. A complete answer explains why the near-miss fails, names the evidence that distinguishes it from the corrected case and transfers the rule without relying on the original variable names.
Case 2: CCA media catalogue. Contrast “Feature detection should protect the fallback” with event folders, selected images and caption notes. Before touching a tool, state which part of the case corresponds to the input, why “@supports can select text-spacing-trim styling where a user agent recognises the declaration.” should remain invariant and what observation would expose hiding punctuation or changing content when the feature is unavailable.
Reasoned route. Begin with “@supports can select text-spacing-trim styling where a user agent recognises the declaration.” Apply this procedure: Start with unmodified text and add the typographic enhancement inside @supports. For the CCA media catalogue, introduce one controlled variation that exposes hiding punctuation or changing content when the feature is unavailable. The fallback remains readable; recognition enables the chosen spacing rule. A complete answer explains why the near-miss fails, names the evidence that distinguishes it from the corrected case and transfers the rule without relying on the original variable names.
Case 3: science investigation archive. Stress-test “Feature detection should protect the fallback” with raw readings, cleaned tables and chart exports. Before touching a tool, state which part of the case corresponds to the input, why “@supports can select text-spacing-trim styling where a user agent recognises the declaration.” should remain invariant and what observation would expose hiding punctuation or changing content when the feature is unavailable.
Reasoned route. Begin with “@supports can select text-spacing-trim styling where a user agent recognises the declaration.” Apply this procedure: Start with unmodified text and add the typographic enhancement inside @supports. For the science investigation archive, introduce one controlled variation that exposes hiding punctuation or changing content when the feature is unavailable. The fallback remains readable; recognition enables the chosen spacing rule. A complete answer explains why the near-miss fails, names the evidence that distinguishes it from the corrected case and transfers the rule without relying on the original variable names.
Case 4: revision-note builder. Explain “Feature detection should protect the fallback” with topic notes, worked examples and a generated index. Before touching a tool, state which part of the case corresponds to the input, why “@supports can select text-spacing-trim styling where a user agent recognises the declaration.” should remain invariant and what observation would expose hiding punctuation or changing content when the feature is unavailable.
Reasoned route. Begin with “@supports can select text-spacing-trim styling where a user agent recognises the declaration.” Apply this procedure: Start with unmodified text and add the typographic enhancement inside @supports. For the revision-note builder, introduce one controlled variation that exposes hiding punctuation or changing content when the feature is unavailable. The fallback remains readable; recognition enables the chosen spacing rule. A complete answer explains why the near-miss fails, names the evidence that distinguishes it from the corrected case and transfers the rule without relying on the original variable names.
Diagnostic route
- Model check: draw or list the exact values, objects, paths, characters or repository states before the operation.
- Boundary check: construct the smallest safe input that reveals hiding punctuation or changing content when the feature is unavailable.
- Evidence check: distinguish a displayed result from ownership, caching, consumption, font behaviour or object type.
- Repair check: Start with unmodified text and add the typographic enhancement inside @supports.
- Transfer check: repeat the rule in a second context and name what remains unchanged.
A parent does not need to memorise CSS text-spacing-trim to support “Feature detection should protect the fallback”. Useful prompts are: “What did you expect?”, “Which state changed first?”, “What evidence tests @supports can select text-spacing-trim styling where a user agent recognises the declaration.?”, and “Can you make a smaller example of hiding punctuation or changing content when the feature is unavailable?” These questions keep ownership with the learner while making the reasoning visible.
Practice with an explained answer
Task. Write progressive enhancement for a Japanese quotation component. Write the prediction before running anything. Include one ordinary case and one boundary case, then explain the difference in two causal sentences.
Answer route. The component works without the property and gains reviewed spacing where supported. The final output alone earns only partial credit. A strong answer connects it to “@supports can select text-spacing-trim styling where a user agent recognises the declaration.”, shows the relevant intermediate evidence and states why hiding punctuation or changing content when the feature is unavailable would lead to a different conclusion.
Decision and transfer
Treat @supports as syntax recognition, then still perform visual tests. Prefer the choice whose semantics and failure modes are easiest to explain for the actual job. Shorter syntax is useful only when it preserves that clarity.
Mastery of “Feature detection should protect the fallback” means the learner can predict the ordinary case, recognise hiding punctuation or changing content when the feature is unavailable, diagnose the earliest mistaken assumption, recover with “Start with unmodified text and add the typographic enhancement inside @supports.” and defend this decision: Treat @supports as syntax recognition, then still perform visual tests. Once that causal chain is stable, continue to the next chapter rather than adding repetitions of the same surface exercise.
Previous section · Contents · Next section
CHAPTER 17 OF 20 · Transfer with judgment
17. Computed style does not prove visual quality
getComputedStyle can confirm the resolved keyword, but it cannot judge punctuation rhythm, line breaks or font suitability. That is the invariant to preserve when names, data or surrounding project details change.
Technical and visual evidence answer different questions. The useful question is not “Which line should I copy?” but “Which state, value or rendering decision does this operation control?” Answering that question prevents a correct-looking result from hiding a wrong mental model.
The most revealing near-miss is closing a bug after seeing the expected computed value. A learner should predict the result first, run the smallest safe case, label the observation and explain the earliest point where the prediction diverges. This turns an error into evidence rather than a verdict on ability.
Core worked example
console.log(getComputedStyle(sample).textSpacingTrim);Explained result. The test suite can distinguish cascade failure from rendering-quality failure. The explanation should identify the input, the governing rule, the observable outcome and one boundary that would change the conclusion. If any of those four parts is missing, reduce the example and trace it again.
Read the trace, not just the last line
Trace declaration, computed keyword, selected font and rendered geometry. Write the trace as a sequence of labelled states. For CSS text-spacing-trim, the decisive evidence may be an iterator close, a cached classification, a glyph-spacing decision or a repository object path; printing only the final Boolean or filename can hide the mechanism that produced it.
For “Computed style does not prove visual quality”, separate contract from coincidence. The contract is “getComputedStyle can confirm the resolved keyword, but it cannot judge punctuation rhythm, line breaks or font suitability.” and comes from the primary specification or manual. Coincidence is what happened on one machine, font, filesystem or repository. Record both, then use “Pair computed-style checks with screenshot or geometry tests and human review.” to decide whether another observation challenges the model or merely reflects the environment.
Four purposeful transfer cases
Case 1: homework evidence folder. Model “Computed style does not prove visual quality” with subject folders, draft answers and a reviewed copy. Before touching a tool, state which part of the case corresponds to the input, why “getComputedStyle can confirm the resolved keyword, but it cannot judge punctuation rhythm, line breaks or font suitability.” should remain invariant and what observation would expose closing a bug after seeing the expected computed value.
Reasoned route. Begin with “getComputedStyle can confirm the resolved keyword, but it cannot judge punctuation rhythm, line breaks or font suitability.” Apply this procedure: Pair computed-style checks with screenshot or geometry tests and human review. For the homework evidence folder, introduce one controlled variation that exposes closing a bug after seeing the expected computed value. The test suite can distinguish cascade failure from rendering-quality failure. A complete answer explains why the near-miss fails, names the evidence that distinguishes it from the corrected case and transfers the rule without relying on the original variable names.
Case 2: CCA media catalogue. Contrast “Computed style does not prove visual quality” with event folders, selected images and caption notes. Before touching a tool, state which part of the case corresponds to the input, why “getComputedStyle can confirm the resolved keyword, but it cannot judge punctuation rhythm, line breaks or font suitability.” should remain invariant and what observation would expose closing a bug after seeing the expected computed value.
Reasoned route. Begin with “getComputedStyle can confirm the resolved keyword, but it cannot judge punctuation rhythm, line breaks or font suitability.” Apply this procedure: Pair computed-style checks with screenshot or geometry tests and human review. For the CCA media catalogue, introduce one controlled variation that exposes closing a bug after seeing the expected computed value. The test suite can distinguish cascade failure from rendering-quality failure. A complete answer explains why the near-miss fails, names the evidence that distinguishes it from the corrected case and transfers the rule without relying on the original variable names.
Case 3: science investigation archive. Stress-test “Computed style does not prove visual quality” with raw readings, cleaned tables and chart exports. Before touching a tool, state which part of the case corresponds to the input, why “getComputedStyle can confirm the resolved keyword, but it cannot judge punctuation rhythm, line breaks or font suitability.” should remain invariant and what observation would expose closing a bug after seeing the expected computed value.
Reasoned route. Begin with “getComputedStyle can confirm the resolved keyword, but it cannot judge punctuation rhythm, line breaks or font suitability.” Apply this procedure: Pair computed-style checks with screenshot or geometry tests and human review. For the science investigation archive, introduce one controlled variation that exposes closing a bug after seeing the expected computed value. The test suite can distinguish cascade failure from rendering-quality failure. A complete answer explains why the near-miss fails, names the evidence that distinguishes it from the corrected case and transfers the rule without relying on the original variable names.
Case 4: revision-note builder. Explain “Computed style does not prove visual quality” with topic notes, worked examples and a generated index. Before touching a tool, state which part of the case corresponds to the input, why “getComputedStyle can confirm the resolved keyword, but it cannot judge punctuation rhythm, line breaks or font suitability.” should remain invariant and what observation would expose closing a bug after seeing the expected computed value.
Reasoned route. Begin with “getComputedStyle can confirm the resolved keyword, but it cannot judge punctuation rhythm, line breaks or font suitability.” Apply this procedure: Pair computed-style checks with screenshot or geometry tests and human review. For the revision-note builder, introduce one controlled variation that exposes closing a bug after seeing the expected computed value. The test suite can distinguish cascade failure from rendering-quality failure. A complete answer explains why the near-miss fails, names the evidence that distinguishes it from the corrected case and transfers the rule without relying on the original variable names.
Diagnostic route
- Model check: draw or list the exact values, objects, paths, characters or repository states before the operation.
- Boundary check: construct the smallest safe input that reveals closing a bug after seeing the expected computed value.
- Evidence check: distinguish a displayed result from ownership, caching, consumption, font behaviour or object type.
- Repair check: Pair computed-style checks with screenshot or geometry tests and human review.
- Transfer check: repeat the rule in a second context and name what remains unchanged.
A parent does not need to memorise CSS text-spacing-trim to support “Computed style does not prove visual quality”. Useful prompts are: “What did you expect?”, “Which state changed first?”, “What evidence tests getComputedStyle can confirm the resolved keyword, but it cannot judge punctuation rhythm, line breaks or font suitability.?”, and “Can you make a smaller example of closing a bug after seeing the expected computed value?” These questions keep ownership with the learner while making the reasoning visible.
Practice with an explained answer
Task. Diagnose a case where computed trim-both is correct but the screenshot is unchanged. Write the prediction before running anything. Include one ordinary case and one boundary case, then explain the difference in two causal sentences.
Answer route. Check font metrics, punctuation class, line position and engine implementation. The final output alone earns only partial credit. A strong answer connects it to “getComputedStyle can confirm the resolved keyword, but it cannot judge punctuation rhythm, line breaks or font suitability.”, shows the relevant intermediate evidence and states why closing a bug after seeing the expected computed value would lead to a different conclusion.
Decision and transfer
Use automated checks for state and targeted visual review for typography. Prefer the choice whose semantics and failure modes are easiest to explain for the actual job. Shorter syntax is useful only when it preserves that clarity.
Mastery of “Computed style does not prove visual quality” means the learner can predict the ordinary case, recognise closing a bug after seeing the expected computed value, diagnose the earliest mistaken assumption, recover with “Pair computed-style checks with screenshot or geometry tests and human review.” and defend this decision: Use automated checks for state and targeted visual review for typography. Once that causal chain is stable, continue to the next chapter rather than adding repetitions of the same surface exercise.
Previous section · Contents · Next section
CHAPTER 18 OF 20 · Transfer with judgment
18. The specification warns about coverage gaps
CSS Text Level 4 notes spotty tests for parts of text-spacing-trim, including some inheritance, animation and edge behaviours. That is the invariant to preserve when names, data or surrounding project details change.
A working draft plus incomplete tests calls for precise, modest claims. The useful question is not “Which line should I copy?” but “Which state, value or rendering decision does this operation control?” Answering that question prevents a correct-looking result from hiding a wrong mental model.
The most revealing near-miss is presenting every table row as universally interoperable production behaviour. A learner should predict the result first, run the smallest safe case, label the observation and explain the earliest point where the prediction diverges. This turns an error into evidence rather than a verdict on ability.
Core worked example
/* Record browser, OS, font, lang and writing mode with each screenshot. */Explained result. The result separates normative intent from observed implementation. The explanation should identify the input, the governing rule, the observable outcome and one boundary that would change the conclusion. If any of those four parts is missing, reduce the example and trace it again.
Read the trace, not just the last line
Trace source authority and local observation as two evidence layers. Write the trace as a sequence of labelled states. For CSS text-spacing-trim, the decisive evidence may be an iterator close, a cached classification, a glyph-spacing decision or a repository object path; printing only the final Boolean or filename can hide the mechanism that produced it.
For “The specification warns about coverage gaps”, separate contract from coincidence. The contract is “CSS Text Level 4 notes spotty tests for parts of text-spacing-trim, including some inheritance, animation and edge behaviours.” and comes from the primary specification or manual. Coincidence is what happened on one machine, font, filesystem or repository. Record both, then use “Cite the specification, run current target-browser tests and record date and versions.” to decide whether another observation challenges the model or merely reflects the environment.
Four purposeful transfer cases
Case 1: homework evidence folder. Model “The specification warns about coverage gaps” with subject folders, draft answers and a reviewed copy. Before touching a tool, state which part of the case corresponds to the input, why “CSS Text Level 4 notes spotty tests for parts of text-spacing-trim, including some inheritance, animation and edge behaviours.” should remain invariant and what observation would expose presenting every table row as universally interoperable production behaviour.
Reasoned route. Begin with “CSS Text Level 4 notes spotty tests for parts of text-spacing-trim, including some inheritance, animation and edge behaviours.” Apply this procedure: Cite the specification, run current target-browser tests and record date and versions. For the homework evidence folder, introduce one controlled variation that exposes presenting every table row as universally interoperable production behaviour. The result separates normative intent from observed implementation. A complete answer explains why the near-miss fails, names the evidence that distinguishes it from the corrected case and transfers the rule without relying on the original variable names.
Case 2: CCA media catalogue. Contrast “The specification warns about coverage gaps” with event folders, selected images and caption notes. Before touching a tool, state which part of the case corresponds to the input, why “CSS Text Level 4 notes spotty tests for parts of text-spacing-trim, including some inheritance, animation and edge behaviours.” should remain invariant and what observation would expose presenting every table row as universally interoperable production behaviour.
Reasoned route. Begin with “CSS Text Level 4 notes spotty tests for parts of text-spacing-trim, including some inheritance, animation and edge behaviours.” Apply this procedure: Cite the specification, run current target-browser tests and record date and versions. For the CCA media catalogue, introduce one controlled variation that exposes presenting every table row as universally interoperable production behaviour. The result separates normative intent from observed implementation. A complete answer explains why the near-miss fails, names the evidence that distinguishes it from the corrected case and transfers the rule without relying on the original variable names.
Case 3: science investigation archive. Stress-test “The specification warns about coverage gaps” with raw readings, cleaned tables and chart exports. Before touching a tool, state which part of the case corresponds to the input, why “CSS Text Level 4 notes spotty tests for parts of text-spacing-trim, including some inheritance, animation and edge behaviours.” should remain invariant and what observation would expose presenting every table row as universally interoperable production behaviour.
Reasoned route. Begin with “CSS Text Level 4 notes spotty tests for parts of text-spacing-trim, including some inheritance, animation and edge behaviours.” Apply this procedure: Cite the specification, run current target-browser tests and record date and versions. For the science investigation archive, introduce one controlled variation that exposes presenting every table row as universally interoperable production behaviour. The result separates normative intent from observed implementation. A complete answer explains why the near-miss fails, names the evidence that distinguishes it from the corrected case and transfers the rule without relying on the original variable names.
Case 4: revision-note builder. Explain “The specification warns about coverage gaps” with topic notes, worked examples and a generated index. Before touching a tool, state which part of the case corresponds to the input, why “CSS Text Level 4 notes spotty tests for parts of text-spacing-trim, including some inheritance, animation and edge behaviours.” should remain invariant and what observation would expose presenting every table row as universally interoperable production behaviour.
Reasoned route. Begin with “CSS Text Level 4 notes spotty tests for parts of text-spacing-trim, including some inheritance, animation and edge behaviours.” Apply this procedure: Cite the specification, run current target-browser tests and record date and versions. For the revision-note builder, introduce one controlled variation that exposes presenting every table row as universally interoperable production behaviour. The result separates normative intent from observed implementation. A complete answer explains why the near-miss fails, names the evidence that distinguishes it from the corrected case and transfers the rule without relying on the original variable names.
Diagnostic route
- Model check: draw or list the exact values, objects, paths, characters or repository states before the operation.
- Boundary check: construct the smallest safe input that reveals presenting every table row as universally interoperable production behaviour.
- Evidence check: distinguish a displayed result from ownership, caching, consumption, font behaviour or object type.
- Repair check: Cite the specification, run current target-browser tests and record date and versions.
- Transfer check: repeat the rule in a second context and name what remains unchanged.
A parent does not need to memorise CSS text-spacing-trim to support “The specification warns about coverage gaps”. Useful prompts are: “What did you expect?”, “Which state changed first?”, “What evidence tests CSS Text Level 4 notes spotty tests for parts of text-spacing-trim, including some inheritance, animation and edge behaviours.?”, and “Can you make a smaller example of presenting every table row as universally interoperable production behaviour?” These questions keep ownership with the learner while making the reasoning visible.
Practice with an explained answer
Task. Write a bug report that avoids claiming the specification itself is unsupported everywhere. Write the prediction before running anything. Include one ordinary case and one boundary case, then explain the difference in two causal sentences.
Answer route. Name the tested environment, exact fixture and divergence from the stated rule. The final output alone earns only partial credit. A strong answer connects it to “CSS Text Level 4 notes spotty tests for parts of text-spacing-trim, including some inheritance, animation and edge behaviours.”, shows the relevant intermediate evidence and states why presenting every table row as universally interoperable production behaviour would lead to a different conclusion.
Decision and transfer
Use the feature progressively until the project’s support matrix proves otherwise. Prefer the choice whose semantics and failure modes are easiest to explain for the actual job. Shorter syntax is useful only when it preserves that clarity.
Mastery of “The specification warns about coverage gaps” means the learner can predict the ordinary case, recognise presenting every table row as universally interoperable production behaviour, diagnose the earliest mistaken assumption, recover with “Cite the specification, run current target-browser tests and record date and versions.” and defend this decision: Use the feature progressively until the project’s support matrix proves otherwise. Once that causal chain is stable, continue to the next chapter rather than adding repetitions of the same surface exercise.
Previous section · Contents · Next section
CHAPTER 19 OF 20 · Transfer with judgment
19. The shorthand can reset both spacing subproperties
The text-spacing shorthand sets text-spacing-trim and text-autospace; omitted components reset to their initial values under the shorthand rules. That is the invariant to preserve when names, data or surrounding project details change.
A later shorthand can silently replace an earlier longhand choice. The useful question is not “Which line should I copy?” but “Which state, value or rendering decision does this operation control?” Answering that question prevents a correct-looking result from hiding a wrong mental model.
The most revealing near-miss is setting text-spacing-trim then using text-spacing: normal and expecting the trim choice to survive. A learner should predict the result first, run the smallest safe case, label the observation and explain the earliest point where the prediction diverges. This turns an error into evidence rather than a verdict on ability.
Core worked example
p { text-spacing-trim: trim-both;
text-spacing: normal; }Explained result. The shorthand can reset the earlier longhand, so source order matters. The explanation should identify the input, the governing rule, the observable outcome and one boundary that would change the conclusion. If any of those four parts is missing, reduce the example and trace it again.
Read the trace, not just the last line
Trace declaration order, shorthand expansion and computed pair. Write the trace as a sequence of labelled states. For CSS text-spacing-trim, the decisive evidence may be an iterator close, a cached classification, a glyph-spacing decision or a repository object path; printing only the final Boolean or filename can hide the mechanism that produced it.
For “The shorthand can reset both spacing subproperties”, separate contract from coincidence. The contract is “The text-spacing shorthand sets text-spacing-trim and text-autospace; omitted components reset to their initial values under the shorthand rules.” and comes from the primary specification or manual. Coincidence is what happened on one machine, font, filesystem or repository. Record both, then use “Inspect cascade order and computed values for both longhands.” to decide whether another observation challenges the model or merely reflects the environment.
Four purposeful transfer cases
Case 1: homework evidence folder. Model “The shorthand can reset both spacing subproperties” with subject folders, draft answers and a reviewed copy. Before touching a tool, state which part of the case corresponds to the input, why “The text-spacing shorthand sets text-spacing-trim and text-autospace; omitted components reset to their initial values under the shorthand rules.” should remain invariant and what observation would expose setting text-spacing-trim then using text-spacing: normal and expecting the trim choice to survive.
Reasoned route. Begin with “The text-spacing shorthand sets text-spacing-trim and text-autospace; omitted components reset to their initial values under the shorthand rules.” Apply this procedure: Inspect cascade order and computed values for both longhands. For the homework evidence folder, introduce one controlled variation that exposes setting text-spacing-trim then using text-spacing: normal and expecting the trim choice to survive. The shorthand can reset the earlier longhand, so source order matters. A complete answer explains why the near-miss fails, names the evidence that distinguishes it from the corrected case and transfers the rule without relying on the original variable names.
Case 2: CCA media catalogue. Contrast “The shorthand can reset both spacing subproperties” with event folders, selected images and caption notes. Before touching a tool, state which part of the case corresponds to the input, why “The text-spacing shorthand sets text-spacing-trim and text-autospace; omitted components reset to their initial values under the shorthand rules.” should remain invariant and what observation would expose setting text-spacing-trim then using text-spacing: normal and expecting the trim choice to survive.
Reasoned route. Begin with “The text-spacing shorthand sets text-spacing-trim and text-autospace; omitted components reset to their initial values under the shorthand rules.” Apply this procedure: Inspect cascade order and computed values for both longhands. For the CCA media catalogue, introduce one controlled variation that exposes setting text-spacing-trim then using text-spacing: normal and expecting the trim choice to survive. The shorthand can reset the earlier longhand, so source order matters. A complete answer explains why the near-miss fails, names the evidence that distinguishes it from the corrected case and transfers the rule without relying on the original variable names.
Case 3: science investigation archive. Stress-test “The shorthand can reset both spacing subproperties” with raw readings, cleaned tables and chart exports. Before touching a tool, state which part of the case corresponds to the input, why “The text-spacing shorthand sets text-spacing-trim and text-autospace; omitted components reset to their initial values under the shorthand rules.” should remain invariant and what observation would expose setting text-spacing-trim then using text-spacing: normal and expecting the trim choice to survive.
Reasoned route. Begin with “The text-spacing shorthand sets text-spacing-trim and text-autospace; omitted components reset to their initial values under the shorthand rules.” Apply this procedure: Inspect cascade order and computed values for both longhands. For the science investigation archive, introduce one controlled variation that exposes setting text-spacing-trim then using text-spacing: normal and expecting the trim choice to survive. The shorthand can reset the earlier longhand, so source order matters. A complete answer explains why the near-miss fails, names the evidence that distinguishes it from the corrected case and transfers the rule without relying on the original variable names.
Case 4: revision-note builder. Explain “The shorthand can reset both spacing subproperties” with topic notes, worked examples and a generated index. Before touching a tool, state which part of the case corresponds to the input, why “The text-spacing shorthand sets text-spacing-trim and text-autospace; omitted components reset to their initial values under the shorthand rules.” should remain invariant and what observation would expose setting text-spacing-trim then using text-spacing: normal and expecting the trim choice to survive.
Reasoned route. Begin with “The text-spacing shorthand sets text-spacing-trim and text-autospace; omitted components reset to their initial values under the shorthand rules.” Apply this procedure: Inspect cascade order and computed values for both longhands. For the revision-note builder, introduce one controlled variation that exposes setting text-spacing-trim then using text-spacing: normal and expecting the trim choice to survive. The shorthand can reset the earlier longhand, so source order matters. A complete answer explains why the near-miss fails, names the evidence that distinguishes it from the corrected case and transfers the rule without relying on the original variable names.
Diagnostic route
- Model check: draw or list the exact values, objects, paths, characters or repository states before the operation.
- Boundary check: construct the smallest safe input that reveals setting text-spacing-trim then using text-spacing: normal and expecting the trim choice to survive.
- Evidence check: distinguish a displayed result from ownership, caching, consumption, font behaviour or object type.
- Repair check: Inspect cascade order and computed values for both longhands.
- Transfer check: repeat the rule in a second context and name what remains unchanged.
A parent does not need to memorise CSS text-spacing-trim to support “The shorthand can reset both spacing subproperties”. Useful prompts are: “What did you expect?”, “Which state changed first?”, “What evidence tests The text-spacing shorthand sets text-spacing-trim and text-autospace; omitted components reset to their initial values under the shorthand rules.?”, and “Can you make a smaller example of setting text-spacing-trim then using text-spacing: normal and expecting the trim choice to survive?” These questions keep ownership with the learner while making the reasoning visible.
Practice with an explained answer
Task. Explain why the final trim value is not trim-both. Write the prediction before running anything. Include one ordinary case and one boundary case, then explain the difference in two causal sentences.
Answer route. The later shorthand resets both subproperties to their normal initial behaviours. The final output alone earns only partial credit. A strong answer connects it to “The text-spacing shorthand sets text-spacing-trim and text-autospace; omitted components reset to their initial values under the shorthand rules.”, shows the relevant intermediate evidence and states why setting text-spacing-trim then using text-spacing: normal and expecting the trim choice to survive would lead to a different conclusion.
Decision and transfer
Use longhands for independent control or place a deliberate shorthand before specific overrides. Prefer the choice whose semantics and failure modes are easiest to explain for the actual job. Shorter syntax is useful only when it preserves that clarity.
Mastery of “The shorthand can reset both spacing subproperties” means the learner can predict the ordinary case, recognise setting text-spacing-trim then using text-spacing: normal and expecting the trim choice to survive, diagnose the earliest mistaken assumption, recover with “Inspect cascade order and computed values for both longhands.” and defend this decision: Use longhands for independent control or place a deliberate shorthand before specific overrides. Once that causal chain is stable, continue to the next chapter rather than adding repetitions of the same surface exercise.
Previous section · Contents · Next section
space-all preserves fullwidth spacing; normal balances context; trim-start and trim-both target edges; trim-all is aggressive; space-first serves compatibility; auto delegates. That is the invariant to preserve when names, data or surrounding project details change.
The final skill is matching a value to language, content history, font and acceptance criteria. The useful question is not “Which line should I copy?” but “Which state, value or rendering decision does this operation control?” Answering that question prevents a correct-looking result from hiding a wrong mental model.
The most revealing near-miss is choosing the shortest-looking screenshot without defining the intended convention. A learner should predict the result first, run the smallest safe case, label the observation and explain the earliest point where the prediction diverges. This turns an error into evidence rather than a verdict on ability.
Core worked example
[lang="ja"].flush-edges { text-spacing-trim: trim-both; }Explained result. The selected keyword can be defended by a four-part requirement rather than taste alone. The explanation should identify the input, the governing rule, the observable outcome and one boundary that would change the conclusion. If any of those four parts is missing, reduce the example and trace it again.
Read the trace, not just the last line
Map each requirement to one value and note remaining font/browser tests. Write the trace as a sequence of labelled states. For CSS text-spacing-trim, the decisive evidence may be an iterator close, a cached classification, a glyph-spacing decision or a repository object path; printing only the final Boolean or filename can hide the mechanism that produced it.
For “Choose a value from the typography job”, separate contract from coincidence. The contract is “space-all preserves fullwidth spacing; normal balances context; trim-start and trim-both target edges; trim-all is aggressive; space-first serves compatibility; auto delegates.” and comes from the primary specification or manual. Coincidence is what happened on one machine, font, filesystem or repository. Record both, then use “Write the desired line-start, line-end, adjacent-pair and platform behaviour first.” to decide whether another observation challenges the model or merely reflects the environment.
Four purposeful transfer cases
Case 1: homework evidence folder. Model “Choose a value from the typography job” with subject folders, draft answers and a reviewed copy. Before touching a tool, state which part of the case corresponds to the input, why “space-all preserves fullwidth spacing; normal balances context; trim-start and trim-both target edges; trim-all is aggressive; space-first serves compatibility; auto delegates.” should remain invariant and what observation would expose choosing the shortest-looking screenshot without defining the intended convention.
Reasoned route. Begin with “space-all preserves fullwidth spacing; normal balances context; trim-start and trim-both target edges; trim-all is aggressive; space-first serves compatibility; auto delegates.” Apply this procedure: Write the desired line-start, line-end, adjacent-pair and platform behaviour first. For the homework evidence folder, introduce one controlled variation that exposes choosing the shortest-looking screenshot without defining the intended convention. The selected keyword can be defended by a four-part requirement rather than taste alone. A complete answer explains why the near-miss fails, names the evidence that distinguishes it from the corrected case and transfers the rule without relying on the original variable names.
Case 2: CCA media catalogue. Contrast “Choose a value from the typography job” with event folders, selected images and caption notes. Before touching a tool, state which part of the case corresponds to the input, why “space-all preserves fullwidth spacing; normal balances context; trim-start and trim-both target edges; trim-all is aggressive; space-first serves compatibility; auto delegates.” should remain invariant and what observation would expose choosing the shortest-looking screenshot without defining the intended convention.
Reasoned route. Begin with “space-all preserves fullwidth spacing; normal balances context; trim-start and trim-both target edges; trim-all is aggressive; space-first serves compatibility; auto delegates.” Apply this procedure: Write the desired line-start, line-end, adjacent-pair and platform behaviour first. For the CCA media catalogue, introduce one controlled variation that exposes choosing the shortest-looking screenshot without defining the intended convention. The selected keyword can be defended by a four-part requirement rather than taste alone. A complete answer explains why the near-miss fails, names the evidence that distinguishes it from the corrected case and transfers the rule without relying on the original variable names.
Case 3: science investigation archive. Stress-test “Choose a value from the typography job” with raw readings, cleaned tables and chart exports. Before touching a tool, state which part of the case corresponds to the input, why “space-all preserves fullwidth spacing; normal balances context; trim-start and trim-both target edges; trim-all is aggressive; space-first serves compatibility; auto delegates.” should remain invariant and what observation would expose choosing the shortest-looking screenshot without defining the intended convention.
Reasoned route. Begin with “space-all preserves fullwidth spacing; normal balances context; trim-start and trim-both target edges; trim-all is aggressive; space-first serves compatibility; auto delegates.” Apply this procedure: Write the desired line-start, line-end, adjacent-pair and platform behaviour first. For the science investigation archive, introduce one controlled variation that exposes choosing the shortest-looking screenshot without defining the intended convention. The selected keyword can be defended by a four-part requirement rather than taste alone. A complete answer explains why the near-miss fails, names the evidence that distinguishes it from the corrected case and transfers the rule without relying on the original variable names.
Case 4: revision-note builder. Explain “Choose a value from the typography job” with topic notes, worked examples and a generated index. Before touching a tool, state which part of the case corresponds to the input, why “space-all preserves fullwidth spacing; normal balances context; trim-start and trim-both target edges; trim-all is aggressive; space-first serves compatibility; auto delegates.” should remain invariant and what observation would expose choosing the shortest-looking screenshot without defining the intended convention.
Reasoned route. Begin with “space-all preserves fullwidth spacing; normal balances context; trim-start and trim-both target edges; trim-all is aggressive; space-first serves compatibility; auto delegates.” Apply this procedure: Write the desired line-start, line-end, adjacent-pair and platform behaviour first. For the revision-note builder, introduce one controlled variation that exposes choosing the shortest-looking screenshot without defining the intended convention. The selected keyword can be defended by a four-part requirement rather than taste alone. A complete answer explains why the near-miss fails, names the evidence that distinguishes it from the corrected case and transfers the rule without relying on the original variable names.
Diagnostic route
- Model check: draw or list the exact values, objects, paths, characters or repository states before the operation.
- Boundary check: construct the smallest safe input that reveals choosing the shortest-looking screenshot without defining the intended convention.
- Evidence check: distinguish a displayed result from ownership, caching, consumption, font behaviour or object type.
- Repair check: Write the desired line-start, line-end, adjacent-pair and platform behaviour first.
- Transfer check: repeat the rule in a second context and name what remains unchanged.
A parent does not need to memorise CSS text-spacing-trim to support “Choose a value from the typography job”. Useful prompts are: “What did you expect?”, “Which state changed first?”, “What evidence tests space-all preserves fullwidth spacing; normal balances context; trim-start and trim-both target edges; trim-all is aggressive; space-first serves compatibility; auto delegates.?”, and “Can you make a smaller example of choosing the shortest-looking screenshot without defining the intended convention?” These questions keep ownership with the learner while making the reasoning visible.
Practice with an explained answer
Task. Choose values for a legacy ePub excerpt, a new flush-edge article and a platform-native reader. Write the prediction before running anything. Include one ordinary case and one boundary case, then explain the difference in two causal sentences.
Answer route. Use space-first, trim-both and auto respectively, subject to project testing. The final output alone earns only partial credit. A strong answer connects it to “space-all preserves fullwidth spacing; normal balances context; trim-start and trim-both target edges; trim-all is aggressive; space-first serves compatibility; auto delegates.”, shows the relevant intermediate evidence and states why choosing the shortest-looking screenshot without defining the intended convention would lead to a different conclusion.
Decision and transfer
A good decision preserves source semantics, fallback readability and a recorded support matrix. Prefer the choice whose semantics and failure modes are easiest to explain for the actual job. Shorter syntax is useful only when it preserves that clarity.
Mastery of “Choose a value from the typography job” means the learner can predict the ordinary case, recognise choosing the shortest-looking screenshot without defining the intended convention, diagnose the earliest mistaken assumption, recover with “Write the desired line-start, line-end, adjacent-pair and platform behaviour first.” and defend this decision: A good decision preserves source semantics, fallback readability and a recorded support matrix. Once that causal chain is stable, continue to the next chapter rather than adding repetitions of the same surface exercise.
Previous section · Contents · Next section
Parent guide: choose the next useful step
For CSS text-spacing-trim, start with evidence rather than a label such as careless. Ask for one prediction and one trace. If the first transition is wrong, rebuild the model. If the model is sound but reference use is weak, practise finding the governing contract. If routine cases work but boundaries fail, vary one condition. If explanations transfer, move to a small project.
Punggol family routines are often busy, so use one complete CSS text-spacing-trim prediction–observation–explanation cycle while attention is good. Ten to twenty focused minutes can be enough. Keep a four-line record: concept, prediction, observed difference and next test. Stop when fatigue replaces reasoning.
Use disposable fixtures, temporary directories and test repositories. Backups remain necessary. The activities in this guide are proposed home-learning exercises, not advertised lesson times, branch facilities, school affiliations or outcome guarantees.
Capstone practice with explained routes
1. Build a controlled punctuation matrix
Render four adjacent-pair combinations under normal and space-all. Include an ordinary case, a boundary, a deliberate failure and a recovery. Write the expected state before each operation.
Explained route. Start with: The specification classifies fullwidth opening, closing, middle-dot, colon and dot punctuation using Unicode categories, East Asian Width and language conventions. Apply: Record code points, lang, writing mode and font in the test case. Verify: The classification question becomes reproducible and avoids glyph-shape guesses. Then connect the result to the Unicode classification model in Chapter 12. A complete solution contains the input model, a trace, observed evidence, a correction and one transfer statement.
2. Compare line-edge strategies
Use fixed-width Japanese text to compare normal, trim-start and trim-both. Include an ordinary case, a boundary, a deliberate failure and a recovery. Write the expected state before each operation.
Explained route. Start with: trim-all sets fullwidth opening, closing and middle-dot punctuation with half-width spacing regardless of position or neighbours. Apply: Compare whole paragraphs, not one isolated pair, and include middle-dot punctuation. Verify: The rule applies beyond edges and adjacency, so interior rhythm can change. Then connect the result to the wrapping controls in Chapter 15. A complete solution contains the input model, a trace, observed evidence, a correction and one transfer statement.
3. Audit a legacy indentation pattern
Reproduce an ideographic-space paragraph and decide whether space-first is justified. Include an ordinary case, a boundary, a deliberate failure and a recovery. Write the expected state before each operation.
Explained route. Start with: auto lets the user agent choose typographically high-quality spacing values, potentially by platform. Apply: Test readability and invariants rather than one universal screenshot, or choose a specific keyword. Verify: Platform variation is permitted, so exact geometry is not the contract. Then connect the result to the semantic-content rule in Chapter 1. A complete solution contains the input model, a trace, observed evidence, a correction and one transfer statement.
4. Test two CJK fonts
Hold CSS and text constant while changing only the selected font. Include an ordinary case, a boundary, a deliberate failure and a recovery. Write the expected state before each operation.
Explained route. Start with: The trimming edges map to inline-start and inline-end, so vertical writing changes the physical direction of the effect. Apply: Use logical edge language and create writing-mode: vertical-rl fixture. Verify: The relevant start/end geometry rotates with the writing mode. Then connect the result to the computed-style limits in Chapter 18. A complete solution contains the input model, a trace, observed evidence, a correction and one transfer statement.
5. Create a vertical-writing fixture
Render trim-both under vertical-rl and label logical edges. Include an ordinary case, a boundary, a deliberate failure and a recovery. Write the expected state before each operation.
Explained route. Start with: Several values act at each visual line start or end, and wrapping determines those positions. Apply: Fix width, font, size, text and zoom for the comparison. Verify: Only the chosen property value changes, so the observed edge difference is meaningful. Then connect the result to the punctuation class definitions in Chapter 12. A complete solution contains the input model, a trace, observed evidence, a correction and one transfer statement.
6. Plan progressive enhancement
Write a readable base component and an @supports enhancement. Include an ordinary case, a boundary, a deliberate failure and a recovery. Write the expected state before each operation.
Explained route. Start with: getComputedStyle can confirm the resolved keyword, but it cannot judge punctuation rhythm, line breaks or font suitability. Apply: Pair computed-style checks with screenshot or geometry tests and human review. Verify: The test suite can distinguish cascade failure from rendering-quality failure. Then connect the result to the specification-coverage caution in Chapter 19. A complete solution contains the input model, a trace, observed evidence, a correction and one transfer statement.
7. Diagnose a shorthand reset
Change declaration order and inspect both text-spacing longhands. Include an ordinary case, a boundary, a deliberate failure and a recovery. Write the expected state before each operation.
Explained route. Start with: space-all preserves fullwidth spacing; normal balances context; trim-start and trim-both target edges; trim-all is aggressive; space-first serves compatibility; auto delegates. Apply: Write the desired line-start, line-end, adjacent-pair and platform behaviour first. Verify: The selected keyword can be defended by a four-part requirement rather than taste alone. Then connect the result to the value-choice matrix in Chapter 20. A complete solution contains the input model, a trace, observed evidence, a correction and one transfer statement.
8. Write a cross-browser test record
Record browser, date, font, lang, writing mode and exact fixture. Include an ordinary case, a boundary, a deliberate failure and a recovery. Write the expected state before each operation.
Explained route. Start with: The text-spacing shorthand sets text-spacing-trim and text-autospace; omitted components reset to their initial values under the shorthand rules. Apply: Inspect cascade order and computed values for both longhands. Verify: The shorthand can reset the earlier longhand, so source order matters. Then connect the result to the auto value’s platform variation in Chapter 10. A complete solution contains the input model, a trace, observed evidence, a correction and one transfer statement.
Frequently asked questions
How long should a practice session be?
Use one complete CSS text-spacing-trim prediction–observation–explanation cycle while attention remains good. Ten to twenty focused minutes can be enough.
Should every option or method be memorised?
No. For CSS text-spacing-trim, memorise governing distinctions and practise retrieving the primary reference. Understanding means predicting and explaining, not reciting a parameter list.
What if the result is correct but the explanation is weak?
Treat it as partial success. Ask for a trace and change one boundary. A reliable model survives controlled variation.
Is the shortest solution the best?
Not automatically. Prefer the solution whose semantics, failure modes and maintenance cost are easiest to justify for the actual project.
When should the official reference be used?
Use it whenever CSS text-spacing-trim syntax, supported values, version behaviour or implementation boundaries matter. The primary source settles the current contract.
How can a parent help without technical expertise?
Ask what was predicted, where the first difference appeared, what evidence matters and which smaller example could isolate it.
How do we test transfer?
Change the context, vocabulary and one boundary. Require the learner to identify the invariant before using a tool.
What should be saved after practice?
Keep the corrected rule, one trace, one boundary case and the next question. Avoid storing pages of unexplained output.
Can these exercises replace backups?
No. Use disposable examples and proper backups. Learning should not endanger schoolwork, repositories or personal data.
What counts as mastery?
The learner can predict, verify, diagnose, recover and justify a choice across more than one context, while knowing when to consult the current reference.

