tiny-css
Skill17 starsChanged 6 months agoMITView on GitHub
Write minimal, efficient CSS for small or minimalist projects by trusting the browser instead of fighting it. Only use this skill for personal sites, prototypes, simple landing pages, or projects intentionally kept lean — if the project has multiple developers, a component library, a design token system, or more than a handful of CSS files, a more comprehensive CSS approach is needed. If you're about to write a CSS reset, declare a base font-size on :root, set default colors on body, use px for spacing, or reach for physical margin/padding properties, this skill will stop you.
In this repository9 other files it gives its agents.
- brightcove-playerSkill
- format-storybookSkill
- frontend-a11ySkill
- frontend-conventionsSkill
- frontend-design-2010sSkill
- grill-my-designSkill
- ios-a11ySkill
- more-cssSkill
- socratic-provocateurSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 3 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 79
Use color-scheme to automatically support light and dark modes based on user system preferences.
- Very specific: line 89
Use accent-color to change the color of checkboxes, radio buttons, range sliders, and progress bars.
- Distinctive: line 109
Write CSS that works across all languages and writing directions.
- Distinctive: line 133
Ensure images, videos, and iframes scale proportionally.
- Distinctive: line 154
Ensure buttons remain visible in Windows High Contrast Mode by adding explicit borders.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Tiny CSS
For small, minimalist projects — personal sites, prototypes, simple landing pages. Write as little CSS as possible and let the browser do the rest.
Core Principles
- Trust the browser — Don't reset what already works
- Use modern features — Let CSS handle what JavaScript used to do
- Respect user preferences — Honor system settings for motion, contrast, and color schemes
- Write resilient styles — Use logical properties for internationalization
Guidelines
Don't Declare Base Font Size
Let the browser handle the base font size, which defaults to 100% (typically 16px). Users can adjust this in their browser settings for accessibility.
/* Don't do this */
:root {
font-size: 16px;
}
html {
font-size: 100%;
}
body {
font-size: 1rem;
}
/* Do nothing — the browser already handles this */Use System Font with Better Glyphs
Enable distinct characters for uppercase I, lowercase l, and slashed zero in San Francisco font.
:root {
font-family: system-ui;
font-feature-settings: "ss06";
}Improve Text Wrapping
Prevent widows and improve line breaks.
:where(h1, h2, h3, h4, h5, h6) {
text-wrap: balance;
}
:where(p) {
text-wrap: pretty;
}Don't Declare Default Colors
Skip declaring color and background-color on the root. Browser defaults work and respect user preferences.
/* Don't do this */
body {
color: #000;
background-color: #fff;
}
/* Do nothing — browser defaults are fine */Enable Light and Dark Modes
Use color-scheme to automatically support light and dark modes based on user system preferences.
:root {
color-scheme: light dark;
}Customize Interactive Element Colors
Use accent-color to change the color of checkboxes, radio buttons, range sliders, and progress bars.
:root {
accent-color: #0066cc; /* Replace with desired color */
}Match SVG Icons with Text Color
Make SVG icons inherit the current text color automatically.
:where(svg) {
fill: currentColor;
}Use Logical Properties
Write CSS that works across all languages and writing directions. Use logical properties instead of physical ones.
/* Don't do this */
.card {
margin-left: 1rem;
margin-right: 1rem;
padding-top: 2rem;
padding-bottom: 2rem;
width: 20rem;
min-height: 20rem;
}
/* Do this */
.card {
margin-inline: 1rem;
padding-block: 2rem;
inline-size: 20rem;
min-block-size: 20rem;
}Make Media Embeds Responsive
Ensure images, videos, and iframes scale proportionally.
:where(img, svg, video, iframe) {
max-inline-size: 100%;
block-size: auto;
}Add Pointer Cursors to Interactive Elements
Provide a baseline hover affordance for all clickable elements.
:where(input:is([type="checkbox"], [type="radio"]), select, label, button) {
cursor: pointer;
}Support Forced Colors Mode
Ensure buttons remain visible in Windows High Contrast Mode by adding explicit borders.
@media (forced-colors: active) {
:where(button) {
border: 1px solid;
}
}Enable Smooth Scrolling Conditionally
Apply smooth scrolling only when the user hasn't requested reduced motion.
@media (prefers-reduced-motion: no-preference) {
:root {
scroll-behavior: smooth;
}
}Minimal Base Stylesheet
Here's a complete minimal base that incorporates all guidelines:
:root {
color-scheme: light dark;
accent-color: #0066cc;
font-family: system-ui;
font-feature-settings: "ss06";
}
:where(h1, h2, h3, h4, h5, h6) {
text-wrap: balance;
}
:where(p) {
text-wrap: pretty;
}
:where(img, svg, video, iframe) {
max-inline-size: 100%;
block-size: auto;
}
:where(svg) {
fill: currentColor;
}
:where(input:is([type="checkbox"], [type="radio"]), select, label, button) {
cursor: pointer;
}
@media (forced-colors: active) {
:where(button) {
border: 1px solid;
}
}
@media (prefers-reduced-motion: no-preference) {
:root {
scroll-behavior: smooth;
}
}Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

