Spaces:
Paused
Paused
|
Download styles/components/.cursor/rules/component-styles.md from Leon4gr45/paper2code-cli: direct link, hf CLI and curl.
- Browser
- Download file 1.1 kB
-
https://huggingface.co/spaces/Leon4gr45/paper2code-cli/resolve/main/styles/components/.cursor/rules/component-styles.md
- Command line
-
hf download hf://spaces/Leon4gr45/paper2code-cli/styles/components/.cursor/rules/component-styles.md
-
curl -L -o component-styles.md https://huggingface.co/spaces/Leon4gr45/paper2code-cli/resolve/main/styles/components/.cursor/rules/component-styles.md
1.1 kB
Component Styles Rules
When working with component-specific CSS in styles/components:
Architecture
Each component that requires custom CSS has a corresponding file:
button.css- Fire-inspired button shadows and effectsmodal.css- Modal animations and backdrop effectsspinner.css- Custom loading animations
Import Strategy
All component CSS files are imported in styles/main.css:
/* Component styles */
@import "./components/button.css";
@import "./components/modal.css";
@import "./components/spinner.css";
Guidelines
- Only create CSS files for components that need them - If Tailwind utilities suffice, don't create a CSS file
- Use P3 colors with sRGB fallbacks - Ensure wide gamut displays get enhanced colors
- Keep animations performant - Use transform and opacity for animations
- Component classes should be prefixed - e.g.,
.button-primary,.modal-backdrop
P3 Color Example
.button-primary {
background: #fa5d19; /* sRGB fallback */
background: color(display-p3 0.9816 0.3634 0.0984); /* P3 color */
}