Przejdź do treści
Biblioteka skilli
Projektowanie i UX · Budowanie i kod

tailwindcss-backgrounds

/tailwindcss-backgrounds

Stylizuje tła w Tailwind CSS: kolory, gradienty liniowe, radialne i stożkowe, obrazy tła, pozycja, rozmiar i tryby mieszania.

Repozytorium
agents ↗
Licencja
MIT
Ostatnia zmiana repozytorium
12.10.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
4
Skrypty
0
Komentarze HTML
23
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 12.10.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co sprawdzić przed instalacją
  • SKILL.md zawiera komentarze HTML (23). Nie widać ich w podglądzie Markdown, a model je czyta.

Co robi i kiedy

Stylizuje tła w Tailwind CSS: kolory, gradienty liniowe, radialne i stożkowe, obrazy tła, pozycja, rozmiar i tryby mieszania.

Oryginalny opis (EN)

Use when styling background colors, building linear/radial/conic gradients, setting background images/position/size, or blend modes.

Jak działa

  1. Background Colors
  2. Linear Gradients
  3. Radial Gradients
  4. Conic Gradients (since v4.0)
  5. Gradient Color Stops
  6. Background Images
  7. Background Size
  8. Background Position
  9. Background Repeat
  10. Background Blend Modes
Sekcje z nagłówków SKILL.md, w oryginale · 259 linii, 822 słów
Podgląd SKILL.md
---
name: tailwindcss-backgrounds
description: "Use when styling background colors, building linear/radial/conic gradients, setting background images/position/size, or blend modes."
user-invocable: false
---

<objective>
Complete reference for Tailwind CSS v4.3 background utilities: `bg-{color}` with the OKLCH P3 color palette (including the `mauve`/`olive`/`mist`/`taupe` palettes added in v4.2), gradients (`bg-linear-*`, `bg-radial-*`, and `bg-conic-*`), background images (`bg-cover`/`bg-contain`/`bg-repeat`/positioning/sizing), and blend modes (`bg-blend-*`).

Includes gradient color-stop control (`from-*`/`via-*`/`to-*`), custom-angle linear gradients, and theme-config extension for custom colors and background images.
</objective>

# Tailwind CSS Backgrounds Skill

Complete reference for background utilities in Tailwind CSS v4.3, including colors, gradients, images, positioning, sizing, and blend modes.

## Background Colors

Use `bg-{color}` utilities to set background colors with the modernized OKLCH color palette.

```html
<!-- Basic colors -->
<div class="bg-red-500"></div>
<div class="bg-blue-600"></div>
<div class="bg-emerald-400"></div>

<!-- Opacity modifiers -->
<div class="bg-blue-500/50"></div>
<div class="bg-slate-900/75"></div>
```

### Color Palette (OKLCH P3)

The default Tailwind palette uses OKLCH color space for perceptually uniform colors across the wider P3 gamut:

- **Neutrals**: slate, gray, zinc, neutral, stone
- **Tinted neutrals (since v4.2)**: mauve, olive, mist, taupe
- **Colors**: red, orange, amber, yellow, lime, green, emerald, teal, cyan, sky, blue, indigo, violet, purple, fuchsia, pink, rose

Each color has 11 shades: 50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950

## Linear Gradients

Create linear gradients using `bg-linear-*` utilities with direction and color stops.

```html
<!-- Directions -->
<div class="bg-linear-to-t from-blue-500 to-purple-500"></div>
<div class="bg-linear-to-r from-green-400 via-blue-500 to-purple-600"></div>
<div class="bg-linear-to-br from-yellow-200 to-red-600"></div>

<!-- Available directions -->
<!-- bg-linear-to-t, to-tr, to-r, to-br, to-b, to-bl, to-l, to-tl -->

<!-- Custom angles -->
<div class="bg-linear-45 from-slate-400 to-slate-600"></div>
<div class="bg-linear-180 from-indigo-500 to-pink-500"></div>
```

### Direction Utilities

- `bg-linear-to-t` - to top
- `bg-linear-to-tr` - to top right
- `bg-linear-to-r` - to right
- `bg-linear-to-br` - to bottom right
- `bg-linear-to-b` - to bottom
- `bg-linear-to-bl` - to bottom left
- `bg-linear-to-l` - to left
- `bg-linear-to-tl` - to top left
- `bg-linear-<angle>` - custom angle (e.g., `bg-linear-45`)

## Radial Gradients

Create radial gradients using `bg-radial-*` utilities.

```html
<div class="bg-radial from-yellow-400 to-slate-900"></div>
<div class="bg-radial from-purple-200 via-blue-400 to-slate-950"></div>
```

## Conic Gradients (since v4.0)

Create conic gradients using `bg-conic-*` utilities, perfect for color wheels and circular patterns.

```html
<div class="bg-conic-0 from-red-500 to-red-500"></div>
<div class="bg-conic-45 from-blue-400 via-purple-500 to-pink-400"></div>
<div class="bg-conic-[from_45deg] from-slate-400 to-slate-600"></div>
```

## Gradient Color Stops

Control gradient color stops with `from-*`, `via-*`, and `to-*` utilities.

```html
<!-- Two colors -->
<div class="bg-linear-to-r from-blue-500 to-purple-500"></div>

<!-- Three colors -->
<div class="bg-linear-to-r from-green-400 via-blue-500 to-purple-600"></div>

<!-- Custom positions -->
<div class="bg-linear-to-r from-blue-500 from-0% to-purple-500 to-100%"></div>
```

## Background Images

Use `bg-[url(...)]` to apply custom background images.

```html
<div class="bg-[url(/img/mountains.jpg)]"></div>
<div class="bg-[url(data:image/svg+xml,...)]"></div>
```

## Background Size

Control how background images are sized.

```html
<!-- Predefined sizes -->
<div class="bg-cover"><!-- Fills container, may crop --></div>
<div class="bg-contain"><!-- Scales to fit, may show blank space --></div>

<!-- Custom sizes -->
<div class="bg-[size:10rem]"></div>
<div class="bg-[size:50%]"></div>
<div class="bg-[size:200px_100px]"></div>
```

## Background Position

Position the background image within its container.

```html
<!-- Predefined positions -->
<div class="bg-top-left"></div>
<div class="bg-top"></div>
<div class="bg-top-right"></div>
<div class="bg-left"></div>
<div class="bg-center"></div>
<div class="bg-right"></div>
<div class="bg-bottom-left"></div>
<div class="bg-bottom"></div>
<div class="bg-bottom-right"></div>

<!-- Custom positions -->
<div class="bg-[position:25%_75%]"></div>
```

## Background Repeat

Control how background images repeat.

```html
<!-- Repeat -->
<div class="bg-repeat"><!-- Tile in both directions --></div>
<div class="bg-repeat-x"><!-- Tile horizontally --></div>
<div class="bg-repeat-y"><!-- Tile vertically --></div>

<!-- No repeat -->
<div class="bg-no-repeat"><!-- Single image --></div>
```

## Background Blend Modes

Combine background colors with images using blend modes.

```html
<div class="bg-blue-500 bg-[url(...)] bg-blend-multiply"></div>
<div class="bg-slate-700 bg-[url(...)] bg-blend-overlay"></div>
<div class="bg-amber-400 bg-[url(...)] bg-blend-soft-light"></div>

<!-- Available blend modes -->
<!-- multiply, screen, overlay, darken, lighten, color-dodge,
     color-burn, hard-light, soft-light, difference, exclusion,
     hue, saturation, color, luminosity -->
```

## Complete Examples

### Color Background with Opacity

```html
<div class="bg-slate-900/50 px-6 py-8 rounded-lg">
  Content with translucent background
</div>
```

### Gradient Overlay on Image

```html
<div class="bg-[url(/img/hero.jpg)] bg-cover bg-center
           bg-linear-to-br from-black/40 to-transparent
           h-96 flex items-center justify-center">
  <h1 class="text-white text-4xl font-bold">Hero Title</h1>
</div>
```

### Gradient with Multiple Stops

```html
<div class="bg-linear-to-r
           from-emerald-500 from-0%
           via-blue-500 via-50%
           to-purple-600 to-100%
           h-20 rounded-lg"></div>
```

### Conic Gradient (Color Wheel)

```html
<div class="w-32 h-32 rounded-full
           bg-conic-0
           from-red-500 via-yellow-500 via-green-500 via-blue-500 via-purple-500 to-red-500"></div>
```

### Image with Blend Mode

```html
<div class="w-full h-80
           bg-blue-600
           bg-[url(/img/pattern.png)] bg-cover bg-center
           bg-blend-multiply
           rounded-lg"></div>
```

## Customization

Extend background utilities in your Tailwind config:

```javascript
/** @type {import('tailwindcss').Config} */
export default {
  theme: {
    extend: {
      colors: {
        brand: {
          50: 'oklch(0.971 0.013 17.38)',
          500: 'oklch(0.637 0.237 25.331)',
          950: 'oklch(0.258 0.092 26.042)',
        },
      },
      backgroundImage: {
        gradient: 'url(\'/img/gradient.png\')',
      },
    },
  },
}
```

## Performance Tips

1. **Use color utilities** instead of hex values for better optimization
2. **Combine with `bg-no-repeat`** and sizing to prevent unwanted repetition
3. **Layer gradients** using multiple background utilities for complex effects
4. **Use opacity modifiers** (`/50`) instead of rgba for better tree-shaking
5. **Prefer conic/radial gradients** over images when possible for smaller file sizes

## Detailed References

- [colors.md](references/colors.md) - Load when picking specific color families, shades, OKLCH values, or semantic/accessibility color pairing
- [gradients.md](references/gradients.md) - Load when building linear/radial/conic gradients or working with color-stop positioning
- [images.md](references/images.md) - Load when applying background images, sizing/positioning/repeat, or blend modes
Pliki w paczce (4)
  • SKILL.md 8 KB
  • references/colors.md 6 KB
  • references/gradients.md 8 KB
  • references/images.md 10 KB

Wersje

W bazie nie ma innych skilli o nazwie tailwindcss-backgrounds.

Migawka bazy z 13.11.2026 · wersja paczki e3dde27f6c77 (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 90tailwindcss-development
    Stylizuje aplikacje klasami narzędziowymi Tailwind CSS v4: odstępy, układy flex i grid, responsywność, kolory, typografię i obramowania.
  • 85taste-tailwindcss
    Odwzorowuje estetykę, typografię, tokeny kolorów i komponenty serwisu tailwindcss.com przy budowie stron i interfejsów.
  • 100tailwindcss-architecture
    Porządkuje skalowalną strukturę systemu projektowego w Tailwind CSS: tokeny motywu, klasy narzędziowe i wtyczki.
  • 100tailwindcss-v4
    Prowadzi przez konfigurację Tailwind CSS v4 bez tailwind.config.js, z dostosowaniem motywu i migracją z v3.
  • 95astro-tailwind
    Stylizuje komponenty Astro w Tailwind 4: konfiguruje @theme, układy responsywne, typografię prose i tryb ciemny.
  • 100tailwindcss
    Wspiera projektowanie i implementację interfejsów w Tailwind CSS: układ, typografia, responsywność, motywy i wzorce komponentów, z gotowymi przepisami i konwencjami.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.