Style Your Translations Your Way ๐จ
Ever wished your translations could match your reading vibe? Maybe you want soft pastels for bedtime reading, or bold highlights for study sessions?
You're in control now. Read Frog's Custom CSS feature lets you design exactly how your translations appear on any website.
Why Custom Styles Matter ๐ก
Default translation styles work fine... until they don't. Different content needs different visual treatment:
| Reading Scenario | What You Need | Problem with Defaults |
|---|---|---|
| ๐ Late-night study | Soft, easy-on-eyes colors | Bright defaults strain your eyes |
| ๐ฏ Important research | Bold, unmissable highlights | Subtle styles get lost |
| ๐ฐ Casual browsing | Minimal, clean integration | Heavy styling feels intrusive |
| ๐จ Personal preference | Match your site's dark theme | One-size-fits-all doesn't fit you |
The Truth: Your reading context changes constantly. Your translation style should adapt with you.
Meet Your New CSS Editor โก
We didn't just add a text box and call it a day. Read Frog's CSS editor is legitimately powerful:

Built for Everyone
For Beginners:
- ๐จ Color picker - Click any color value to open a visual picker
- โ Live validation - Instant feedback on syntax errors
- ๐ก Smart suggestions - Auto-complete as you type
- ๐ Example templates - Start from working examples
For Advanced Users:
- โก Full CSS support - Use gradients, shadows, animations, variables
- ๐ง Syntax highlighting - CodeMirror-powered editor
- ๐ Line numbers & folding - Navigate large stylesheets easily
- ๐ฏ Lint gutter - See errors at a glance
Pro Tip: The editor uses CodeMirror - the same powerful engine behind developer tools. You get professional-grade features in a browser extension!
The Color Picker Magic ๐
Here's where things get fun. Writing CSS colors used to mean:
โ Googling "color picker" โ Copying hex codes โ Switching between tabs โ Hoping it looks right
Now? Just click any color in your CSS:
- Type or paste any color format:
#FF5733,rgb(255, 87, 51),hsl(9, 100%, 60%) - Click it - Color picker appears instantly
- Adjust visually - Drag, slide, or type new values
- Done - Color updates in real-time
The picker understands all CSS color formats:
- Hex:
#FF5733 - RGB/RGBA:
rgba(255, 87, 51, 0.8) - HSL/HSLA:
hsla(9, 100%, 60%, 0.8) - Named colors:
tomato,skyblue,gold - CSS variables:
var(--my-color)
Live Validation Saves Your Sanity โจ
Ever saved CSS only to find it broke everything? Not anymore.
Safety Net: The editor validates your CSS before you save. No more broken styles, no more "undo panic."
What Gets Validated:
| Check | What It Does | Example |
|---|---|---|
| Syntax errors | Catches typos, missing brackets | color: #FF573 โ โ Missing digit |
| Property names | Flags invalid CSS properties | colour: red โ โ Use color |
| Length limits | Prevents oversized stylesheets | Max 8KB (plenty for complex styles) |
| Selector validity | Ensures selectors work | .my class โ โ .my-class โ
|
Visual feedback in real-time:
- ๐ข Green "Valid" - Your CSS is perfect, ready to save
- โช Gray "Validating..." - Checking your changes (500ms debounce)
- ๐ด Red "Syntax error" - Something's wrong, with helpful error messages
How to Create Your First Custom Style ๐ฏ
Takes less than 2 minutes:
- Open Read Frog settings โ Translation โ Translation Display Style
- Toggle "Use Custom Style" to ON
- You'll see the CSS editor appear with a helpful template:
/* Example: Custom style with color and background */
[data-read-frog-custom-translation-style='custom'] {
color: #414535;
background-color: light-dark(#F2E3BC, #C19875);
padding: 2px 4px;
border-radius: 4px;
}- Customize it! Click the color values to open the picker, adjust padding, add borders
- Click "Save" when validation shows green
- Visit any website and translate - your style applies instantly!
Quick Win: Try this soft highlight style for easy reading:
[data-read-frog-custom-translation-style='custom'] {
background-color: rgba(255, 247, 153, 0.3);
border-left: 3px solid #FFD700;
padding-left: 8px;
}Style Ideas to Try ๐ซ
See these styles in action! Each example shows how the CSS affects real translated text.
1. Soft Pastel Highlight
Best for: Long reading sessions, fiction, blogs
[data-read-frog-custom-translation-style='custom'] {
color: #414535;
background-color: light-dark(#F2E3BC, #C19875);
padding: 2px 4px;
border-radius: 4px;
}2. Bold Study Mode
Best for: Textbooks, research papers, memorization
[data-read-frog-custom-translation-style='custom'] {
background-color: #FFF59D;
color: #000;
font-weight: 600;
border: 2px solid #FFD54F;
padding: 6px 10px;
border-radius: 4px;
}3. Hover-responsive Animation
Best for: Interactive design, making translations feel alive
[data-read-frog-custom-translation-style='custom'] {
color: #0277BD;
transition: color 0.2s ease-out, transform 0.2s ease-out;
}
[data-read-frog-custom-translation-style='custom']:hover {
color: #01579B;
transform: translateX(2px);
}4. Cool Gradient Animation
Best for: Showing off to your friends
[data-read-frog-custom-translation-style="custom"] {
background: linear-gradient(90deg, #1fe5e1 0%, #a855f7 50%, #0ad6ff 100%);
background-size: 200% 100%;
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
color: transparent;
animation: gradient-shift 2s ease-in-out infinite;
}
@keyframes gradient-shift {
0%, 100% {
background-position: 0% 50%;
}
50% {
background-position: 100% 50%;
}
}Advanced Tricks ๐
Use CSS Variables
Define colors once, reuse everywhere:
[data-read-frog-custom-translation-style='custom'] {
--highlight-color: #FFE082;
--border-color: #FFA726;
background-color: var(--highlight-color);
border-left: 4px solid var(--border-color);
padding: 4px 10px;
}Responsive to Light/Dark Mode
Use light-dark() function (modern browsers):
[data-read-frog-custom-translation-style='custom'] {
background-color: light-dark(#FFF9C4, #4A4A2A);
color: light-dark(#333, #E0E0E0);
border: 1px solid light-dark(#FFD54F, #8D7B3A);
padding: 5px 10px;
border-radius: 4px;
}Technical Details ๐ง
For those who want to know what's under the hood:
| Feature | Technology | Why It Matters |
|---|---|---|
| Editor | CodeMirror 6 | Industry-standard, used by VS Code online |
| Color Picker | @uiw/codemirror-extensions-color | Native integration, supports all CSS formats |
| Validation | css-tree parser | Fast, accurate CSS syntax validation |
| Size Limit | 8KB (8,192 characters) | Enough for complex styles, prevents performance issues |
Tips for Best Results ๐ก
Golden Rules:
- Start simple - Add complexity gradually
- Test on multiple sites - Styles interact with page CSS differently
- Use low-opacity backgrounds - Maintains text readability
- Avoid
!important- The selector is already specific enough - Preview before saving - Validation catches errors, but test visually too
Common Pitfalls to Avoid:
โ Don't: color: #FF (incomplete hex code)
โ
Do: color: #FF5733 (full 6-digit hex)
โ Don't: padding: 10 (missing unit)
โ
Do: padding: 10px (include unit)
โ Don't: Write 200 lines of CSS โ Do: Focus on essential properties (color, background, padding, border)
What's Next? ๐ฎ
We're already planning exciting additions:
- ๐จ Style Library - Browse and import community-created styles
- ๐ค Export/Import - Share your favorite styles with friends
- ๐ฏ Per-Site Styles - Different styles for different websites
- ๐ Style Preview Panel - See changes before saving
Have a feature idea? Join our Discord and let us know what would make your translation styling even better!
Written by
ananaBMaster
At
Tue Oct 28 2025
Extension Version
1.16.0