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

bricks-breakpoints

/bricks-breakpoints

Odczytuje lub zmienia definicje responsywnych breakpointów w Bricks na poziomie konfiguracji breakpointów.

Repozytorium
bricks-skills ↗
Licencja
LGPL
Ostatnia zmiana repozytorium
13.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
1
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

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

Licencja

LGPL, otwarta.

Co robi i kiedy

Odczytuje lub zmienia definicje responsywnych breakpointów w Bricks na poziomie konfiguracji breakpointów.

Oryginalny opis (EN)

Read or change Bricks responsive breakpoint definitions. Use for breakpoint configuration, not ordinary element styling at an existing breakpoint.

Jak działa

  1. Shape
  2. Mobile-first vs desktop-first
  3. Ordering
  4. Removing a breakpoint
  5. Tool availability
  6. Typical flow: add a custom "large-desktop" breakpoint without changing paradigm
  7. Don't
Sekcje z nagłówków SKILL.md, w oryginale · 90 linii, 809 słów
Podgląd SKILL.md
---
name: bricks-breakpoints
description: "Read or change Bricks responsive breakpoint definitions. Use for breakpoint configuration, not ordinary element styling at an existing breakpoint."
---

# Bricks: breakpoints (via MCP)

Bricks ships default breakpoints (`desktop`, `tablet_portrait`, `mobile_landscape`, `mobile_portrait`) and lets you add custom ones. The full set lives in the `bricks_breakpoints` option and drives both the builder device-switcher and the generated responsive CSS.

Two tools:

1. **`bricks/list-breakpoints`**: returns `{ customEnabled, isMobileFirst, baseKey, baseWidth, breakpoints, defaults, breakpointOwnership, globalSettingsOwnership }`. `baseKey` / `baseWidth` identify the base row; `isMobileFirst` is derived by core Bricks from the stored breakpoint list before it sorts the list for output.
2. **`bricks/set-breakpoints`**: write the full list. Always pass the latest `breakpointOwnership` as `expectedOwnership`. If `customEnabled` is present, also pass the same read's `globalSettingsOwnership` as `expectedGlobalSettingsOwnership`. A replacement that removes or renames a key additionally requires `allowRemovedBreakpoints: true` after reviewing the returned bounded usage evidence.

## Shape

Each breakpoint is an object:

```
{
  key: "tablet_portrait",   // machine key, unique: /^[a-z0-9_-]+$/i
  label: "Tablet portrait", // shown in builder, required non-empty
  width: 991,               // integer >= 0: see paradigm below
  icon: "bricks-icon-device-tablet", // optional
  base: true                // omit or false on all other rows
}
```

Exactly one row must have `base: true`. The base is the fallback: every other breakpoint is a media query relative to it. `base` is a boolean on the row itself, not a `type` enum.

## Mobile-first vs desktop-first

Bricks derives the paradigm from **which row is the base**, not from a separate setting:

- **Desktop-first (Bricks default):** the base row is not the last row in the saved breakpoint list. Base styles apply everywhere; narrower breakpoints layer on as `@media (max-width: Npx)`.
- **Mobile-first:** the base row is the last row in the saved breakpoint list. Base styles apply from `0` upward; wider breakpoints layer on as `@media (min-width: Npx)`.

`list-breakpoints` exposes the derived result as `isMobileFirst: boolean`. There is no `cssBreakpointType` global setting. If you change the base row, call `list-breakpoints` after saving and verify `isMobileFirst` before continuing.

**Caution:** use `bricks/set-breakpoints` for reading, restoring, adding, removing, or width changes when you can verify the result immediately. For a desktop-first to mobile-first paradigm switch, stop unless `list-breakpoints` confirms `isMobileFirst: true` after the write. Core Bricks derives the paradigm from stored base-row position, and the ability writer also sorts the replacement list before saving (`includes/abilities/breakpoints.php:242-249`), so the readback is the contract.

**A master "use custom breakpoints" toggle (`customBreakpoints`) in `bricks_global_settings` controls whether your custom set is applied at all: Bricks falls back to the built-in defaults when it's off.** That key is not in the `bricks/set-global-settings` registry. Use `bricks/set-breakpoints` with `customEnabled: true` or `customEnabled: false`, then verify with `list-breakpoints.customEnabled`.

The breakpoint and global-settings envelopes are separate authorities. Never derive
either from `designSystemVersion`, and never reuse one in place of the other. Re-read
after any stale-ownership response instead of retrying the same write.

**Switching paradigm rewrites every rendered stylesheet.** Regenerate CSS files (`bricks/regenerate-css-files`) after the write when `cssLoading=file`: otherwise cached files lag the new media-query semantics. `set-breakpoints` returns a `note` field prompting the regen when the flag is set.

## Ordering

`set-breakpoints` sorts rows by width before saving. Submit a clear complete list, then read back with `list-breakpoints` and use the returned order and `isMobileFirst` value as truth for generated CSS.

## Removing a breakpoint

- Any element with settings keyed to that breakpoint keeps the data (Bricks never deletes element settings on breakpoint removal: it becomes orphaned).
- Regenerate CSS after removal to drop the now-unused media queries from emitted files.

## Tool availability

> **If a `bricks/*` ability is not available as a direct tool**: first check whether it is outside the fast path and call it through `mcp-adapter-execute-ability` with `ability_name: "bricks/<name>"`. If the dispatcher also rejects it, call `bricks-list-ability-status` to check whether a site admin disabled it under Bricks > AI.

## Typical flow: add a custom "large-desktop" breakpoint without changing paradigm

```
bricks/list-breakpoints
  -> current: [desktop (base, 1279), tablet_portrait (991), mobile_landscape (767), mobile_portrait (478)]

bricks/set-breakpoints
  customEnabled: true
  expectedOwnership: <list-breakpoints.breakpointOwnership>
  expectedGlobalSettingsOwnership: <list-breakpoints.globalSettingsOwnership>
  breakpoints:
    - { key: "mobile_portrait",   label: "Mobile portrait",   width: 478 }
    - { key: "mobile_landscape",  label: "Mobile landscape",  width: 767 }
    - { key: "tablet_portrait",   label: "Tablet portrait",   width: 991 }
    - { key: "desktop",           label: "Desktop",           width: 1279, base: true }
    - { key: "large_desktop",     label: "Large desktop",     width: 1600 }

bricks/regenerate-css-files
```

The explicit `base: true` stays on `desktop`, so this remains desktop-first. Verify
the returned `isMobileFirst: false`; moving the base to the smallest row would be a
separate site-wide paradigm change.

## Don't

- Don't submit an array without exactly one `base: true`: the write is rejected with `bricks_invalid_param` (param `breakpoints`).
- Don't reuse an existing `key` for a new breakpoint: Bricks stores per-breakpoint settings under that key and you'll silently merge with the old data.
- Don't skip the CSS regen after reordering or removing a breakpoint.
- Don't remove or rename a key without reviewing the conflict's usage evidence and
  explicitly passing `allowRemovedBreakpoints: true` when the change is intended.

Wersje

W bazie nie ma innych skilli o nazwie bricks-breakpoints.

Migawka bazy z 13.11.2026 · wersja paczki bcdd1ff393c1 (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

  • 100migrate-beaver-builder-to-bricks
    Migruje strony z Beaver Builder do Bricks: odczytuje mapę węzłów, dopasowuje moduły do elementów Bricks i tworzy szkice duplikatów do przeglądu.
  • 100migrate-elementor-to-bricks
    Migruje strony z Elementora do Bricks: czyta JSON widżetów, mapuje każdy na odpowiednik Bricks i tworzy szkice duplikatów z czystym JSON Bricks.
  • 95bricks-child-theme-patterns
    Konfiguruje i naprawia child theme dla Bricks: ładowanie zasobów i rejestrację rozszerzeń w plikach PHP motywu.
  • 100bricks-dynamic-data
    Dobiera lub debuguje tagi danych dynamicznych Bricks, modyfikatory oraz kontekst wpisu i pętli: powiązania pól i wyrażenia.
  • 100responsive-breakpoint-analyzer
    Prawdopodobnie pomaga analizować breakpointy responsywności we frontendzie i aktywuje się automatycznie przy frazach o responsive breakpoint analyzer.
  • 98site-bricks
    Stosuje zasady dla stron zbudowanych w Bricks Builder: klasy globalne, zmienne, palety i style motywu zamiast wartości wpisanych w elementy.

Uwagi i zgłoszenia

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