Skip to content

Commit 6d74fe2

Browse files
sadpandajoeclaude
andcommitted
fix(theme): add fontWeightStrong to allowedAntdTokens for bold markdown rendering
**Problem**: Bold markdown (`**text**`) wasn't rendering with proper font-weight in dashboard widgets after Ant Design v5 upgrade (issue #35485) **Root Cause**: - `fontWeightStrong` token was missing from `allowedAntdTokens` array - Theme.getFilteredAntdTheme() filtered it out - GlobalStyles.tsx:66 set `font-weight: undefined` on `<strong>` tags - Browser fell back to user-agent stylesheet instead of theme value **Solution**: Add `'fontWeightStrong'` to allowedAntdTokens in types.ts **Testing**: - Added test verifying fontWeightStrong exists in theme - Test failed before fix (undefined), passes after fix - All 15 Markdown tests pass - Converted Markdown.test.jsx to TypeScript with proper types **Impact**: Fixes bold rendering for all `<strong>` tags including markdown, restoring theme-controlled font weights 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 79918a7 commit 6d74fe2

3 files changed

Lines changed: 436 additions & 416 deletions

File tree

superset-frontend/packages/superset-ui-core/src/theme/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,7 @@ export const allowedAntdTokens = [
268268
'controlTmpOutline',
269269
'fontFamily',
270270
'fontFamilyCode',
271+
'fontWeightStrong',
271272
'fontHeight',
272273
'fontHeightLG',
273274
'fontHeightSM',

0 commit comments

Comments
 (0)