Skip to content

Commit aef715a

Browse files
committed
fix(regression): icon/bullet alignment
Introduced in 755840c
1 parent 5d229c2 commit aef715a

2 files changed

Lines changed: 10 additions & 40 deletions

File tree

src/main/frontend/components/block.cljs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2074,9 +2074,7 @@
20742074
:ignore-children? page-title?
20752075
:page-title? page-title?})
20762076
link? (boolean (:original-block config))
2077-
heading-level (when-not collapsed?
2078-
(block-heading-level block (:level config)))
2079-
icon-size (if collapsed? 12 (heading-icon-size heading-level))
2077+
icon-size (if collapsed? 12 14)
20802078
icon (icon-component/get-node-icon-cp block {:size icon-size :color? true :link? link?})
20812079
with-icon? (and (some? icon)
20822080
(or (and (db/page? block)

src/main/frontend/components/block.css

Lines changed: 9 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -575,15 +575,8 @@
575575

576576
.block-main-container {
577577
@apply min-h-[24px];
578-
--ls-heading-control-icon-size: 14px;
579578

580579
> .block-control-wrap.is-with-icon {
581-
.bullet-container {
582-
width: var(--ls-heading-control-icon-size);
583-
min-width: var(--ls-heading-control-icon-size);
584-
height: var(--ls-heading-control-icon-size);
585-
}
586-
587580
.icon-cp-container,
588581
.ls-icon-color-wrap,
589582
.ui__icon {
@@ -598,16 +591,9 @@
598591
display: block;
599592
line-height: 1;
600593
}
601-
602-
.ui__icon.ti svg {
603-
width: var(--ls-heading-control-icon-size);
604-
height: var(--ls-heading-control-icon-size);
605-
}
606594
}
607595

608596
&[data-has-heading="1"], &:has(textarea.h1) {
609-
--ls-heading-control-icon-size: 28px;
610-
611597
> .block-control-wrap {
612598
@apply relative top-4;
613599
}
@@ -620,8 +606,6 @@
620606
}
621607

622608
&[data-has-heading="2"], &:has(textarea.h2) {
623-
--ls-heading-control-icon-size: 24px;
624-
625609
> .block-control-wrap {
626610
@apply relative top-2.5;
627611
}
@@ -633,27 +617,6 @@
633617
}
634618
}
635619

636-
&[data-has-heading="3"], &:has(textarea.h3) {
637-
--ls-heading-control-icon-size: 20px;
638-
639-
.block-content-or-editor-wrap {
640-
.positioned-properties {
641-
@apply relative top-[2px];
642-
}
643-
}
644-
}
645-
646-
&[data-has-heading="4"], &:has(textarea.h4) {
647-
--ls-heading-control-icon-size: 16px;
648-
}
649-
650-
&[data-has-heading="5"], &:has(textarea.h5) {
651-
--ls-heading-control-icon-size: 13px;
652-
}
653-
654-
&[data-has-heading="6"], &:has(textarea.h6) {
655-
--ls-heading-control-icon-size: 12px;
656-
}
657620
}
658621

659622
.ls-page-title-container .block-content-wrapper {
@@ -770,6 +733,15 @@
770733
font-weight: 600;
771734
}
772735

736+
.editor-inner textarea.uniline-block:is(.h3, .h4, .h5, .h6) {
737+
line-height: 24px;
738+
min-height: 24px;
739+
}
740+
741+
.editor-inner textarea.uniline-block.h5 {
742+
height: 24px !important;
743+
}
744+
773745
.ls-block :is(h1, h2),
774746
.editor-inner .uniline-block:is(.h1, .h2) {
775747
@apply border-b border-gray-06 mt-1 mb-2 pb-1;

0 commit comments

Comments
 (0)