Skip to content

Commit 6277b6e

Browse files
committed
Rename --arrow-border-width to --popup-border-width
It's actually nothing to do with the width of the arrows border, but rather the width of any border applied to the popup body itself.
1 parent 00c244c commit 6277b6e

File tree

6 files changed

+9
-10
lines changed

6 files changed

+9
-10
lines changed

packages/webawesome/docs/docs/components/popup.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -333,9 +333,7 @@ The `skidding` attribute is similar to `distance`, but instead allows you to off
333333

334334
### Arrows
335335

336-
Add an arrow to your popup with the `arrow` attribute. It's usually a good idea to set a `distance` to make room for the arrow. To adjust the arrow's color and size, use the `--arrow-color` and `--arrow-size` custom properties, respectively.
337-
338-
You can also target the `arrow` part to add additional styles such as shadows and borders to match styles applied to rest of the popup element. When adding borders to the popup arrow, make sure to set the `--arrow-border-width` custom property to match the width of the border to so that the size calculations can take account for this.
336+
Add an arrow to your popup with the `arrow` attribute. It's usually a good idea to set a `distance` to make room for the arrow. To adjust the arrow's color and size, use the `--arrow-color` and `--arrow-size` custom properties, respectively. You can also target the `arrow` part to add additional styles such as shadows and borders to match styles applied to rest of the popup element.
339337

340338
By default, the arrow will be aligned as close to the center of the _anchor_ as possible, considering available space and `arrow-padding`. You can use the `arrow-placement` attribute to force the arrow to align to the start, end, or center of the _popup_ instead.
341339

packages/webawesome/docs/docs/resources/changelog.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Components with the <wa-badge variant="warning">Experimental</wa-badge> badge sh
1919
- Fixed a bug that caused `<wa-dropdown>` elements to scroll the document in Chrome 145
2020
- Updated `<wa-icon>` to use [Font Awesome 7.2.0](https://fontawesome.com/changelog#v7-2-0) [pr:2059]
2121
- Updated `<wa-popup>` arrow styling to prevent larger sized arrow from overlapping the contents of the popup [pr:2070]
22-
- Added `--arrow-border-width` parameter to `<wa-popup>`. This must be set to match the width of any border added to the popup element [pr:2070]
22+
- Added `--popup-border-width` parameter to `<wa-popup>`. This must be set to match the width of any border added to the popup element [pr:2070]
2323
- Modified native styles so that `border-radius` does not apply to `svg` elements by default [pr:2078]
2424

2525
## 3.2.1

packages/webawesome/src/components/popover/popover.styles.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export default css`
4242
/* The <wa-popup> element */
4343
.popover {
4444
--arrow-size: inherit;
45-
--arrow-border-width: var(--wa-panel-border-width);
45+
--popup-border-width: var(--wa-panel-border-width);
4646
--show-duration: inherit;
4747
--hide-duration: inherit;
4848

packages/webawesome/src/components/popup/popup.styles.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default css`
44
:host {
55
--arrow-color: black;
66
--arrow-size: var(--wa-tooltip-arrow-size);
7-
--arrow-border-width: 0px;
7+
--popup-border-width: 0px;
88
--show-duration: 100ms;
99
--hide-duration: 100ms;
1010
@@ -17,8 +17,8 @@ export default css`
1717
* to keep it central.
1818
*/
1919
20-
--arrow-base-offset: calc(var(--arrow-border-width) + 0.5px);
21-
--arrow-size-diagonal: calc((var(--arrow-size) + var(--arrow-border-width)) * 0.7071);
20+
--arrow-base-offset: calc(var(--popup-border-width) + 0.5px);
21+
--arrow-size-diagonal: calc((var(--arrow-size) + var(--popup-border-width)) * 0.7071);
2222
--arrow-padding-offset: calc(var(--arrow-size-diagonal) - var(--arrow-size));
2323
2424
display: contents;

packages/webawesome/src/components/popup/popup.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ const SUPPORTS_POPOVER = globalThis?.HTMLElement?.prototype.hasOwnProperty('popo
5656
*
5757
* @cssproperty [--arrow-size=6px] - The size of the arrow. Note that an arrow won't be shown unless the `arrow`
5858
* attribute is used.
59-
* @cssproperty [--arrow-border-width] - The width of any custom border applied to the arrow.
59+
* @cssproperty [--popup-border-width] - The width of any custom border applied to the popup. This is used to reposition
60+
* the arrow to overlap to the inside edge of the popup border.
6061
* @cssproperty [--arrow-color=black] - The color of the arrow.
6162
* @cssproperty [--auto-size-available-width] - A read-only custom property that determines the amount of width the
6263
* popup can be before overflowing. Useful for positioning child elements that need to overflow. This property is only

packages/webawesome/src/components/tooltip/tooltip.styles.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export default css`
5454
}
5555
5656
.tooltip {
57-
--arrow-border-width: var(--wa-tooltip-border-width);
57+
--popup-border-width: var(--wa-tooltip-border-width);
5858
5959
&::part(arrow) {
6060
border-bottom: var(--wa-tooltip-border-width) var(--wa-tooltip-border-style) var(--wa-tooltip-border-color);

0 commit comments

Comments
 (0)