@strato-css/preset-advanced
v1.1.0
Published
Advanced preset for Strato CSS with animations, transforms, and backdrop filters
Downloads
411
Maintainers
Readme
@strato-css/preset-advanced
Advanced preset for Strato CSS framework. This preset provides animation utilities, transform utilities, backdrop filters, and table utilities.
Installation
pnpm add @strato-css/preset-advancedUsage
import { defineConfig } from '@strato-css/core';
import presetAdvanced from '@strato-css/preset-advanced';
export default defineConfig({
presets: [
presetAdvanced()
]
});Features
Animation Utilities
Keyframe Animations
animate-spin- Rotate 360deganimate-ping- Scale and fade outanimate-pulse- Fade in and outanimate-bounce- Bounce up and down
Animation Utilities
animate-none- No animation- Custom animation durations
- Custom animation delays
- Custom animation timing functions
Transform Utilities
Scale Transforms
scale-0toscale-150- Scale from 0% to 150%scale-x-0toscale-x-150- Scale X axisscale-y-0toscale-y-150- Scale Y axis
Rotate Transforms
rotate-0torotate-180- Rotate in 45deg incrementsrotate-270,rotate-360- Additional rotations- Negative rotations:
-rotate-45,-rotate-90, etc.
Translate Transforms
translate-x-0totranslate-x-full- X translationtranslate-y-0totranslate-y-full- Y translation- Negative translations available
Skew Transforms
skew-x-0toskew-x-12- Skew X axisskew-y-0toskew-y-12- Skew Y axis- Negative skews available
Transform Origin
origin-center,origin-top,origin-right, etc.origin-top-left,origin-top-right, etc.
Backdrop Filter Utilities
Blur
backdrop-blur-none,backdrop-blur-sm,backdrop-blur,backdrop-blur-md,backdrop-blur-lg,backdrop-blur-xl,backdrop-blur-2xl,backdrop-blur-3xl
Brightness
backdrop-brightness-0tobackdrop-brightness-150- In 25 unit incrementsbackdrop-brightness-50,backdrop-brightness-75, etc.
Contrast
backdrop-contrast-0tobackdrop-contrast-200- In 50 unit increments- Negative contrast:
backdrop-contrast-50
Grayscale
backdrop-grayscale-0tobackdrop-grayscale- Grayscale filter
Hue Rotate
backdrop-hue-rotate-0tobackdrop-hue-rotate-180- In 15deg increments
Invert
backdrop-invert-0tobackdrop-invert- Invert filter
Saturate
backdrop-saturate-0tobackdrop-saturate-200- In 50 unit increments
Sepia
backdrop-sepia-0tobackdrop-sepia- Sepia filter
Table Utilities
Table Layout
table-auto- Automatic table layouttable-fixed- Fixed table layout
Border Collapse
border-collapse- Collapse bordersborder-separate- Separate borders
Caption Side
caption-top- Caption on topcaption-bottom- Caption on bottom
Table Cell Alignment
table-cell- Display as table celltable-row- Display as table rowtable-header-group- Display as table headertable-row-group- Display as table row grouptable-footer-group- Display as table footertable-column-group- Display as table column grouptable-column- Display as table column
Examples
Animations
<div class="animate-spin">
Loading...
</div>
<div class="animate-pulse">
Loading...
</div>Transforms
<div class="scale-150 rotate-45">
Scaled and rotated
</div>
<div class="hover:scale-110 transition">
Scale on hover
</div>Backdrop Filters
<div class="backdrop-blur-md bg-white/30">
Frosted glass effect
</div>
<div class="backdrop-brightness-110">
Brighter backdrop
</div>Tables
<table class="table-auto border-collapse">
<thead class="table-header-group">
<tr class="table-row">
<th class="table-cell">Header</th>
</tr>
</thead>
<tbody class="table-row-group">
<tr class="table-row">
<td class="table-cell">Cell</td>
</tr>
</tbody>
</table>Development
Testing
# Run all tests
pnpm test
# Run tests in watch mode
pnpm test --watch
# Run tests with UI
pnpm test:ui
# Run tests with coverage
pnpm test:coverageBuild
# Build the package
pnpm build
# Build in watch mode
pnpm devType Checking
# Run TypeScript type checking
pnpm typecheckLicense
MIT
