Skip to content

Commit 01736b3

Browse files
Align DataGrid cells vertically to the center
1 parent bc63c33 commit 01736b3

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

styles/Grid.css

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -152,18 +152,30 @@
152152
border-right: var(--datagrid-cell-border-right);
153153
color: var(--datagrid-cell-color);
154154
font-weight: normal;
155-
padding: 14px 8px 0px 8px;
155+
padding: 8px;
156+
157+
&:not(.wj-colgroup):not(.wj-multiline) {
158+
align-content: center;
159+
}
160+
161+
&.wj-align-center.wj-colgroup {
162+
padding-top: 14px;
163+
}
164+
}
165+
166+
.wj-hasdropdown input.wj-grid-editor.wj-form-control {
167+
padding-right: 18px; /* to account for arrow width */
168+
}
169+
170+
.wj-cell.wj-hasdropdown.wj-align-left {
171+
display: block;
156172
}
157173

158174
.wj-flexgrid .wj-grid-editor,
159175
.wj-flexgrid .wj-cell.wj-hasdropdown .wj-btn.wj-btn-glyph.wj-right {
160176
height: auto;
161177
}
162178

163-
.wj-flexgrid .wj-cell.wj-hasdropdown input {
164-
width: 80%;
165-
}
166-
167179
.wj-flexgrid .wj-cell.wj-hasdropdown .wj-dropdown.wj-inputdate input {
168180
width: 100%;
169181
}

0 commit comments

Comments
 (0)