Skip to content

fix: add font weight to helptext css so that it inherits the right weight to all HTML and markdown elements #4217

Merged
walldenfilippa merged 1 commit into
mainfrom
fix/4130-fontweight-help-text
May 21, 2026
Merged

fix: add font weight to helptext css so that it inherits the right weight to all HTML and markdown elements #4217
walldenfilippa merged 1 commit into
mainfrom
fix/4130-fontweight-help-text

Conversation

@walldenfilippa
Copy link
Copy Markdown
Contributor

@walldenfilippa walldenfilippa commented May 20, 2026

Description

Moved font-weight from .helpTextContent span to .helpTextContent, since we want more than just the span element to avoid inherited bold styling from .ds-label (font-weight: 500).

Related Issue(s)

Verification/QA

  • Manual functionality testing
    • I have tested these changes manually
    • Creator of the original issue (or service owner) has been contacted for manual testing (or will be contacted when released in alpha)
    • No testing done/necessary
  • Automated tests
    • Unit test(s) have been added/updated
    • Cypress E2E test(s) have been added/updated
    • No automatic tests are needed here (no functional changes/additions)
    • I want someone to help me make some tests
  • UU/WCAG (follow these guidelines until we have our own)
    • I have tested with a screen reader/keyboard navigation/automated wcag validator
    • No testing done/necessary (no DOM/visual changes)
    • I want someone to help me perform accessibility testing
  • User documentation @ altinn-studio-docs
    • Has been added/updated
    • No functionality has been changed/added, so no documentation is needed
    • I will do that later/have created an issue
  • Support in Altinn Studio
    • Issue(s) created for support in Studio
    • This change/feature does not require any changes to Altinn Studio
  • Sprint board
    • The original issue (or this PR itself) has been added to the Team Apps project and to the current sprint board
    • I don't have permissions to do that, please help me out
  • Labels
    • I have added a kind/* and backport* label to this PR for proper release notes grouping
    • I don't have permissions to add labels, please help me out

@walldenfilippa walldenfilippa added the kind/bug Something isn't working label May 20, 2026
@walldenfilippa walldenfilippa linked an issue May 20, 2026 that may be closed by this pull request
@walldenfilippa walldenfilippa added the backport This PR should be cherry-picked onto older release branches label May 20, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 20, 2026

📝 Walkthrough

Walkthrough

The Helptext.module.css stylesheet is updated to normalize font-weight styling. The font-weight: 400 declaration is moved from a nested span rule to the .helpTextContent container level, consolidating typography control and preventing unintended bold rendering in help text fields.

Changes

Help text font-weight normalization

Layer / File(s) Summary
Help text container font-weight styling
src/app-components/HelpText/Helptext.module.css
The .helpTextContent CSS rule now explicitly sets font-weight: 400 at the container level, replacing the prior nested span rule that targeted the same weight. This ensures consistent, non-bold text rendering across help text content.

🎯 1 (Trivial) | ⏱️ ~2 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: adding font weight to helptext CSS to ensure proper inheritance of font weight to all HTML and markdown elements.
Linked Issues check ✅ Passed The code changes directly address the objective in issue #4130 by moving font-weight from span-specific styling to the container level, ensuring consistent font weight inheritance across all HTML and Markdown children elements.
Out of Scope Changes check ✅ Passed All changes are directly scoped to fixing the font-weight inheritance issue in the helptext component CSS file, with no extraneous modifications present.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description check ✅ Passed The PR description is comprehensive and addresses all major sections of the template with appropriate detail.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/4130-fontweight-help-text

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@sonarqubecloud
Copy link
Copy Markdown

@lassopicasso lassopicasso self-assigned this May 21, 2026
Copy link
Copy Markdown
Contributor

@lassopicasso lassopicasso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice 👍

@walldenfilippa walldenfilippa merged commit 11f681d into main May 21, 2026
18 checks passed
@walldenfilippa walldenfilippa deleted the fix/4130-fontweight-help-text branch May 21, 2026 08:09
@github-actions
Copy link
Copy Markdown
Contributor

Automatic backport successful!

A backport PR has been automatically created for the release/v4.30 release branch.

The release branch release/v4.30 already existed and was updated.

The cherry-pick was clean with no conflicts. Please review the backport PR when it appears.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR should be cherry-picked onto older release branches kind/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bold text when not specified in textresources

2 participants