-
Notifications
You must be signed in to change notification settings - Fork 187
Open
Description
Short description
Applying .foregroundStyle(.secondary) to a Text object makes it invisible in light mode.
Steps to Reproduce
- Run
ignite new testto create a new project. - Add the modifier
.foregroundStyle(.secondary)to the defaultText("Hello world!"). - Run
ignite buildandignite run.
Expected behavior
In dark mode, the page renders as expected, with “Hello world!” in grey instead of white:

In light mode, however, the text is rendered as white. In this screenshot I have highlighted the text in Safari to show it is still there but in white:
Build information
- OS: Ubuntu 24.04.3 LTS
- Editor: VSCode 1.106.2 on macOS Tahoe 26.1
- Swift version: Swift 6.2 86_64-unknown-linux-gnu
- Ignite version: 0.6.0
- Tested browsers: Safari 26.1 (21622.2.11.11.9), Chrome 142.0.7444.176
Additional context
Looking at the CSS, it seems the color is somehow set to 50 000+ which seems to be the source of the issue:

Thanks for your help with this project, it has helped me create good-looking static websites with no web dev experience.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels