scarcss
v3.0.1
Published
A lightweight, utility-first frontend framework with Widget System. Pre-built SEO-optimized components, SPA navigation, and 500+ utility classes. Bug fixes for installation issues and default styles.
Maintainers
Readme
With Module Bundler
Secure/Obsfucated Versions
For enhanced security, ScarCSS also provides obfuscated versions that protect the core code:
<!-- Secure version with code protection -->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/scarcss.secure.min.js"></script>
<!-- Highly obfuscated version -->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/scarcss.obfuscated.min.js"></script>These versions provide the same functionality but with obfuscated code that makes it difficult to reverse engineer the core implementation.
With Module Bundler
import ScarCSS from 'scarcss';
// Initialize (optional, auto-initializes)
const scarCSS = new ScarCSS();Unique Utility Classes
ScarCSS includes unique utility classes not found in other frameworks:
Magic Gradients
bg-magic- Purple to blue gradientbg-fire- Pink to red gradientbg-ocean- Blue gradientbg-sunset- Pink gradientbg-forest- Green gradient
Text Effects
text-glow- Subtle text glowtext-shadow- Classic text shadowtext-3d- 3D text effecttext-neon- Neon text effect
Shapes
shape-circle- Perfect circleshape-blob- Organic blob shapeshape-star- Star shapeshape-heart- Heart shape
Animations
Entrance Animations
animate-fade-in- Fade in effectanimate-slide-up- Slide from bottomanimate-slide-down- Slide from topanimate-slide-left- Slide from rightanimate-slide-right- Slide from leftanimate-bounce-in- Bounce in effectanimate-zoom-in- Zoom in effect
Continuous Animations
animate-pulse- Gentle pulsinganimate-bounce- Bouncing effectanimate-spin- Continuous spinninganimate-ping- Ping effect
Exit Animations
animate-fade-out- Fade out effectanimate-slide-up-out- Slide up and outanimate-slide-down-out- Slide down and outanimate-slide-left-out- Slide left and outanimate-slide-right-out- Slide right and outanimate-bounce-out- Bounce out effectanimate-zoom-out- Zoom out effect
Hover Effects
hover-pop- Scale up on hoverhover-float- Float up on hoverhover-glow- Add glow on hoverhover-tilt- Tilt on hover
JavaScript Actions
Trigger JavaScript behaviors using the @action attribute:
<!-- Show alert -->
<button @action="{alert:'Hello World'}">Click Me</button>
<!-- Toggle menu -->
<button @action="{menuToggle:'#mobileMenu'}">Toggle Menu</button>
<!-- Open/close modal -->
<button @action="{modalOpen:'#myModal'}">Open Modal</button>
<button @action="{modalClose:'#myModal'}">Close Modal</button>
<!-- Copy to clipboard -->
<button @action="{copyToClipboard:'Text to copy'}">Copy Text</button>Examples
Card Component
<div @scar="bg-white rounded-lg shadow-xl p-6 max-w-sm mx-auto">
<div @scar="bg-magic shape-circle w-16 h-16 mx-auto mb-4"></div>
<h3 @scar="text-xl font-bold text-center mb-2">Card Title</h3>
<p @scar="text-gray-600 text-center mb-4">This is a card component styled with ScarCSS.</p>
<button @scar="bg-blue-500 text-white py-2 px-4 rounded hover:bg-blue-600 w-full">
Action Button
</button>
</div>Animated Button
<button @scar="bg-fire text-white py-3 px-6 rounded-lg hover-pop animate-pulse shadow-lg">
Animated Button
</button>Responsive Grid
<div @scar="grid grid-cols-1 md:grid-cols-3 gap-4">
<div @scar="bg-ocean text-white p-4 rounded text-center animate-fade-in">Column 1</div>
<div @scar="bg-sunset text-white p-4 rounded text-center animate-fade-in">Column 2</div>
<div @scar="bg-forest text-white p-4 rounded text-center animate-fade-in">Column 3</div>
</div>API
Utility Classes
ScarCSS provides utility classes for:
- Layout - Display, position, flexbox, grid
- Spacing - Padding, margin
- Sizing - Width, height
- Typography - Font size, weight, color
- Backgrounds - Colors, gradients
- Borders - Width, color, radius
- Effects - Shadows, opacity, filters
- Interactivity - Cursor, pointer events
- Transitions - Transition properties
- Transforms - Scale, rotate, skew
- Animations - Built-in animations
JavaScript Actions
alert(message)- Show browser alertmenuToggle(selector)- Toggle visibility of elementmodalOpen(selector)- Show modal elementmodalClose(selector)- Hide modal elementcopyToClipboard(text)- Copy text to clipboard
Browser Support
ScarCSS works in all modern browsers that support:
- ES6 JavaScript features
- CSS3
- DOM APIs
Contributing
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a pull request
License
MIT License
Author
Zawiyar Awan
Keywords
css, framework, utility, frontend, scar, attributes, tailwind, bootstrap
