@jsenv/navi 0.27.64 → 0.27.65

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.
@@ -6369,6 +6369,16 @@ const applyOnTwoCSSProps = (cssStyleA, cssStyleB) => {
6369
6369
  };
6370
6370
  };
6371
6371
  };
6372
+ const applyOnFourCSSProps = (cssStyleA, cssStyleB, cssStyleC, cssStyleD) => {
6373
+ return (value) => {
6374
+ return {
6375
+ [cssStyleA]: value,
6376
+ [cssStyleB]: value,
6377
+ [cssStyleC]: value,
6378
+ [cssStyleD]: value,
6379
+ };
6380
+ };
6381
+ };
6372
6382
  const applyToCssPropWhenTruthy = (
6373
6383
  cssProp,
6374
6384
  cssPropValue,
@@ -6420,7 +6430,16 @@ const LAYOUT_PROPS = {
6420
6430
  column: () => {},
6421
6431
  };
6422
6432
  const OUTER_PROPS = {
6423
- margin: PASS_THROUGH,
6433
+ // expanded into longhands (not PASS_THROUGH) so the shorthand "margin" CSS
6434
+ // property is never written to the DOM: setting element.style.margin resets
6435
+ // all four margin-* longhands, which would silently wipe out an explicit
6436
+ // marginLeft/marginRight/marginTop/marginBottom applied alongside it.
6437
+ margin: applyOnFourCSSProps(
6438
+ "marginTop",
6439
+ "marginRight",
6440
+ "marginBottom",
6441
+ "marginLeft",
6442
+ ),
6424
6443
  marginLeft: PASS_THROUGH,
6425
6444
  marginRight: PASS_THROUGH,
6426
6445
  marginTop: PASS_THROUGH,
@@ -6433,7 +6452,15 @@ const OUTER_PROPS = {
6433
6452
  viewTransitionName: PASS_THROUGH,
6434
6453
  };
6435
6454
  const INNER_PROPS = {
6436
- padding: PASS_THROUGH,
6455
+ // expanded into longhands for the same reason as "margin" above: the
6456
+ // shorthand would otherwise reset paddingLeft/Right/Top/Bottom when both
6457
+ // are applied on the same element (e.g. padding="xs" paddingLeft="m").
6458
+ padding: applyOnFourCSSProps(
6459
+ "paddingTop",
6460
+ "paddingRight",
6461
+ "paddingBottom",
6462
+ "paddingLeft",
6463
+ ),
6437
6464
  paddingLeft: PASS_THROUGH,
6438
6465
  paddingRight: PASS_THROUGH,
6439
6466
  paddingTop: PASS_THROUGH,
@@ -6494,6 +6521,7 @@ const DIMENSION_PROPS = {
6494
6521
  if (parentBoxFlow === "flex-y" || parentBoxFlow === "inline-flex-y") {
6495
6522
  return {
6496
6523
  alignSelf: "stretch",
6524
+ width: "100%",
6497
6525
  };
6498
6526
  }
6499
6527
  // Can't use flexGrow — parent is not flex-x
@@ -28703,7 +28731,6 @@ const ButtonStyleCSSVars = {
28703
28731
  "borderWidth": "--button-border-width",
28704
28732
  "borderRadius": "--button-border-radius",
28705
28733
  "border": "--button-border",
28706
- "padding": "--button-padding",
28707
28734
  "paddingX": "--button-padding-x",
28708
28735
  "paddingY": "--button-padding-y",
28709
28736
  "paddingTop": "--button-padding-top",