Win9x styling for the modern web
The look of 1995 with the ergonomics of today: themeable tokens, a dark mode that actually reads, keyboard-operable components and WCAG AA contrast throughout. Every component is demonstrated on this page.
npm install @phantompixeldev/retrocss
Navigation
Layout
Utilities utilities
Atomic helpers on the same tokens as the components.
retro-bg-<hue> sets the fill and its on-fill text colour, so a
filled panel reads correctly in both themes from one class.
Backgrounds
Subtle tints
Text colours
primary success danger warning info teal pink lime muted
Spacing & flex
Margins and padding run 0β8 on a 0/4/8/12/16/24/32/40/48px scale.
Effects
Grid System .retro-grid
Basic Grid
Responsive Grid
Container Queries .retro-cq-*
Container Query Grid
Content
Typography .retro-h1 … .retro-h6
Heading 1 (h1)
Heading 2 (h2)
Heading 3 (h3)
Heading 4 (h4)
Heading 5 (h5)
Heading 6 (h6)
Heading Variants
Text Utilities
Primary | Success | Danger | Warning | Info | Teal | Pink | Lime
Bold | Italic | Underline | Shadow | Outline | UPPERCASE | lowercase | capitalize each word | Monospace | Extra Small | Large | Strike
Fancy Text Styles
Rainbow Text | Gradient Text | Outline Strong | Emboss | Deboss | Multicolor Shadow | Glitch | | Fire
Retro Blockquote
"This is a retro blockquote. The only limit to our realization of tomorrow will be our doubts of today."
Retro Code Block
function helloWorld() {
// This is a comment
const message = "Hello, Win9x!";
let count = 42;
if (count > 0) {
console.log(message);
}
return count + 1;
}
class Example {
constructor() {
this.name = "Example";
}
sayHello() {
return `Hello from ${this.name}!`;
}
}
HTML Example
<div class="retro-container">
<h1 class="retro-heading-primary">Hello World</h1>
<p class="retro-text-primary">
This is a paragraph with primary text color.
</p>
</div>
Retro Listbox
- Listbox Item 1
- Listbox Item 2
- Listbox Item 3
- Listbox Item 4
Inline code: npm install retrocss
Deleted text Inserted text sub sup
Badges .retro-badge
Badge Variants
Default Primary Success Danger Warning Info SecondaryBadge Sizes
Special Badge Themes
Neon Style
Neon Cyan Green RedPixel Style
Pixel 8-Bit GameBadge Usage Examples
Cards .retro-card
This is a simple card. You can put any content here.
This card has a footer for extra actions or status.
Lists .retro-list
Unordered List
- First item
- Second item
- Third item
- Nested item 1
- Nested item 2
Ordered List
- First item
- Second item
- Third item
- Nested item 1
- Nested item 2
Description List
- Term 1
- Description for term 1
- Term 2
- Description for term 2
List Variants
- Bordered list item
- Another bordered item
- Striped list item
- Another striped item
- One more striped item
- Hoverable list item
- Another hoverable item
Dividers .retro-divider
Basic Dividers
Style Variants
Colored Dividers
Text Divider
Vertical Divider
Tables .retro-table
| Name | Email Address with a very long header to test truncation | Status | Role | Joined Date | Last Login Timestamp | Notes and Comments about the user that could be very long | Actions |
|---|---|---|---|---|---|---|---|
| Alice Wonderland | alice.wonderland.in.a.very.long.email.address@example.com | Active | Administrator Extraordinaire | 2022-01-15 | 2023-10-26 10:00 AM | This user is a very important administrator with many responsibilities and access to all system features. | |
| Bob The Builder | bob.the.builder.constructs.long.emails@example.com | Inactive | User Account | 2022-03-22 | 2023-01-15 08:30 PM | Bob was a user but his account is now inactive. He liked to build things. | |
| Charlie Chaplin | charlie.chaplin.the.comedian.with.a.long.name@example.com | Pending Approval Process | Editor in Chief | 2022-05-10 | 2023-10-25 12:00 PM | Charlie is pending account approval. He has a great sense of humor and is expected to write amazing articles. | |
| Dana Scully | dana.scully.federal.agent.xfiles.division@example.com | Active | Special Investigator User | 2022-07-08 | 2023-10-26 09:00 AM | Dana investigates paranormal activities and writes detailed reports. Trust no one. The truth is out there. This is a very long note to test how the cell handles overflow and truncation. |
| Product Name with an exceedingly long title to ensure truncation works | Price (USD) | Stock Availability (Units) | Category Type | Average Customer Rating (out of 5) | Supplier Information Details and Contacts | Actions |
|---|---|---|---|---|---|---|
| Retro Encabulator Mark II - Now with more sinusoidal depleneration! | $10.99 | 1500+ | Advanced Fictional Accessories | 4.5 Stars | Sourced from Galactic HyperMart, contact: sales@ghypermart.nebula | |
| Turbo-Charged Keyboard Wiffer Duster - Keeps crumbs out of your retro keyboard | $20.50 | 0 (Out of Stock) | Essential Cleaning Accessories | 4.2 Stars | DustBusters Inc., contact: orders@dustbusters.local | |
| PixelPerfect CRT Monitor Enhancer - For the truest retro display experience ever | $120.00 | 75 | High-End Display Peripherals | 4.8 Stars | Retro Displays Ltd., contact: support@retrodisplays.co.uk | |
| Analog Dial-Up Modem Simulator - Experience the sweet sounds of 56k again and again | $35.75 | 15 (Low Stock) | Nostalgic Computer Accessories | 3.9 Stars | DialTones Corp., contact: info@dialtonescorp.vintage |
| Item ID | Description of Item which can be quite lengthy for testing purposes | Quantity | Unit Price | Total Price | Warehouse Location and Bin Number | Last Restock Date | Status Notes |
|---|---|---|---|---|---|---|---|
| SKU-001-XYZ-LONG | A very fine item with an exceptionally long description that will most certainly need to be truncated. This description goes on and on to fill up space. | 120 | $5.25 | $630.00 | Warehouse A, Section 3, Bin 105-C, Shelf 2, Position Left | 2023-09-01 | On Order |
| SKU-002-ABC-SHORT | Another item, this one has a slightly shorter but still quite verbose description for testing. | 75 | $12.99 | $974.25 | Warehouse B, Section 1, Bin 201-A, Shelf 1, Position Right | 2023-10-15 | In Stock |
| SKU-003-DEF-NORMAL | A standard item. | 200 | $2.50 | $500.00 | Warehouse A, Section 2, Bin 050-B, Shelf 3, Position Center | 2023-08-20 | In Stock |
| SKU-004-GHI-VERYLONGNAMEINITSELF | This item's name is already very long, and its description continues to elaborate on its many features, characteristics, and benefits to the end-user, making it an ideal candidate for truncation. | 30 | $25.00 | $750.00 | Warehouse C, Section 4, Bin 312-D, Shelf 4, Position Front | 2023-10-01 | Low Stock |
| Project Name - This header is designed to be very very long | Lead Developer Name and Contact Email | Status | Due Date | Completion (%) | Budget Allocated (USD) | Resources Assigned and their roles in this project | Client Notes and Feedback Snippets |
|---|---|---|---|---|---|---|---|
| Project Phoenix: Next Generation OS Development and Deployment | Dr. Elara Vance (elara.vance.long.email.address@devteam.example.com) | In Progress | 2024-06-30 | 65% | $2,500,000 | Team Alpha (Core Dev), Team Beta (QA), Team Gamma (UI/UX), John Doe (PM) - This cell is intentionally very long to test wrapping and truncation behavior. | Client is very happy with progress but requests more frequent updates. Also, please ensure the login screen has a retro animation. This is an extremely long piece of text for testing. |
| Operation Hydra: Secure Data Storage Initiative for Retro Systems | Mr. Ben Carter (ben.carter.security.specialist@secure.example.org) | Delayed | 2023-12-15 | 30% | $1,200,000 | Security Team (Implementation), Audit Team (Compliance), Jane Smith (Consultant) | Concerns about encryption strength. Budget overruns are becoming a significant issue for this project. |
| RetroWave UI Kit: Crafting the Ultimate Nostalgic User Interface | Ms. Anya Sharma (anya.sharma.design.lead@uistudio.example.net) | Completed | 2023-09-01 | 100% | $750,000 | Designers (UI/UX), Frontend Devs (Implementation) | Exceeded expectations! The client loves the pixel-perfect icons and the authentic 9x feel. Ready for market. |
| Code Cleanup Initiative: Refactoring Legacy Codebase for Project Chimera | The Entire Team of Very Dedicated and Hardworking Developers | Ongoing | 2024-03-01 | 15% | $500,000 | Senior Developers (Refactoring), Junior Developers (Testing and Documentation) - This field contains a lot of text. | This is a critical internal project to improve maintainability and performance of a core system component. Morale is high. |
Forms
Forms .retro-input
File Upload .retro-file-upload
Tag/Chip Input .retro-tag-input
Search Bar with Suggestions .retro-search-bar
Rating Stars .retro-rating
Date / Time Picker .retro-datetime
Actions
Buttons .retro-btn
Button Variants
Button Sizes
Colored Button Sizes
Dropdown Menu .retro-dropdown
Feedback
Alerts .retro-alert
Toasts RetroToast.show()
Modals .retro-modal
Modals are used to display content in a layer above the app. They are useful for confirmations, forms, or important messages.
The original demoModal is still available as well:
Progress / Loading Bars .retro-progress
Tooltips data-retro-tooltip
Position Variants
Style Variants
Component Variants modifiers
Size and layout modifiers that ship with the components above. These were in the stylesheet for several releases without appearing on any page, so nobody could find them.
Button and input sizes
Form layouts
Progress variants
Card variants
.retro-card-compact tightens the content padding..retro-card-image is a full-bleed band above the content.Avatars and loaders
RC RC Loading
Modal sizes
Add .retro-modal-lg, .retro-modal-xl or
.retro-modal-scroll to .retro-modal-content.
Tooltip positions and variants
Position with data-tooltip-position and colour with
data-tooltip-variant β neither was documented.
Toast variants
Disclosure
Accordion .retro-accordion
Welcome to RetroCSS
RetroCSS is a CSS framework that brings back the nostalgic look and feel of Win9x era interfaces.
To get started, include the following in your HTML:
<link rel="stylesheet" href="dist/retro.min.css"> <script src="dist/retro.min.js"></script>
Installation Options
Via NPM
npm install retrocss
Via CDN
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@phantompixeldev/retrocss/dist/retro.min.css"> <script src="https://cdn.jsdelivr.net/npm/@phantompixeldev/retrocss/dist/retro.min.js"></script>
Customizing RetroCSS
You can customize RetroCSS by overriding CSS variables:
:root {
--retro-primary: #0000aa;
--retro-bg: #c0c0c0;
--retro-border-dark: #404040;
--retro-border-medium: #808080;
--retro-border-light: #ffffff;
--retro-font: 'MS Sans Serif', Arial, sans-serif;
}
Frequently Asked Questions
Is RetroCSS responsive?
Yes, RetroCSS is built with modern responsive design in mind while maintaining the nostalgic Win9x aesthetic.
Does RetroCSS support dark mode?
Yes, RetroCSS includes a dark mode theme that can be toggled using the built-in theme switcher.
Can I use RetroCSS with modern frameworks?
Absolutely! RetroCSS works with React, Vue, Angular, and other modern frameworks.