@herb-tools/dev-tools 0.8.5 → 0.8.6

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.
@@ -1293,14 +1293,21 @@ class HerbOverlay {
1293
1293
  parent.style.outlineOffset = parent.tagName.toLowerCase() === 'html' ? '-2px' : '2px';
1294
1294
  parent.classList.add('show-outline');
1295
1295
  parent.setAttribute('data-herb-debug-attached-outline-type', type);
1296
- parent.style.position = 'relative';
1296
+ if (window.getComputedStyle(parent).position === 'static') {
1297
+ parent.style.position = 'relative';
1298
+ }
1297
1299
  label.style.position = 'absolute';
1298
1300
  label.style.top = '0';
1299
1301
  label.style.left = '0';
1300
1302
  parent.appendChild(label);
1301
1303
  return;
1302
1304
  }
1303
- element.style.position = 'relative';
1305
+ if (element.localName === 'html') {
1306
+ label.style.top = '0';
1307
+ }
1308
+ if (window.getComputedStyle(element).position === 'static') {
1309
+ element.style.position = 'relative';
1310
+ }
1304
1311
  element.appendChild(label);
1305
1312
  }
1306
1313
  removeOverlayLabel(element) {