Doc compose Cc toggle: vertically center inside To field

Was `top: calc(50% + 4px)` which left the button 4px below the
true vertical center of the input — visibly misaligned. Dropped
the +4 offset so the toggle anchors at top:50% / translateY(-50%)
and tracks the input's center.

Also removed the redundant base rule's position:relative + top:2px
nudge — it was being overridden by the more-specific
.email-field .email-cc-toggle absolute positioning anyway.
This commit is contained in:
pewdiepie-archdaemon
2026-06-13 08:12:03 +09:00
parent a01ca5a0a1
commit 81a9a1fed3
+4 -11
View File
@@ -30103,16 +30103,13 @@ body.doc-find-active mark.doc-find-mark.current {
width: 100%;
}
}
/* Cc toggle and attach button are absolute so they don't steal width from the To input */
/* Cc toggle and attach button are absolute so they don't steal width
from the To input. Anchored to the input's vertical center so it
tracks the field height regardless of padding/border tweaks. */
.email-field .email-cc-toggle {
position: absolute; right: 6px; top: calc(50% + 4px); transform: translateY(-50%);
position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
z-index: 2;
}
@media (min-width: 769px) {
.email-field .email-cc-toggle {
top: calc(50% + 4px);
}
}
.email-field input { padding-right: 60px; }
.email-field #doc-email-cc, .email-field #doc-email-bcc, .email-field #doc-email-subject { padding-right: 8px; }
@@ -30345,10 +30342,6 @@ body.doc-find-active mark.doc-find-mark.current {
background: none; border: none; color: var(--fg);
opacity: 0.4; font-size: 11px; cursor: pointer;
padding: 4px 8px; font-family: inherit;
/* Nudge 2px down so the label baseline-aligns with the To: field
chips beside it. */
position: relative;
top: 2px;
}
.email-cc-toggle:hover {
opacity: 1;