CSS Stacking Context Inspector
css-stacking-context-inspectorFrontend developers need to understand why an element is visually hidden behind another even when z-index seems correct.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"css_snippet": "<css_snippet>",
"html_snippet": "<html_snippet>",
"selected_element": "<selected_element>",
"show_paint_order": "<show_paint_order>",
"show_stacking_context_chain": "<show_stacking_context_chain>"
},
"name": "css-stacking-context-inspector"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| css_snippet | Yes | Required. Must contain one or more CSS rules. Trim leading and trailing whitespace. If empty, show a validation error and do not compute results. | |
| html_snippet | Yes | Required. Must contain HTML markup for the inspected layout. Trim leading and trailing whitespace. If empty, show a validation error and do not compute results. | |
| selected_element | Yes | Required. Must be a CSS selector or element reference token that matches at least one element in the provided HTML snippet. If no match is found, return a selection error. | |
| show_paint_order | Yes | Boolean flag. When true, include a paint order trace. When false, omit the detailed trace but still compute the main layering explanation. | |
| show_stacking_context_chain | Yes | Boolean flag. When true, include the ancestry of stacking context creators from root to selected element. When false, include only the summarized cause. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| likely_fix_hints | No | ||
| paint_order_trace | No | ||
| diagnostic_summary | No | ||
| layering_explanation | No | ||
| stacking_context_chain | No | ||
| clipping_and_containment_warnings | No |