Skip to content

Commit 89b1916

Browse files
committed
fix: Adjust padding in table cell and header components
Signed-off-by: ailkiv <a.ilkiv.ye@gmail.com>
1 parent be1b93f commit 89b1916

3 files changed

Lines changed: 7 additions & 3 deletions

File tree

src/css/prosemirror.scss

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -353,18 +353,16 @@ div.ProseMirror {
353353
border-left: 0;
354354
vertical-align: top;
355355
max-width: 100%;
356-
line-height: var(--default-clickable-area);
357356
&:first-child {
358357
border-left: 1px solid var(--table-color-border);
359358
}
360359
}
361360
td {
362-
padding: 0 0 0 0.75em;
363361
border-top: 0;
364362
color: var(--color-main-text);
365363
}
366364
th {
367-
padding: 0 0 0 0.75em;
365+
368366
font-weight: normal;
369367
border-bottom-color: var(--table-color-heading-border);
370368
color: var(--table-color-heading);

src/nodes/Table/TableCellView.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ td {
118118
.content {
119119
flex: 1 1 0;
120120
margin: 0;
121+
padding: calc((var(--default-clickable-area) - var(--default-font-size) * 1.5) / 2) 0.75em;
121122
}
122123
123124
.action-item {

src/nodes/Table/TableHeaderView.vue

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,12 +181,17 @@ export default {
181181
</script>
182182

183183
<style scoped lang="scss">
184+
div[contenteditable=true] th .content {
185+
padding-right: 0;
186+
}
184187
th {
185188
186189
.content {
187190
margin: 0;
188191
flex-grow: 1;
192+
padding: calc((var(--default-clickable-area) - var(--default-font-size) * 1.5) / 2) 0.75em;
189193
}
194+
190195
.action-item {
191196
opacity: 50%;
192197
}

0 commit comments

Comments
 (0)