TextFirst.css
A Semantic CSS Framework Against the Tri-Hard Pattern
What is the Tri-Hard Pattern?
Modern web development requires splitting simple tasks across
Example: A Simple Error Message
The Old Way (1 file, 5 seconds, works everywhere)
<font color="red"><b>ERROR:</b> File not found</font>
Tailwind (4+ files, 30 minutes setup, build process required)
<div class="bg-red-50 border border-red-400 text-red-700 px-4 py-3 rounded">
<strong class="font-bold">ERROR:</strong> File not found
</div>
TextFirst.css (1 file, 5 seconds, works everywhere)
<color name="error"><b>ERROR:</b> File not found</color>
Component Showcase
1. Status Indicators
Perfect for dashboards and system monitoring:
- Web Server
Online - 99.9% uptime- Database
Online - All connections healthy- Cache Server
Degraded - Slow response times- Backup System
Offline - Maintenance mode- CDN
Unknown - Checking status...
2. Banners
Important announcements with semantic types:
3. Numbered Menus
Perfect for keyboard navigation (like DBBasic TextBrowser!):
4. Collapsible Sections
Using native HTML <details> - no JavaScript!
What is progressive enhancement?
Progressive enhancement is a design philosophy that provides a baseline experience for all users, then enhances it for users with better browsers or capabilities.
View code example
function fetchPage(url) {
const response = await fetch(url);
const html = await response.text();
return parseHTML(html);
}
// Works in text browsers!
// No framework needed!
Why avoid the Tri-Hard pattern?
- Reduces complexity
- Faster development
- Easier debugging
- Better accessibility
- Works without build tools
5. Boxes
Frame important content:
Default Box
This is a standard box with rounded corners and blue border.
Perfect for highlighting important information!
Important Notice
This uses a double border (4px) for extra emphasis.
Soft Box
This box has extra rounded corners for a softer look.
Bold Box
This box has a bold border with shadow for maximum visibility.
6. Semantic Colors
Colors with meaning, not just decoration:
7. Traditional Tags Enhanced
Old HTML tags that work everywhere, enhanced with CSS:
Colors using <font color>:
Red • Green • Blue • Yellow • Cyan • Magenta
8. Blockquotes
The best programs are written so that computing machines can perform them quickly and so that human beings can understand them clearly. A programmer is ideally an essayist who works with traditional aesthetic and literary forms as well as mathematical concepts, to communicate the way that an algorithm works and to convince a reader that the results will be correct.
9. Keyboard and Sample Output
Show keyboard shortcuts and command output:
Press Ctrl + K to open the command palette.
Press H for help.
Sample output:
$ npm install textfirst-css ✓ Package installed successfully ✓ No build process required ✓ Ready to use immediately!10. Code Blocks
Syntax-friendly code display:
<!DOCTYPE html>
<html>
<head>
<title>My Page</title>
<link rel="stylesheet" href="textfirst.css">
</head>
<body>
<banner type="success">
It just works!
</banner>
</body>
</html>
Inline code: const x = 42;
Comparison Table
How does TextFirst.css compare to modern frameworks?
| Feature | TextFirst.css | Tailwind | Bootstrap |
|---|---|---|---|
| File Size | |||
| Build Process | |||
| Works in Text Browsers | |||
| Semantic HTML | |||
| Learning Curve | |||
| Dependencies | |||
| View Source Readability |
Forms Example
Enhanced form controls with zero JavaScript:
Why TextFirst.css?
Benefits
- Accessible by default - Works in text browsers, screen readers, and curl
- Fast - Small file size, no build process, instant loading
- Maintainable - Semantic HTML is self-documenting
- Future-proof - Relies on stable HTML standards, not framework trends
- Developer-friendly - View source makes sense, easy to debug
Who is this for?
- Terminal Users
- SSH sessions, tmux, remote access - full styling in text mode
- Minimalists
- People who want fast, simple websites without bloat
- Accessibility Advocates
- Screen readers, low vision, keyboard-only navigation
- Educators
- Teaching web development without overwhelming students
- Static Site Generators
- Hugo, Jekyll, 11ty - no build step needed
- Documentation Sites
- Technical docs that should work everywhere
Getting Started
Installation
Just one line in your HTML:
<link rel="stylesheet" href="textfirst.css">
That's it! No package.json, no webpack, no babel, no build process.
Basic Usage
Write semantic HTML like it's 1997, but better:
<banner type="info">
Welcome to my site!
</banner>
<menu type="numbered">
<li><a href="/home">Home</a></li>
<li><a href="/about">About</a></li>
</menu>
<article>
<h1>My Article</h1>
<p>
This is <color name="success">good content</color>
that works everywhere.
</p>
</article>