CSS Editor
The CSS Editor is your primary tool for changing colors and styles in Football Manager. It supports both CSS and USS (Unity Style Sheets) formats.
Opening the CSS Editor
- Single-click any
.ussor.cssfile in the Explorer - Create a new file with New File button or right click > New File, then save with
.ussextension
CSS Editor interface
Screenshot ID: css-editor-overview
Simple Mode
Simple Mode provides a visual interface for CSS editing.
Color Picker
Click any color value to open the color picker:
Color picker in CSS Editor
Screenshot ID: css-color-picker
Color picker features:
- Visual color gradient
- Hex input field
- RGB sliders
- Opacity/alpha slider
Variable/Class Browser
The searchbar allows you to find CSS variables and classes in your file:
Variable browser panel
Screenshot ID: css-variable-browser
Features:
- Search variables and classes
Expert Mode
Expert Mode gives you a full code editor experience.
CSS Editor in Expert Mode
Screenshot ID: css-expert-mode-full
Code Features
| Feature | Shortcut |
|---|---|
| Toggle comment | Ctrl/Cmd + / |
| Duplicate line | Alt/Option + Shift + Down |
| Move line up/down | Alt/Option + Up/Down |
| Format document | Shift + Alt/Option + F |
Auto-Fix Dialog
Expert Mode includes an auto-fix feature that detects common CSS issues:
CSS auto-fix dialog
Screenshot ID: css-autofix
Detected issues:
- Duplicate selectors
- Invalid property names
- Nested selectors (not supported in USS)
- Missing semicolons
- Color format inconsistencies
To use:
- Click “Auto-Fix” in the toolbar
- Review detected issues
- Click “Fix” on individual issues or “Fix All”
CSS Syntax for FM
FM Skin Builder uses USS (Unity Style Sheets), which is similar to CSS with some differences.
Variables
Define color variables in :root:
:root {
--primary: #ff0000;
--secondary: #00ff00;
--background: #1a1a1a;
}Variable naming:
- Start with
--(two dashes) - Use lowercase with hyphens
- Be descriptive:
--button-hover-bgnot--bhbg
Using Variables
Reference variables with var():
.button {
background-color: var(--primary);
color: var(--text-color);
}Selectors
Target elements by class name:
/* Single class */
.green {
color: #00ff00;
}
/* Multiple classes (affects elements with ALL classes) NOT YET SUPPORTED */
.button.primary {
background-color: #3498db;
}Important USS limitations:
- No nested selectors (unlike SCSS)
- No pseudo-classes like
:hover(FM handles these differently) - No media queries
Color Formats
FM supports these color formats:
:root {
/* Hex - recommended */
--color1: #ff0000;
/* Hex with alpha */
--color2: #ff0000cc;
/* Short hex */
--color3: #f00;
/* RGB - not recommended, may have issues */
--color4: rgb(255, 0, 0);
}Recommendation: Use hex format (#RRGGBB) for best compatibility.
Comments
/* This is a comment */
:root {
--primary: #ff0000; /* Inline comment */
}Workflow Examples
Changing Colors
- Open
styles/base.uss - Find the
:rootsection - Change
--primaryto your color:
:root {
--primary: #e74c3c; /* Changed from default */
}- Save (Ctrl/Cmd + S)
- Build
Overriding a Specific Class
- Find the class name you want to change (see Asset Catalogue)
- Add a selector:
.green {
color: #2ecc71; /* Custom green instead of FM default */
}Creating Color Schemes
Organize colors logically:
:root {
/* Brand colors */
--brand-primary: #3498db;
--brand-secondary: #2ecc71;
--brand-accent: #e74c3c;
/* Background colors */
--bg-main: #1a1a1a;
--bg-panel: #2d2d2d;
--bg-hover: #3d3d3d;
/* Text colors */
--text-primary: #ffffff;
--text-secondary: #b0b0b0;
--text-muted: #666666;
}Finding Variable Names
How do you know which variables FM uses?
Asset Catalogue
Browse the Asset Catalogue to discover:
- CSS variable names
- CSS class names
- Current default values
Debug Mode
Build with debug mode to see all USS files:
- Enable Debug Mode in Settings
- Build your skin
- Check
debug/original/for FM’s stylesheets
Trial and Error
- Add a variable you think exists:
--my-guess: #ff0000; - Build and test
- If the color appears somewhere, you found a match
- If not, try another name
Per-Stylesheet Targeting
By default, CSS applies globally. To target specific stylesheets:
- Create
styles/mapping.json:
{
"match-colors.uss": "MatchColours",
"main-ui.uss": ["FMColours", "UIStyles"]
}- Create separate CSS files:
styles/match-colors.uss:
:root {
--primary: #27ae60; /* Green for match screens */
}styles/main-ui.uss:
:root {
--primary: #3498db; /* Blue for main UI */
}See Mapping Editor for details.
Tips and Best Practices
Use Variables
Define colors once, use everywhere:
/* Good */
:root {
--accent: #e74c3c;
}
.button { background-color: var(--accent); }
.link { color: var(--accent); }
/* Less maintainable */
.button { background-color: #e74c3c; }
.link { color: #e74c3c; }Comment Your Code
:root {
/* Main theme colors */
--primary: #3498db; /* Headers, buttons */
--secondary: #2ecc71; /* Success states */
--danger: #e74c3c; /* Errors, warnings */
}Test Incrementally
Don’t change everything at once:
- Change one or two colors
- Build and test
- Verify they appear as expected
- Continue with more changes
Troubleshooting
”Color not changing”
- Check variable name matches exactly (case-sensitive)
- Ensure proper syntax (semicolons, colons)
- Rebuild after changes
- Reload skin in FM
”Syntax errors in Expert Mode”
Look for:
- Missing semicolons
- Missing closing braces
- Typos in property names
”Simple Mode won’t open file”
The file likely has syntax errors. Use Expert Mode to view and fix them.
Next: UXML Editor - Learn to edit UI layouts.