Commit d2f4dab
Fix CSS selectors to correctly target nested styled-components
Address Copilot review comments by fixing CSS selectors that were
incorrectly using direct child combinator (>) from .study-guides-wrapper.
Since .study-guides-wrapper has display:contents, the styled-components
(HighlightsChapterWrapper, HighlightWrapper) are nested inside
HighlightsWrapper, not direct children.
Changes:
- Remove > from .study-guides-wrapper > div selectors
- Use div:has(> h2[...]) to precisely target HighlightsChapterWrapper
- Use div:has(> h3[...]) to precisely target HighlightWrapper
- Update comments to clarify the DOM structure and targeting approach
Fixes all four issues identified in the review:
1. Mobile styles for HighlightsChapterWrapper (line 21)
2. Print padding for HighlightsChapterWrapper (line 45)
3. Print margin-left for HighlightWrapper (line 54)
4. Print margin-top for adjacent siblings (line 63)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>1 parent d209bd8 commit d2f4dab
1 file changed
Lines changed: 12 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
17 | 19 | | |
18 | 20 | | |
19 | | - | |
| 21 | + | |
20 | 22 | | |
21 | 23 | | |
22 | 24 | | |
| |||
38 | 40 | | |
39 | 41 | | |
40 | 42 | | |
41 | | - | |
| 43 | + | |
42 | 44 | | |
43 | | - | |
| 45 | + | |
44 | 46 | | |
45 | 47 | | |
46 | 48 | | |
47 | 49 | | |
48 | 50 | | |
49 | | - | |
| 51 | + | |
| 52 | + | |
50 | 53 | | |
51 | | - | |
| 54 | + | |
52 | 55 | | |
53 | 56 | | |
54 | 57 | | |
55 | 58 | | |
56 | 59 | | |
57 | | - | |
| 60 | + | |
| 61 | + | |
58 | 62 | | |
59 | | - | |
| 63 | + | |
60 | 64 | | |
61 | 65 | | |
62 | 66 | | |
| |||
0 commit comments