@firecms/neat 0.9.1 → 0.9.2

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
@@ -2,7 +2,7 @@
2
2
  "name": "@firecms/neat",
3
3
  "description": "Beautiful 3D gradients for your website",
4
4
  "access": "public",
5
- "version": "0.9.1",
5
+ "version": "0.9.2",
6
6
  "main": "./dist/index.umd.js",
7
7
  "module": "./dist/index.es.js",
8
8
  "types": "dist/index.d.ts",
@@ -2140,7 +2140,12 @@ const setLinkStyles = (link: HTMLAnchorElement) => {
2140
2140
  }
2141
2141
 
2142
2142
  const addNeatLink = (ref: HTMLCanvasElement): HTMLAnchorElement => {
2143
- const parent = ref.parentElement;
2143
+ let parent = ref.parentElement;
2144
+ // Walk up past display:contents wrappers (e.g. Astro's <astro-island>)
2145
+ // to find the real box-generating parent for positioning the link
2146
+ while (parent && getComputedStyle(parent).display === "contents") {
2147
+ parent = parent.parentElement;
2148
+ }
2144
2149
  // Ensure parent has position so absolute link is positioned relative to it
2145
2150
  if (parent && getComputedStyle(parent).position === "static") {
2146
2151
  parent.style.position = "relative";