Bug: Theming of font-style, font-weight is broken due to invalid CSS
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- css, typescript
- Domain
- frontend
Research direction
Start with packages/diffs/src/style.css around lines 320–331, where the issue reports invalid CSS. Read how the font-style and font-weight theme tokens are resolved, then check the resulting styles in Chrome. Done means italic and bold Markdown diff text render correctly without invalid CSS.
Written by the indexing model from the issue text.
Description
Prerequisites
- I have searched for duplicate or closed issues
- I have read the contributing guidelines
Describe the issue
Currently styling of font style/weight doesn't work because you incorrectly use light-dark() to resolve appropriate tokens for those values. For example, I was playing around with stylizing italic and bold text in Markdown diffs and I saw --diffs-token-light-font-style: italic and --diffs-token-light-font-weight: bold; were set correctly. However you seem to use light-dark() to resolve appropriate theme token but light-dark() only works on <color> values (see MDN). Therefore final calculation is invalid CSS, and it gets ignored.
Reproduction
Invalid CSS is already present in this repo: https://github.com/pierrecomputer/pierre/blob/diffs-v1.4.3/packages/diffs/src/style.css#L320-L331
What browser(s) are you seeing the problem on?
Chrome
What version of @pierre/diffs are you using?
1.4.3
- Dominant language
- TypeScript
- Stars
- 6.2k
- Forks
- 226
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 33
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from pierrecomputer/pierre
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
pierrecomputer/pierre#1187 ·
Maintainers usually reply within 1 day
-
Bug: WebKit crashes when drag-selecting text that auto-scrolls a diff (gutter-utility re-parented mid-drag)Possibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 4/5 3-5 days Newbie friendliness 25/100
pierrecomputer/pierre#1184 · 4 comments ·
Maintainers usually reply within 1 day
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 63/100
pierrecomputer/pierre#1172 ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 54/100
pierrecomputer/pierre#1171 · 2 comments ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 35/100
pierrecomputer/pierre#1163 ·
Maintainers usually reply within 1 day
All issues in pierrecomputer/pierre
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
db-ux-design-system/core-web#8461 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Cannot run an integration on windows when power shell is selected as the default profile terminalOpenPriority/Blocker Type/Bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
wso2/product-integrator#2767 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
-
severity:low
Difficulty 1/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day