Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions packages/feedback/src/core/createMainStyles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export function createMainStyles({
font-family: var(--font-family);
font-size: var(--font-size);

${colorScheme !== 'system' ? 'color-scheme: only light;' : ''}
${colorScheme !== 'system' ? `color-scheme: only ${colorScheme};` : ''}

${getThemedCssVariables(
colorScheme === 'dark' ? { ...DEFAULT_DARK, ...themeDark } : { ...DEFAULT_LIGHT, ...themeLight },
Expand All @@ -83,12 +83,13 @@ ${
? `
@media (prefers-color-scheme: dark) {
:host {
color-scheme: only dark;

${getThemedCssVariables({ ...DEFAULT_DARK, ...themeDark })}
}
}`
: ''
}
}
Copy link
Member Author

Choose a reason for hiding this comment

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

This was an extra closing brace doing nothing good nor bad.

I spotted it in the output though, we don't need it.

Image Image

Copy link

Choose a reason for hiding this comment

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

Fix PR missing automated regression test (Bugbot Rules)

Per the review rules: when reviewing a fix PR, check if it includes at least one unit, integration, or e2e test that tests the regression being fixed. This fix for color-scheme behavior doesn't appear to include any automated test. While CSS visual testing can be challenging and the PR includes manual testing with before/after screenshots, adding an automated test that verifies the generated CSS output for different colorScheme values ('light', 'dark', 'system') would help prevent future regressions.

Fix in Cursor Fix in Web

`;

if (styleNonce) {
Expand Down
Loading