Przejdź do treści
Biblioteka skilli
Programowanie · Analiza

frontend-layering-specificity-debug

/frontend-layering-specificity-debug

Diagnozuje i naprawia kontrolki frontendu ignorujące CSS komponentu oraz etykiety HTML React Three Fiber i Drei rysowane nad nieprzezroczystymi szufladami, dialogami lub nawigacją.

Repozytorium
Noosphere ↗
Licencja
Apache-2.0
Ostatnia zmiana repozytorium
26.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 26.10.2026, bez odwołań do wycofanych modeli i API.

Licencja

Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.

Co robi i kiedy

Diagnozuje i naprawia kontrolki frontendu ignorujące CSS komponentu oraz etykiety HTML React Three Fiber i Drei rysowane nad nieprzezroczystymi szufladami, dialogami lub nawigacją.

Oryginalny opis (EN)

Diagnose and fix frontend controls whose typography or dimensions ignore component CSS, and React Three Fiber/Drei projected HTML labels that paint above opaque drawers, dialogs, or navigation. Use for inconsistent button sizes, element-type-dependent styling, unexpected wrapping, z-index escalation failures, or WebGL labels leaking through DOM overlays.

Jak działa

  1. Diagnose Before Styling
  2. Fix Typography Specificity
  3. Fix Projected 3D Labels
  4. Regression Checks
  5. Completion Standard
Sekcje z nagłówków SKILL.md, w oryginale · 56 linii, 392 słów
Podgląd SKILL.md
---
name: frontend-layering-specificity-debug
description: Diagnose and fix frontend controls whose typography or dimensions ignore component CSS, and React Three Fiber/Drei projected HTML labels that paint above opaque drawers, dialogs, or navigation. Use for inconsistent button sizes, element-type-dependent styling, unexpected wrapping, z-index escalation failures, or WebGL labels leaking through DOM overlays.
---

# Frontend Layering And Specificity Debug

## Diagnose Before Styling

1. Reproduce at the reported viewport and interaction state.
2. Record bounding boxes plus computed `font-size`, `line-height`, `width`, `height`, and `z-index`.
3. Compare equivalent element types. A `<button>` and an `<a>` that share a component class but render differently usually indicate a selector or user-agent boundary.
4. Enumerate matched CSS rules instead of inferring from source order alone.
5. Use `document.elementFromPoint()` at the overlap to identify the element that actually paints or receives input.

## Fix Typography Specificity

- Treat shorthand declarations such as `font: inherit` as resetting `font-size`, `font-weight`, and `line-height` together.
- Check specificity as well as order. `.app button` overrides `.button` even when `.button` appears later.
- In scoped resets, prefer `font-family: inherit` and explicit inherited properties. Keep component-level `font-size` and `line-height` authoritative.
- Add `white-space: nowrap` only to stable command controls; use responsive label collapse when the toolbar cannot fit.
- Verify computed styles on real `<button>`, `<a>`, `<input>`, and `<select>` elements after the fix.

## Fix Projected 3D Labels

- Remember that Drei `<Html>` is projected DOM, not canvas pixels. Its default `zIndexRange` is extremely high and can paint over an otherwise opaque drawer.
- Assign a bounded range such as `zIndexRange={[8, 1]}` for scene labels, then keep application chrome above it.
- Do not keep increasing drawer z-index without identifying the projected label range and stacking context.
- Reserve real canvas width for persistent desktop drawers when labels or selected nodes would otherwise sit underneath them.
- Use semantic zoom: show detailed labels only for hover, selection, a focused domain, or an actual non-empty search match.

## Regression Checks

Run desktop, compressed desktop, and mobile checks:

```js
const style = getComputedStyle(control)
expect(style.fontSize).toBe('13px')
expect(document.body.scrollWidth).toBe(document.documentElement.clientWidth)
```

For an open overlay, compare the projected label and drawer layers and probe overlap points:

```js
const top = document.elementFromPoint(x, y)
expect(drawer.contains(top)).toBe(true)
```

Also verify:

- short mobile sheets size to content;
- long content reaches a bounded height and scrolls internally;
- adjacent 3D nodes remain independently clickable;
- an empty search does not highlight every node;
- screenshots show no labels painted through drawers.

## Completion Standard

Complete only when the original viewport reproduces cleanly, computed styles prove the intended rule wins, projected labels stay below DOM overlays, responsive overflow is zero, and a regression check covers the root cause.

Wersje

W bazie nie ma innych skilli o nazwie frontend-layering-specificity-debug.

Identyczna treść występuje jeszcze w 1 innych folderach na GitHubie. Tu pokazujemy jedną, najlepiej ocenioną kopię.

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

  • 100drei
    Dostarcza gotowe komponenty 3D z biblioteki Drei dla React Three Fiber: OrbitControls, oświetlenie HDR, tekst, nakładki HTML, ładowanie modeli GLTF i optymalizację sceny.
  • 100threejs-impl-drei
    Używa komponentów Drei w React Three Fiber: sterowanie, mapy środowiska, tekst, nakładki HTML i pomocniki wydajności.
  • 100threejs-react-three-fiber
    Buduje sceny Three.js w React z React Three Fiber i drei: JSX, pętlę klatek, zdarzenia i ładowanie zasobów.
  • 100r3f-best-practices
    Podpowiada dobre praktyki przy pisaniu i optymalizacji kodu React Three Fiber z drei, zustand i postprocessingiem.
  • 100react-three-fiber-patterns
    Pomaga budować interaktywne doświadczenia 3D w React z react-three-fiber, helperami drei i shaderami: kompozycja sceny, wydajność i animacje.
  • 91webmaker-drei
    Dodaje do stron React Three Fiber pomocniki Drei: ładowanie glTF, sterowanie kamerą, światło i wydajność.

Uwagi i zgłoszenia

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