Skip to content
Skills Library
Programming · Building & coding

css-ninja

/css-ninja

Master CSS with Tailwind, CSS-in-JS, responsive layouts, animations, and modern styling patterns. Use when: (1) responsive design implementation, (2) Tailwind CSS setup and customization, (3) CSS-in-JS (styled-components, emotion), (4) complex layouts (Grid, Flexbox), (5) CSS animations and transitions, (6) dark mode implementation, (7) component styling systems, (8) CSS architecture (BEM, utility-first). Triggers: "responsive", "Tailwind", "styled-components", "CSS grid", "flexbox", "animation", "dark mode", "layout".

Licence
MIT
Last repository change
20.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
14
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 20.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What to check before installing
  • SKILL.md zawiera komentarze HTML (14). Nie widać ich w podglądzie Markdown, a model je czyta.

What it does and when to use it

Master CSS with Tailwind, CSS-in-JS, responsive layouts, animations, and modern styling patterns. Use when: (1) responsive design implementation, (2) Tailwind CSS setup and customization, (3) CSS-in-JS (styled-components, emotion), (4) complex layouts (Grid, Flexbox), (5) CSS animations and transitions, (6) dark mode implementation, (7) component styling systems, (8) CSS architecture (BEM, utility-first). Triggers: "responsive", "Tailwind", "styled-components", "CSS grid", "flexbox", "animation", "dark mode", "layout".

Triggers from the description

responsiveTailwindstyled-componentsCSS gridflexboxanimationdark modelayout
Original author description

Master CSS with Tailwind, CSS-in-JS, responsive layouts, animations, and modern styling patterns. Use when: (1) responsive design implementation, (2) Tailwind CSS setup and customization, (3) CSS-in-JS (styled-components, emotion), (4) complex layouts (Grid, Flexbox), (5) CSS animations and transitions, (6) dark mode implementation, (7) component styling systems, (8) CSS architecture (BEM, utility-first). Triggers: "responsive", "Tailwind", "styled-components", "CSS grid", "flexbox", "animation", "dark mode", "layout".

How it works

  1. Tailwind CSS
  2. CSS-in-JS
  3. Layouts
  4. Animations
  5. Dark Mode
  6. Responsive Breakpoints
  7. References
Original SKILL.md headings · 302 lines, 710 words
SKILL.md preview
---
name: css-ninja
description: Master CSS with Tailwind, CSS-in-JS, responsive layouts, animations, and modern styling patterns. Use when: (1) responsive design implementation, (2) Tailwind CSS setup and customization, (3) CSS-in-JS (styled-components, emotion), (4) complex layouts (Grid, Flexbox), (5) CSS animations and transitions, (6) dark mode implementation, (7) component styling systems, (8) CSS architecture (BEM, utility-first). Triggers: "responsive", "Tailwind", "styled-components", "CSS grid", "flexbox", "animation", "dark mode", "layout".
---

# CSS Ninja

Modern CSS mastery with Tailwind, CSS-in-JS, and responsive design patterns.

## Tailwind CSS

### Setup

```bash
# Install
npm install -D tailwindcss postcss autoprefixer
npx tailwindcss init -p

# Configure
# tailwind.config.js
export default {
  content: ['./src/**/*.{js,jsx,ts,tsx}'],
  theme: {
    extend: {
      colors: {
        brand: {
          50: '#f0f9ff',
          500: '#3b82f6',
          900: '#1e3a8a'
        }
      }
    }
  },
  plugins: [
    require('@tailwindcss/forms'),
    require('@tailwindcss/typography')
  ]
}
```

### Responsive Design

```html
<!-- Mobile-first responsive patterns -->
<div class="
  p-4           /* base: mobile */
  md:p-6        /* tablet+ */
  lg:p-8        /* desktop+ */
  xl:max-w-7xl  /* large desktop */
">
  <!-- Grid responsive -->
  <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4">
    <Card />
    <Card />
    <Card />
  </div>
  
  <!-- Flex responsive -->
  <nav class="flex flex-col md:flex-row md:justify-between">
    <Logo />
    <Menu />
  </nav>
  
  <!-- Hide/show responsive -->
  <div class="hidden md:block">Desktop only</div>
  <div class="md:hidden">Mobile only</div>
</div>
```

### Common Patterns

```html
<!-- Centered container -->
<div class="flex items-center justify-center min-h-screen">
  <Card />
</div>

<!-- Sticky header -->
<header class="sticky top-0 z-50 bg-white/80 backdrop-blur-md">
  <Nav />
</header>

<!-- Card hover effect -->
<div class="
  transition-all duration-300 
  hover:shadow-xl hover:-translate-y-1
  hover:ring-2 hover:ring-blue-500
">
  <CardContent />
</div>

<!-- Gradient text -->
<h1 class="bg-gradient-to-r from-blue-600 to-purple-600 bg-clip-text text-transparent">
  Gradient Heading
</h1>

<!-- Aspect ratio -->
<div class="aspect-video w-full">
  <img class="w-full h-full object-cover" />
</div>
```

## CSS-in-JS

### Styled Components

```tsx
import styled from 'styled-components';

const Button = styled.button<{ $variant?: 'primary' | 'secondary' }>`
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-weight: 500;
  transition: all 0.2s;
  
  ${props => props.$variant === 'primary' && `
    background: #3b82f6;
    color: white;
    &:hover { background: #2563eb; }
  `}
  
  ${props => props.$variant === 'secondary' && `
    background: transparent;
    border: 1px solid #3b82f6;
    color: #3b82f6;
    &:hover { background: #eff6ff; }
  `}
`;

// Usage
<Button $variant="primary">Click me</Button>
```

### Emotion

```tsx
/** @jsxImportSource @emotion/react */
import { css } from '@emotion/react';

const buttonStyles = css`
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
`;

function Button({ children }) {
  return <button css={buttonStyles}>{children}</button>;
}
```

## Layouts

### Flexbox Patterns

```css
/* Center everything */
.center { display: flex; align-items: center; justify-content: center; }

/* Space between */
.header { display: flex; justify-content: space-between; align-items: center; }

/* Equal spacing */
.nav { display: flex; gap: 1rem; }

/* Sticky footer */
.page { display: flex; flex-direction: column; min-height: 100vh; }
.content { flex: 1; }
```

### Grid Patterns

```css
/* Auto-fit responsive grid */
.grid-auto {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

/* Holy grail layout */
.layout {
  display: grid;
  grid-template-areas:
    "header header"
    "sidebar main"
    "footer footer";
  grid-template-columns: 250px 1fr;
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
}

.header { grid-area: header; }
.sidebar { grid-area: sidebar; }
.main { grid-area: main; }
.footer { grid-area: footer; }
```

## Animations

### Tailwind Animations

```html
<!-- Fade in -->
<div class="animate-fade-in">
  Content fades in
</div>

<!-- Pulse -->
<div class="animate-pulse">Loading...</div>

<!-- Spin -->
<svg class="animate-spin h-5 w-5">...</svg>

<!-- Bounce -->
<div class="animate-bounce">↓</div>
```

### Custom Animations

```css
/* tailwind.config.js */
module.exports = {
  theme: {
    extend: {
      animation: {
        'fade-in': 'fadeIn 0.5s ease-in',
        'slide-up': 'slideUp 0.3s ease-out',
        'scale-in': 'scaleIn 0.2s ease'
      },
      keyframes: {
        fadeIn: {
          '0%': { opacity: '0' },
          '100%': { opacity: '1' }
        },
        slideUp: {
          '0%': { transform: 'translateY(10px)', opacity: '0' },
          '100%': { transform: 'translateY(0)', opacity: '1' }
        },
        scaleIn: {
          '0%': { transform: 'scale(0.95)', opacity: '0' },
          '100%': { transform: 'scale(1)', opacity: '1' }
        }
      }
    }
  }
}
```

## Dark Mode

```tsx
// tailwind.config.js
module.exports = {
  darkMode: 'class', // or 'media'
  // ...
}

// Toggle implementation
function ThemeToggle() {
  const [dark, setDark] = useState(() => 
    localStorage.theme === 'dark'
  );
  
  useEffect(() => {
    document.documentElement.classList.toggle('dark', dark);
    localStorage.theme = dark ? 'dark' : 'light';
  }, [dark]);
  
  return (
    <button onClick={() => setDark(!dark)}>
      {dark ? '☀️' : '🌙'}
    </button>
  );
}
```

```html
<!-- Usage -->
<div class="bg-white dark:bg-gray-900">
  <h1 class="text-gray-900 dark:text-white">Hello</h1>
</div>
```

## Responsive Breakpoints

```css
/* Standard breakpoints */
/* sm: 640px */
/* md: 768px */
/* lg: 1024px */
/* xl: 1280px */
/* 2xl: 1536px */

/* Tailwind usage */
<div class="
  text-sm      /* base */
  md:text-base /* tablet+ */
  lg:text-lg   /* desktop+ */
">
```

## References

- `references/tailwind_cheatsheet.md` - Complete Tailwind reference
- `references/css_patterns.md` - Common CSS layout patterns
- `references/animation_library.md` - Framer Motion / GSAP patterns

Versions

The database has no other skills named css-ninja.

Database snapshot: 13.11.2026 · package version ff4f303f01b0 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100tailwind-css-patterns
    Provides comprehensive Tailwind CSS utility-first styling patterns including responsive design, layout utilities, flexbox, grid, spacing, typography, colors, and modern CSS best practices. Use when styling React/Vue/Svelte components, building responsive layouts, implementing…
  • 100modern-css-layout-grid-flexbox
    Use this skill when engineering responsive layouts and alignment using modern CSS Flexbox and 2D CSS Grid without external layout libraries.
  • 100tailwindcss
    Tailwind CSS utility framework. Covers utility classes, responsive design, and customization. Use for styling web applications. USE WHEN: user mentions "Tailwind", "utility CSS", "Tailwind classes", asks about "responsive design", "Tailwind config", "utility-first CSS" DO NOT…
  • 80Frontend CSS
    Write maintainable CSS following the project's established methodology, whether using Tailwind utility classes, BEM naming, CSS modules, or styled-components. Use this skill when styling UI components or pages with CSS, applying design system tokens for colors and spacing, or…
  • 90frontend-css-strategy
    Use this skill when the user says 'CSS strategy', 'CSS Modules', 'CSS-in-JS', 'utility-first CSS', 'Tailwind CSS', 'styled-components', 'Emotion', 'CSS organization', 'CSS architecture', 'CSS approach', 'BEM', 'CSS naming convention', 'CSS preprocessor', 'Sass', 'PostCSS',…
  • 100styling-with-tailwind
    Provides utility-first CSS styling patterns using Tailwind CSS 3.x. Use when styling components with utility classes, configuring tailwind.config.js, implementing responsive designs, or creating dark mode themes.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.