-
-
Notifications
You must be signed in to change notification settings - Fork 643
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improved the text selection style #1497
Conversation
|
WalkthroughThe changes made in this pull request involve the addition of new styles for text selection in the Changes
Poem
Warning There were issues while running some tools. Please review the errors and either fix the tool’s configuration or disable the tool if it’s a critical failure. 🔧 eslint (1.23.1)
apps/webapp/app/tailwind.css(node:20535) ESLintIgnoreWarning: The ".eslintignore" file is no longer supported. Switch to using the "ignores" property in "eslint.config.js": https://eslint.org/docs/latest/use/configure/migration-guide#ignoring-files Oops! Something went wrong! :( ESLint: 9.15.0 ESLint couldn't find an eslint.config.(js|mjs|cjs) file. From ESLint v9.0.0, the default configuration file is now eslint.config.js. https://eslint.org/docs/latest/use/configure/migration-guide If you still have problems after following the migration guide, please stop by Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (1)
apps/webapp/app/tailwind.css
(1 hunks)
🔇 Additional comments (1)
apps/webapp/app/tailwind.css (1)
17-23
: Well-structured implementation of text selection styles!
The implementation follows best practices by:
- Including both standard and Mozilla-specific selectors
- Using semantic color tokens
- Maintaining consistent styling
::selection { | ||
@apply bg-text-bright/30 text-text-bright; | ||
} | ||
::-moz-selection { | ||
@apply bg-text-bright/30 text-text-bright; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codebase verification
Selection colors need adjustment for better contrast
Based on the tailwind configuration, the current selection colors may have accessibility issues:
text-bright
is set tocharcoal[200]
(#D7D9DD), which is a light gray- The background is set to 30% opacity of this same color (
bg-text-bright/30
) - This combination likely doesn't provide sufficient contrast against the dark theme background (
charcoal[800]
#1A1B1F)
Recommendations:
- Consider using a higher opacity value for the selection background (e.g., 50% or higher)
- Or use a different color token with better contrast against both selected text and background, such as
lavender[400]
(#826DFF) which is already used for text links
🔗 Analysis chain
Verify color contrast for accessibility
Please ensure that the selected text maintains sufficient contrast ratio with the background color (bg-text-bright/30
) across both light and dark themes for accessibility compliance.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Search for theme-specific color definitions that might affect text selection contrast
# Look for color token definitions that might affect text selection
rg -A 5 "text-bright|background" "tailwind.config"
# Check for theme-specific color variations
rg "theme:" -A 10 "tailwind.config"
Length of output: 196
Script:
#!/bin/bash
# Search for tailwind config files in the repository
fd -e js -e ts -e cjs -e mjs "tailwind.config"
# Also check for theme-related configurations in any CSS files
rg -t css "theme|colors?:" -A 5
Length of output: 376
Script:
#!/bin/bash
# Check the actual tailwind config content for color definitions
cat apps/webapp/tailwind.config.js
# Look for any theme-specific styles or color variables in the webapp
rg -t css "theme|--color|color:" apps/webapp/
Length of output: 7064
@trigger.dev/react-hooks
trigger.dev
@trigger.dev/rsc
@trigger.dev/build
@trigger.dev/sdk
@trigger.dev/core
commit: |
Improved the text selection colours
Summary by CodeRabbit