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 {
|
.toggle-icon {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: start;
|
align-items: start;
|
||||||
margin-top: 0.45em;
|
justify-content: start;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
width: 16px;
|
||||||
|
height: 16px;
|
||||||
|
top: calc((1em - 16px) / 2 + 5px);
|
||||||
left: 0;
|
left: 0;
|
||||||
transform: translateX(-100%);
|
transform: translateX(-100%);
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
@@ -22,6 +25,7 @@ export class ToggleButton extends WithDisposable(ShadowlessElement) {
|
|||||||
opacity: 0;
|
opacity: 0;
|
||||||
transition: opacity 0.2s ease-in-out;
|
transition: opacity 0.2s ease-in-out;
|
||||||
}
|
}
|
||||||
|
|
||||||
.toggle-icon:hover {
|
.toggle-icon:hover {
|
||||||
background: var(--affine-hover-color);
|
background: var(--affine-hover-color);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user