@greendrake/scss-kit 0.7.0 → 0.8.0
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/README.md +1 -0
- package/_mixins.scss +13 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -136,6 +136,7 @@ The `url()` literals must be written in the font package's own `.scss` file: Vit
|
|
|
136
136
|
- `control-clear` — the × clear button rendered inside a select-shaped control, before the chevron: an inline-flex box held at the WCAG 2.2 target-size minimum (24×24, SC 2.5.8) with a negative block margin (computed from `var(--line-height-tight, 18px)`) so it grows into the control's padding instead of its height; glyph size `var(--control-clear-font-size, 18px)`; opacity 0.5, 1 on hover.
|
|
137
137
|
- `control-chevron($point: down)` — a dropdown/drill chevron built from two borders (no icon dependency): 7×7px, `currentColor`, opacity 0.6, `transform` transition; `$point: right` rotates it to point right.
|
|
138
138
|
- `img-spinner($size: 24px)` — a centred spinner `::before` on an `img` container. Requires global `spinner` keyframes and the `--spinner-color`/`--spinner-side-color` custom properties, all the app's to provide.
|
|
139
|
+
- `column-filled-by-last` — a flex column whose last child takes the room the others leave (`flex: 1`), shrinking below its content to scroll in itself (`min-height: 0`); the column has `min-height: 0` too, so that it nests as the last child of another.
|
|
139
140
|
- `hover-grow` — scales the element 1.2× under the pointer (0.3 s `transform` transition) and raises it to `z-index: 1` while grown, dropping back only once the shrink has finished; the host must take part in stacking (positioned, or a flex/grid item).
|
|
140
141
|
|
|
141
142
|
```scss
|
package/_mixins.scss
CHANGED
|
@@ -104,6 +104,19 @@
|
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
+
// A flex column whose last child takes the room the others leave, shrinking below its
|
|
108
|
+
// content to scroll in itself: a pane under its header, say. The column shrinks as
|
|
109
|
+
// well, so that it nests as the last child of another.
|
|
110
|
+
@mixin column-filled-by-last {
|
|
111
|
+
display: flex;
|
|
112
|
+
flex-direction: column;
|
|
113
|
+
min-height: 0;
|
|
114
|
+
> :last-child {
|
|
115
|
+
flex: 1;
|
|
116
|
+
min-height: 0;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
107
120
|
// Grow-on-hover: an icon-sized mark or icon button swells slightly under the
|
|
108
121
|
// pointer. The transition sits on the base state, not inside :hover — declared
|
|
109
122
|
// inside the hovered state it would animate the way in and snap the way out.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@greendrake/scss-kit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"description": "Framework-free SCSS primitives: breakpoints (single-sourced with TS via codegen), z-layer map, icon-mask registry, @font-face generator, misc mixins",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Eugene Greendrake <eugene@greendrake.nz>",
|