Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| cfda79ef70 | |||
| 624e03a9e3 |
@@ -115,12 +115,18 @@ function DiffLine({
|
|||||||
<Box
|
<Box
|
||||||
key={i}
|
key={i}
|
||||||
component="mark"
|
component="mark"
|
||||||
px={3}
|
|
||||||
fw={600}
|
fw={600}
|
||||||
style={{
|
style={{
|
||||||
background: markBg,
|
background: markBg,
|
||||||
color: markFg,
|
color: markFg,
|
||||||
borderRadius: 3,
|
borderRadius: 2,
|
||||||
|
// Snug intra-word highlight: a hair of horizontal padding keeps
|
||||||
|
// the mark background slightly wider than the glyph, canceled by
|
||||||
|
// an equal negative margin so neighbouring letters are NOT pushed
|
||||||
|
// apart. The old px={3} padding made single-letter edits (е→ё,
|
||||||
|
// х→е) look like they had spaces around the changed character.
|
||||||
|
padding: "0 1px",
|
||||||
|
margin: "0 -1px",
|
||||||
textDecoration: isDel ? "line-through" : "none",
|
textDecoration: isDel ? "line-through" : "none",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|||||||
Reference in New Issue
Block a user