mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-17 06:16:59 +08:00
fix(editor): list toggle position offset (#10448)
Before:  After: <img width="579" alt="image" src="https://github.com/user-attachments/assets/7b049b53-269b-484e-ba76-fa6f46a2004c" /> This centering approach won't affect heading blocks: <img width="267" alt="image" src="https://github.com/user-attachments/assets/3f3217e3-7e23-43fc-a7e5-33b6eadccc88" />
This commit is contained in:
@@ -13,8 +13,11 @@ export class ToggleButton extends WithDisposable(ShadowlessElement) {
|
||||
.toggle-icon {
|
||||
display: flex;
|
||||
align-items: start;
|
||||
margin-top: 0.45em;
|
||||
justify-content: start;
|
||||
position: absolute;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
top: calc((1em - 16px) / 2 + 5px);
|
||||
left: 0;
|
||||
transform: translateX(-100%);
|
||||
border-radius: 4px;
|
||||
@@ -22,6 +25,7 @@ export class ToggleButton extends WithDisposable(ShadowlessElement) {
|
||||
opacity: 0;
|
||||
transition: opacity 0.2s ease-in-out;
|
||||
}
|
||||
|
||||
.toggle-icon:hover {
|
||||
background: var(--affine-hover-color);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user