Skip to content

Commit

Permalink
[base] Fix ChangeBar CSS
Browse files Browse the repository at this point in the history
  • Loading branch information
mariuslundgard authored and rexxars committed Oct 6, 2020
1 parent e09b66a commit 1079ae3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions packages/@sanity/base/src/change-indicators/ChangeBar.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@
opacity: 1;
transition: opacity 100ms;

@nest .root:not([data-changed]) {
@nest .root:not([data-changed]) > & {
opacity: 0;
pointer-events: none;
}
}

Expand All @@ -46,7 +47,7 @@
transform: translate3d(-0.5px, -10px, 0) scale(0, 1);
transition: transform 100ms;

@nest .root[data-hover] & {
@nest .root[data-hover] > .wrapper > & {
transform: translate3d(-0.5px, -10px, 0) scale(1);
}
}
Expand All @@ -71,7 +72,7 @@
.hitArea {
position: absolute;
left: calc(0 - var(--extra-small-padding));
width: calc(var(--extra-small-padding) + 2px + var(--medium-padding));
width: calc(var(--extra-small-padding) + var(--medium-padding));
height: 100%;
cursor: pointer;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/@sanity/base/src/change-indicators/ChangeBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export const ChangeBar = React.forwardRef(
>
<div className={styles.field}>{props.children}</div>

<Tooltip content={tooltipContent} placement="top">
<Tooltip content={tooltipContent} disabled={!props.isChanged} placement="top">
<div className={styles.wrapper}>
<div className={styles.bar} />

Expand Down

0 comments on commit 1079ae3

Please sign in to comment.