@herb-tools/dev-tools 0.8.5 → 0.8.7

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