Skip to content

Commit

Permalink
add open props
Browse files Browse the repository at this point in the history
  • Loading branch information
argyleink committed Mar 31, 2024
1 parent 3bc134d commit 6838069
Show file tree
Hide file tree
Showing 5 changed files with 3,166 additions and 5,172 deletions.
2 changes: 1 addition & 1 deletion app/components/metatip/ally.element.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export class Ally extends Metatip {
: background

return `
<figure>
<figure visbug-ally>
<header>
<h5>&#60;${el.nodeName.toLowerCase()}&#62;${el.id && '#' + el.id}</h5>
</header>
Expand Down
9 changes: 8 additions & 1 deletion app/components/metatip/metatip.element.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@import "open-props/borders.shadow.min.css";
@import "../_variables.css";

:host {
Expand Down Expand Up @@ -127,7 +128,8 @@
border-radius: var(--border-radius);
border: 1px solid var(--theme-bg);
margin-bottom: 2px;
max-inline-size: max-content;
inline-size: max-content;
max-inline-size: max(35ch, 45vw);

background: var(--theme-bd);
backdrop-filter: blur(5px);
Expand All @@ -136,6 +138,11 @@
place-self: var(--is-flipped);
}

:host [visbug-ally] > header {
padding: .1ex 10px .25ex;
border-radius: var(--radius-round);
}

:host code {
display: grid;
grid-template-columns: max-content auto;
Expand Down
2 changes: 1 addition & 1 deletion app/components/selection/label.element.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export class Label extends HTMLElement {
const position = isFixed ? 'fixed' : 'absolute'
this.style.setProperty('--top', `${top}px`)
this.style.setProperty('--left', `${left}px`)
this.style.setProperty('--max-width', `${boundingRect.width + (window.innerWidth - boundingRect.x - boundingRect.width - 20)}px`)
this.style.setProperty('--max-width', `${boundingRect.width + (window.innerWidth - boundingRect.x - boundingRect.width - 40)}px`)
this.style.setProperty('--position', position)
this.setAttribute('data-original-top', top)
this.setAttribute('data-original-left', left)
Expand Down
Loading

0 comments on commit 6838069

Please sign in to comment.