Skip to content

Repository files navigation

StyleCraft

VersionLicensePlatformManifestStatus

A full-featured CSS style manager for Chromium browsers. Create, edit, import, and manage custom styles for any website with a professional dark-themed interface, visual element picker, full CSS editor, and UserStyles.world integration.

Installation

From Source (Developer Mode)

  1. Clone or download this repository
  2. Open chrome://extensions in your browser
  3. Enable Developer mode (top right)
  4. Click Load unpacked and select the stylecraft folder
  5. Pin the extension for quick access

Supported Browsers

Chrome, Edge, Brave, Vivaldi, Opera, Arc — any Chromium-based browser supporting Manifest V3.

Features

Visual Editor

FeatureDescription
Element PickeruBlock-style point-and-click selector with live highlighting
Multi-Select PickerShift-click multiple elements to build combined selectors like h1, h2, h3
Stable SelectorsPrefers stable data/ARIA attributes and filters generated-looking classes
nth-child FallbackWhen no stable selector exists, generates a precise :nth-child chain instead of a bare tag name
Visual PropertiesEdit colors, fonts, spacing, display, borders via dropdowns and inputs
Box Model VisualizerInteractive box model diagram with arrow-key editing
Computed TokensInspect computed colors, type, spacing, radius, and contrast with copy/insert actions
4-Tab LayoutSelector, Visual, Code, and Themes tabs in the side panel
Live PreviewChanges apply in real-time as you type
Keyboard AccessibilityOptions, popup, editor dialogs, CodeMirror escape, and picker selection support labelled keyboard workflows

Full CSS Editor (editor.html)

FeatureDescription
Syntax HighlightingCodeMirror 6 CSS editor with local bundled syntax highlighting and low-memory fallback
SCSS / SassCSS, SCSS, and indented Sass source modes compile locally before save/live preview
PostCSS PipelineModern CSS nesting is flattened and vendor prefixes are added before save/live preview
UserCSS Metadata.user.css metadata, update URLs, match rules, and variables are parsed and preserved
Style TemplatesInsert var-driven surface, button, card, and form templates with variant selectors
Snippet TriggersType ;dark, ;motion, ;contrast, ;vars, or ;focus to expand reusable CSS blocks inline
CSS AssistOpt-in drafting panel inserts CSS from a local or OpenAI-compatible endpoint
Find & ReplaceCtrl+F / Ctrl+H with regex, case-sensitive toggle, match highlighting
Color PickerInline swatches for hex/rgb/hsl — click to edit with native color input
Bracket MatchingHighlights matching {}, (), [] at cursor position
Code FoldingCollapse/expand CSS blocks via gutter buttons
CSS LintingReal-time errors (unclosed braces, invalid hex) and warnings (missing semicolons, typos)
AutocompleteProperty name suggestions as you type
Auto-IndentSmart indentation on Enter inside blocks
Format/BeautifyOne-click CSS formatting
Undo/RedoFull history stack with Ctrl+Z / Ctrl+Shift+Z
Line NumbersActive line highlighting, clickable gutter
Domain SidebarTree view of all domains with custom CSS and theme entries
Keyboard ShortcutsHelp overlay showing all shortcuts

URL Pattern Matching

Pattern TypeExampleDescription
domaingithub.comMatches domain and subdomains
urlhttps://github.com/SysAdminDocExact URL match
url-prefixhttps://github.com/SysAdminDoc/URL starts with value
regexphttps?://.*\.github\.(com|io)/.*Full regex against URL
wildcard*.google.comGlob pattern with * wildcards

Configure per-style via the "Applies To" panel in the CSS editor. Use the built-in Test URL input to verify patterns match expected URLs. The same matcher drives early injection, popup installed-style state, badge counts, editor live preview, and background update broadcasts.

Conditional Triggers

ConditionMedia QueryEffect
Dark modeprefers-color-scheme: darkStyle only applies when system/browser is in dark mode
Light modeprefers-color-scheme: lightStyle only applies when system/browser is in light mode
Reduced motionprefers-reduced-motion: reduceStyle only applies when reduced motion is preferred
High contrastprefers-contrast: moreStyle only applies when high contrast is preferred

Enable per-style in the editor's "Applies To" panel. Injected CSS is wrapped in the corresponding @media query.

Theme Management

FeatureDescription
UserStyles.world BrowserSearch, preview, and install themes through a tested catalog adapter with cached fallback
Stylus ImportImport Stylus backup JSON with full @-moz-document parsing and multi-domain aggregation
Stylebot ImportImport Stylebot exports
Auto-Update CheckCompares installed USw themes against remote, one-click apply updates
Sort & FilterSort by name/domain/lines/date, filter by enabled/disabled/has-update
Bulk OperationsSelect all, bulk enable/disable/delete
Clone/DuplicateClone styles or themes to another domain
Single ExportExport one domain's styles as a standalone JSON file

Readability Mode

FeatureDescription
Reading ThemesDark, Sepia, Light, OLED
Font PickerGeorgia, Times New Roman, System Sans, Helvetica, Verdana, Courier New + Google Fonts (Merriweather, Inter, Literata)
Font SizeAdjustable 12-28px with live slider
Line HeightAdjustable 1.2-2.4 with live slider
Content WidthAdjustable 400-1000px with live slider
Element StrippingHides sidebars, ads, navigation, comments, related posts
Auto Dark ModeHeuristic color inversion for sites without native dark mode, with image/video correction
Text-to-SpeechSpeak button reads page content aloud using browser SpeechSynthesis with start/stop toggle

Data & Safety

FeatureDescription
Auto-BackupDaily automatic backup, keeps last 3 snapshots
Restore from BackupIn-page backup picker with preview counts, validation, and undo
Undo for Deletes8-second undo window on all destructive operations
Quota ProtectionCatches and surfaces storage quota errors
Import GuardValidates imported data, quarantines invalid entries, blocks dangerous CSS schemes, and creates a pre-import backup before storage writes
UserCSS ExportExport any style as a .user.css file with metadata header for use in other style managers
UserCSS ImportImport .user.css files directly with metadata, variables, and match rules preserved
Diagnostics ExportGenerate a local diagnostic report with redacted URLs for troubleshooting — no data leaves your device
CSS Trust ChecksFlags remote CSS fetches and high-risk selectors with per-style trust metadata
Per-Site Access GrantsHost access is optional; the popup requests the current site only when StyleCraft needs to inject styles
Local Assist SettingsCSS assist endpoint/model stay in settings; optional key is stored separately from exports
Full Export/ImportJSON export of all data, compatible cross-browser
Context MenuRight-click "Style this element" and "Hide this element"
Badge CounterShows active style count per tab

UI Themes

Three built-in themes across all interfaces (popup, editor, options):

  • Catppuccin Mocha (default) — warm purple accents
  • Dark / OLED — true black with blue accents
  • Light — clean light theme with purple accents

Quick CSS

The popup includes a collapsible Quick CSS textarea for fast edits without opening the full editor. Type CSS, hit Save & Apply, and it's live. Click the expand button to open in the full editor.

How It Works

┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ Popup / Editor │────>│ chrome.storage │────>│ inject-styles │
│ │ │ .local │ │ (document_start)│
│ Write CSS │ │ stylecraft_data │ │ Read & inject │
└─────────────────┘ └─────────────────┘ └─────────────────┘
│ │
▼ ▼
┌─────────────────┐ ┌─────────────────┐
│ content.js │ │ <style> tags │
│ │ │ │
│ Visual editor │ │ Theme CSS │
│ Element picker │ │ Custom CSS │
│ Live preview │ │ Global CSS │
└─────────────────┘ └─────────────────┘

No background worker dependency for injection. Styles are read directly from chrome.storage.local at document_start, ensuring instant application before page render. Host access is granted per HTTP/HTTPS site from the popup; once granted, the static document-start content script runs on future page loads for that site without requiring the service worker. The service worker handles only permission checks, USw API calls, context menus, badge updates, and backups.

File Structure

FilePurpose
manifest.jsonExtension config (MV3)
background.jsService worker — USw API, context menus, badge, auto-backup
style-data.jsShared import schema guard, CSS trust analyzer, quarantine, merge/replace summary, and pre-import backup helpers
style-match.jsShared URL and UserCSS document matcher for injection, popup, editor preview, and badge logic
usercss.jsShared .user.css metadata, variable, and nested @-moz-document parser/resolver
usw-adapter.jsUserStyles.world catalog/search parser, cached fallback helpers, and style detail/source adapter
content.jsVisual editor, element picker, readability mode
inject-styles.jsStyle injection at document_start
popup.html/jsExtension popup — installed styles, quick CSS, theme browser
editor.html/jsFull-page CSS editor
options.html/jsOptions page — style management, settings, import/export
theme.jsShared theme application

Configuration

All settings are accessible via the Options page (right-click extension icon > Options):

SettingDescriptionDefault
Editor WidthSide panel width (px)420
Code Font SizeEditor font size (px)12
Auto-open PickerStart element picker when editor opensOn
Default TabTab shown when editor opensSelector
Custom CSS on TopCustom CSS layers above themesOn
Add !importantAppend !important to all declarationsOff
Live PreviewApply changes in real-timeOn
CSS Layer WrappingWrap injected styles in @layer stylecraftOff
UI ThemeCatppuccin / Dark / LightCatppuccin
Accent ColorPrimary accent color#cba6f7
Highlight ColorElement picker highlight color#89b4fa

Keyboard Shortcuts

ShortcutAction
Ctrl+SSave
Ctrl+ZUndo
Ctrl+Shift+ZRedo
Ctrl+FFind
Ctrl+HFind & Replace
TabIndent
Shift+TabOutdent
Ctrl+KCommand Palette
EscapeClose overlay / Find bar

The global toggle shortcut can be configured at chrome://extensions/shortcuts.

Development Build

npm install
npm run build
npm test
npm run build:zip

The CodeMirror, Sass, and PostCSS bundles are generated into vendor/ and shipped locally with the extension; no remote runtime scripts are used.

Import Compatibility

SourceFormatNotes
StyleCraftJSONFull backup/restore
StylusJSON arrayParses @-moz-document sections, extracts domains, aggregates multi-domain styles
StylebotJSON objectMaps domain keys to custom CSS entries
UserCSS.user.cssSingle-file import with ==UserStyle== metadata, variables, and match rules preserved

FAQ

Q: Why aren't my styles applying? Styles inject at document_start from storage. If you just installed, reload the target page. Check that the style is enabled (green dot in editor sidebar).

Q: Can I use this on Chrome Web Store pages? Chrome restricts extensions on chrome:// and Web Store pages. StyleCraft cannot inject styles there.

Q: Where is my data stored? All data is in chrome.storage.local (up to 10MB). Use Export to create backups. Auto-backup runs daily.

Q: How do I import from Stylus? Export your Stylus data as JSON, then use the Import button in StyleCraft's Options page or popup. StyleCraft automatically detects the Stylus format.

Related Tools

ToolTypeBest For
StyleCraft (this repo)Ground-up MV3 extensionPower users who want a full CSS editor with syntax highlighting, linting, autocomplete, Stylus import, and UserStyles.world integration
StyleKitStylebot forkCasual users who want plain-English labels, guided onboarding, and one-click site recipes — no manual CSS required

If you want a simpler point-and-click interface with plain-English labels and pre-built site recipes, see StyleKit (a modernized Stylebot fork).

Contributing

Issues and PRs welcome. The codebase is vanilla JS with no build step — load the folder directly as an unpacked extension for development.

License

MIT — Copyright (c) 2026 SysAdminDoc

About

A full-featured CSS style editor and manager. It's as if Stylebot and Stylus had a baby.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages