box-shadow, outline, Margin CollapseStatus: future · Priority: low · Depends on: CSS Cascade
Note: This is a future plan, not a commitment. The syntax and API shown here are proposals — they can be completely different when actually implemented.
Three CSS features — one shipped, two with dormant scaffolding.
box-shadowScaffold exists: runtime/cpp/style/features/shadow.h declares BoxShadow / ShadowStyle structs, guarded by MORPH_FEATURE_SHADOW — but the header is never included by style.h and the define is never emitted by the Rust feature_set.rs in morph-codegen. Purely dormant.
// style/features/shadow.h (future wiring)
struct BoxShadow {
float offsetX, offsetY, blur, spread;
Color color;
bool inset;
};Planned behavior:
box-shadow: 2px 2px 8px rgba(0,0,0,0.3) and the inset variantshadow-sm, shadow-md, …) as a bonus once the property landsoutlineScaffold exists: runtime/cpp/style/features/outline.h declares OutlineStyle, guarded by MORPH_FEATURE_OUTLINE — same dormancy: not included, not emitted.
Planned behavior:
outline / outline-color / outline-width / outline-offsetborder, outline does not affect layout (drawn outside the box)outline on :focusAlready on the v0.1.0 list. Shipped — implemented in runtime/cpp/core/node/layout.cpp behind MORPH_FEATURE_MARGIN_COLLAPSE (CSS 2.1 §8.3.1):
m_computedMargin (boundary-less block parents pass first-child top / last-child bottom margins up)| Feature | State |
|---|---|
BoxShadow / ShadowStyle structs |
✅ Declared, dormant |
OutlineStyle struct |
✅ Declared, dormant |
| Margin collapse | ✅ Shipped (MORPH_FEATURE_MARGIN_COLLAPSE in layout.cpp) |
| SDF shadow rendering | ❌ Not started |
box-shadow: include shadow.h in style.h, emit MORPH_FEATURE_SHADOW in feature_set.py, add parser + SDF shader pathoutline: same wiring + draw outside the box