@ghostly-ui/core 0.2.2 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ghostly.css +33 -10
- package/package.json +1 -1
package/dist/ghostly.css
CHANGED
|
@@ -77,16 +77,39 @@
|
|
|
77
77
|
--_ghostly-display: inline-block;
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
-
/* ──
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
[data-ghostly]
|
|
88
|
-
[data-ghostly]
|
|
89
|
-
[data-ghostly]
|
|
80
|
+
/* ── Layout preservation ──
|
|
81
|
+
The critical problem: when text is empty, flex children collapse to 0 width.
|
|
82
|
+
Solution: force non-leaf containers to grow, and text elements to fill.
|
|
83
|
+
Uses !important to beat utility-class frameworks (Tailwind, etc). */
|
|
84
|
+
|
|
85
|
+
/* Non-leaf containers (divs wrapping text/images) must expand in flex/grid.
|
|
86
|
+
flex-grow:1 makes them fill available space instead of collapsing. */
|
|
87
|
+
[data-ghostly] div,
|
|
88
|
+
[data-ghostly] section,
|
|
89
|
+
[data-ghostly] article,
|
|
90
|
+
[data-ghostly] main,
|
|
91
|
+
[data-ghostly] aside,
|
|
92
|
+
[data-ghostly] header,
|
|
93
|
+
[data-ghostly] footer,
|
|
94
|
+
[data-ghostly] nav {
|
|
95
|
+
flex-grow: 1 !important;
|
|
96
|
+
min-width: 0 !important;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/* Leaf containers (empty divs used as placeholders like avatars)
|
|
100
|
+
should NOT grow — they have their own explicit dimensions. */
|
|
101
|
+
[data-ghostly] div:empty {
|
|
102
|
+
flex-grow: 0 !important;
|
|
103
|
+
flex-shrink: 0 !important;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/* Text elements: fill full width of their parent */
|
|
107
|
+
[data-ghostly] :where(h1, h2, h3, h4, h5, h6, p, pre,
|
|
108
|
+
blockquote, figcaption, caption, summary, address) {
|
|
109
|
+
width: 100%;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/* Inline-turned-block: reasonable minimums */
|
|
90
113
|
[data-ghostly] :where(span, a, em, strong, small, label, time, code) { min-width: 3rem; }
|
|
91
114
|
[data-ghostly] :where(button) { min-width: 5rem; }
|
|
92
115
|
[data-ghostly] :where(input, textarea, select) { min-width: 6rem; }
|