@slotted/styles 0.1.0-beta.19 → 0.1.0-beta.20

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@slotted/styles",
3
- "version": "0.1.0-beta.19",
3
+ "version": "0.1.0-beta.20",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -692,35 +692,30 @@
692
692
  }
693
693
 
694
694
  /**
695
- * A wide page banner. A system message is usually one line with one action,
696
- * and stacking that action under it wastes the whole width the banner took;
697
- * past this point the action rejoins the message's own line and the dismiss
698
- * control moves out to a column of its own. Only `page` reflows: an alert
699
- * beside a field group is narrow because the thing it is about is narrow,
700
- * however wide the window is.
695
+ * Actions at the end. A system message is usually one line with one action,
696
+ * and stacking that action under it wastes the whole width the box took;
697
+ * past this point the actions rejoin the message's own line and the dismiss
698
+ * control moves out to a column of its own. A `page` banner does it unless
699
+ * `actionsPlacement` says `below`; any other reach only when it says `end`:
700
+ * an alert beside a field group is narrow because the thing it is about is
701
+ * narrow, however wide the window is. Under 40rem the actions go back under
702
+ * the words.
701
703
  */
702
704
  @container slotted-alert (min-width: 40rem) {
703
- [data-ui-alert][data-reach='page'] > [data-part-actions] {
704
- align-self: center;
705
+ /* In the mark's and the words' baseline group: the labels of the actions
706
+ stand on the first line of the message, and a one-line message is
707
+ centred on the controls beside it. */
708
+ [data-ui-alert][data-actions-placement='end'] > [data-part-actions] {
709
+ align-self: baseline;
705
710
  grid-column: 3;
706
711
  grid-row: 1;
707
712
  margin-inline-start: var(--_column-gap);
708
713
  }
709
714
 
710
- /**
711
- * Centred with the action beside it rather than pulled onto the title's
712
- * line. On its own the control belongs at the message's first line; next to
713
- * a control that is centred on the whole box, two marks at two heights read
714
- * as an alignment mistake.
715
- *
716
- * Both block margins go, not only the top one: centring aligns the margin
717
- * box, and the negative bottom margin left behind pulled the control's
718
- * centre below the action's by half its overhang.
719
- */
720
- [data-ui-alert][data-reach='page'] > [data-part-dismiss] {
721
- align-self: center;
715
+ /* The dismiss control keeps its place on the first line, beside the
716
+ actions that now stand on the same line. */
717
+ [data-ui-alert][data-actions-placement='end'] > [data-part-dismiss] {
722
718
  grid-column: 4;
723
- margin-block: 0;
724
719
  }
725
720
  }
726
721
 
@@ -22,8 +22,8 @@
22
22
  [data-ui-date-picker][data-part-root] {
23
23
  display: block;
24
24
  /* The anchor the positioner measures is the control, and a block root
25
- lets the frame take the width the form gave it. */
26
- inline-size: 100%;
25
+ takes the width the form gave it without `inline-size: 100%`, which in a
26
+ flex row made the whole row this item's basis and clipped the date. */
27
27
  }
28
28
 
29
29
  /**
@@ -125,7 +125,9 @@
125
125
  font-family: var(--slotted-control-font-family, system-ui, sans-serif);
126
126
  font-size: var(--_font-size);
127
127
  grid-template-columns: minmax(0, 1fr) auto;
128
- inline-size: 100%;
128
+ /* No `inline-size: 100%`: a block box fills its container on its own, and
129
+ in a flex row a percentage is every item's basis — beside a date picker
130
+ both claimed the whole row and the shrink clipped the date. */
129
131
  /* A control in a grid track narrower than its intrinsic width would
130
132
  otherwise refuse to shrink and take the row's edge with it. */
131
133
  min-inline-size: 0;