Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(styling): add CSS variable for .slick-cell optional flex #1490

Merged
merged 1 commit into from
Apr 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 16 additions & 10 deletions examples/vite-demo-vanilla-bundle/src/examples/example07.scss
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
#modal-allFilter-table {
display: table;
}
#modal-allFilter-table .row {
display: table-row;
}
#modal-allFilter-table .column {
display: table-cell;
vertical-align: top;
width: 40%;
:root {
.grid7 {
--slick-cell-display: flex;
}

#modal-allFilter-table {
display: table;
}
#modal-allFilter-table .row {
display: table-row;
}
#modal-allFilter-table .column {
display: table-cell;
vertical-align: top;
width: 40%;
}
}
3 changes: 2 additions & 1 deletion examples/vite-demo-vanilla-bundle/src/examples/example07.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ export default class Example07 {
{
id: 'action', name: 'Action', field: 'action', minWidth: 60, maxWidth: 60,
excludeFromExport: true, excludeFromHeaderMenu: true,
formatter: () => `<div class="button-style margin-auto action-btn"><span class="mdi mdi-chevron-down mdi-22px text-color-primary"></span></div>`,
cssClass: 'justify-center',
formatter: () => `<div class="button-style action-btn"><span class="mdi mdi-chevron-down mdi-22px text-color-primary"></span></div>`,
cellMenu: {
hideCloseButton: false,
subItemChevronClass: 'mdi mdi-chevron-down mdi-rotate-270',
Expand Down
3 changes: 2 additions & 1 deletion examples/vite-demo-vanilla-bundle/src/examples/example12.ts
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,8 @@ export default class Example12 {
{
id: 'action', name: 'Action', field: 'action', width: 70, minWidth: 70, maxWidth: 70,
excludeFromExport: true,
formatter: () => `<div class="button-style margin-auto action-btn"><span class="mdi mdi-dots-vertical mdi-22px text-color-primary"></span></div>`,
cssClass: 'justify-center flex',
formatter: () => `<div class="button-style action-btn"><span class="mdi mdi-dots-vertical mdi-22px text-color-primary"></span></div>`,
cellMenu: {
hideCloseButton: false,
commandTitle: 'Commands',
Expand Down
3 changes: 2 additions & 1 deletion examples/vite-demo-vanilla-bundle/src/examples/example14.ts
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,8 @@ export default class Example14 {
{
id: 'action', name: 'Action', field: 'action', width: 70, minWidth: 70, maxWidth: 70,
excludeFromExport: true,
formatter: () => `<div class="button-style margin-auto action-btn"><span class="mdi mdi-chevron-down mdi-22px text-color-primary"></span></div>`,
cssClass: 'justify-center flex',
formatter: () => `<div class="button-style action-btn"><span class="mdi mdi-chevron-down mdi-22px text-color-primary"></span></div>`,
cellMenu: {
hideCloseButton: false,
commandTitle: 'Commands',
Expand Down
3 changes: 2 additions & 1 deletion examples/vite-demo-vanilla-bundle/src/examples/example16.ts
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,8 @@ export default class Example16 {
},
{
id: 'action', name: 'Action', field: 'action', width: 70, minWidth: 70, maxWidth: 70,
formatter: () => `<div class="button-style margin-auto action-btn"><span class="mdi mdi-chevron-down mdi-22px text-color-primary"></span></div>`,
cssClass: 'justify-center flex',
formatter: () => `<div class="button-style action-btn"><span class="mdi mdi-chevron-down mdi-22px text-color-primary"></span></div>`,
excludeFromExport: true,
// customTooltip: {
// formatter: () => `Click to open Cell Menu`, // return empty so it won't show any pre-tooltip
Expand Down
9 changes: 9 additions & 0 deletions examples/vite-demo-vanilla-bundle/src/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -115,3 +115,12 @@ input.is-narrow {
.text-red {
color: red;
}
.flex {
display: flex !important;
}
.align-center {
align-items: center;
}
.justify-center {
justify-content: center;
}
1 change: 1 addition & 0 deletions packages/common/src/styles/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ $slick-cell-active-border: none !default;
$slick-cell-active-box-shadow: inset 0 0 0 1px #aaaaaa !default;
$slick-cell-active-z-index: 6 !default;
$slick-cell-box-shadow: none !default;
$slick-cell-display: block !default;
$slick-cell-text-color: #333 !default;
$slick-cell-font-family: $slick-font-family !default;
$slick-cell-font-weight: normal !default;
Expand Down
4 changes: 3 additions & 1 deletion packages/common/src/styles/slick-grid.scss
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,9 @@
.slick-cell {
box-sizing: border-box;
border-style: var(--slick-grid-border-style, $slick-grid-border-style);
padding: 1px 2px 1px 2px;
display: var(--slick-cell-display, $slick-cell-display);
padding: 1px 2px;
align-items: center;
}

.slick-header-column {
Expand Down
Loading