Skip to content

Commit 04c19b8

Browse files
committed
Restore default styling for full-only unrated symbols
1 parent 5cd8cd3 commit 04c19b8

File tree

2 files changed

+26
-17
lines changed

2 files changed

+26
-17
lines changed

CSS-CUSTOMIZATION.md

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,14 @@
22

33
This guide explains how to customize the appearance of interactive rating symbols using CSS snippets in Obsidian.
44

5-
## ⚠️ Important: No Default Visual Styling
5+
## ⚠️ Important: Minimal Default Styling
66

7-
**The Interactive Ratings plugin provides NO default visual styling for rating symbols.** All CSS classes are neutral theming hooks that allow complete customization freedom. Without custom CSS, all symbols will appear identical using your theme's default text styling.
7+
**The Interactive Ratings plugin applies minimal default styling to maintain functionality:**
88

9-
**To get started quickly, try the "Basic Styling" example below** to add visual distinction between filled, half, and empty symbols.
9+
- **Regular rating systems** (★☆): No default styling - symbols are visually distinct by character
10+
- **Full-only rating systems** (★★★★★): Essential default styling preserved - without it, ratings would be unreadable
11+
12+
**To get started with regular rating systems, try the "Basic Styling" example below** to add visual distinction between filled, half, and empty symbols.
1013

1114
## New Feature: Distinct CSS Classes for Selected/Unselected Symbols
1215

@@ -21,16 +24,18 @@ The Interactive Ratings plugin provides distinct CSS classes for selected (fille
2124
- `.interactive-rating-symbol--normal` - Legacy class (no longer used for filled/empty distinction)
2225

2326
#### For Full-Only Rating Systems (symbols that don't have empty variants):
24-
- `.interactive-rating-symbol--rated` - Applied to symbols within the rating
25-
- `.interactive-rating-symbol--unrated` - Applied to symbols beyond the rating (grayed out)
27+
- `.interactive-rating-symbol--rated` - Applied to symbols within the rating (has default styling)
28+
- `.interactive-rating-symbol--unrated` - Applied to symbols beyond the rating (has default styling)
29+
30+
**Important:** Full-only systems have essential default styling preserved because without it, all symbols would look identical and ratings would be unreadable. You can still override these defaults with your own CSS.
2631

2732
### Example CSS Snippets
2833

2934
Here are some examples of how you can customize the appearance of rating symbols:
3035

3136
#### 🚀 Quick Start: Basic Visual Distinction
3237
```css
33-
/* Add this snippet to get started with basic visual distinction */
38+
/* Add this snippet to get started with basic visual distinction for regular rating systems */
3439
.interactive-rating-symbol--rated {
3540
opacity: 1;
3641
color: inherit;
@@ -44,10 +49,7 @@ Here are some examples of how you can customize the appearance of rating symbols
4449
opacity: 0.4;
4550
}
4651

47-
.interactive-rating-symbol--unrated {
48-
opacity: 0.3;
49-
filter: grayscale(100%);
50-
}
52+
/* Note: .interactive-rating-symbol--unrated (full-only systems) already has default styling */
5153
```
5254

5355
#### 2. Make Empty Symbols More Subtle
@@ -156,14 +158,19 @@ Here are some examples of how you can customize the appearance of rating symbols
156158

157159
### Default Styling
158160

159-
**The plugin applies NO default visual styling to symbol states.** All symbol state classes are provided as neutral theming hooks:
161+
**The plugin applies minimal default styling to maintain functionality:**
160162

163+
**Regular Rating Systems** (★☆ - with distinct filled/empty symbols):
161164
- **Filled symbols** (`.interactive-rating-symbol--rated`): No default styling - add your own
162165
- **Half symbols** (`.interactive-rating-symbol--half`): No default styling - add your own
163166
- **Empty symbols** (`.interactive-rating-symbol--empty`): No default styling - add your own
164-
- **Unrated symbols** (`.interactive-rating-symbol--unrated`): No default styling - add your own
165167

166-
**Accessibility styling is preserved:** High contrast mode will automatically apply enhanced contrast styling only when users have high contrast preferences enabled. This ensures accessibility while maintaining theme neutrality in normal viewing modes.
168+
**Full-Only Rating Systems** (★★★★★ - single symbol type):
169+
- **Rated symbols** (`.interactive-rating-symbol--rated`): Default styling preserved (opacity: 1, no filter)
170+
- **Unrated symbols** (`.interactive-rating-symbol--unrated`): Default styling preserved (opacity: 0.5, grayscale filter)
171+
- **Reason**: Without default styling, full-only systems would be unreadable (all symbols would look identical)
172+
173+
**Accessibility styling is preserved:** High contrast mode will automatically apply enhanced contrast styling only when users have high contrast preferences enabled.
167174

168175
### Accessibility Considerations
169176

styles.css

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -159,20 +159,22 @@
159159
* Full-only unrated symbols (★ beyond rating in full-only systems)
160160
* Applied to: symbols beyond the current rating in systems with only one symbol type
161161
* Use for: custom styling of inactive symbols in full-only systems
162-
* Example: opacity: 0.3; filter: grayscale(100%);
162+
* Default styling: Essential for functionality - without this, full-only ratings would be unreadable
163163
*/
164164
.interactive-rating-editor-widget[data-full-only="true"] .interactive-rating-symbol--unrated {
165-
/* Add your custom styles here for full-only unrated symbols */
165+
opacity: 0.5 !important;
166+
filter: grayscale(100%) !important;
166167
}
167168

168169
/*
169170
* Full-only rated symbols (★ within rating in full-only systems)
170171
* Applied to: symbols within the current rating in systems with only one symbol type
171172
* Use for: custom styling of active symbols in full-only systems
172-
* Example: opacity: 1; filter: none;
173+
* Default styling: Ensures rated symbols remain fully visible
173174
*/
174175
.interactive-rating-editor-widget[data-full-only="true"] .interactive-rating-symbol--rated {
175-
/* Add your custom styles here for full-only rated symbols */
176+
opacity: 1 !important;
177+
filter: none !important;
176178
}
177179

178180
/* Support for display symbol count different from pattern length */

0 commit comments

Comments
 (0)