Skip to content

Commit

Permalink
Add checkbox to site-editor pages by default
Browse files Browse the repository at this point in the history
  • Loading branch information
karthick-murugan committed Dec 12, 2024
1 parent 619fed3 commit 00d73bb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
4 changes: 1 addition & 3 deletions packages/dataviews/src/dataviews-layouts/grid/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -152,13 +152,11 @@

.dataviews-view-grid__card .dataviews-selection-checkbox {
position: absolute;
top: -9999em;
top: $grid-unit-10;
left: $grid-unit-10;
z-index: z-index(".dataviews-view-grid__card .dataviews-selection-checkbox");
}

.dataviews-view-grid__card:hover .dataviews-selection-checkbox,
.dataviews-view-grid__card:focus-within .dataviews-selection-checkbox,
.dataviews-view-grid__card.is-selected .dataviews-selection-checkbox {
top: $grid-unit-10;
}
Expand Down
8 changes: 3 additions & 5 deletions packages/dataviews/src/dataviews-layouts/table/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
}

.components-checkbox-control__input.components-checkbox-control__input {
opacity: 0;
opacity: 1;

&:checked,
&:indeterminate,
Expand All @@ -67,21 +67,19 @@
}

.dataviews-item-actions .components-button:not(.dataviews-all-actions-button) {
opacity: 0;
opacity: 1;
}

&:focus-within,
&.is-hovered,
&:hover {
.components-checkbox-control__input,
.dataviews-item-actions .components-button:not(.dataviews-all-actions-button) {
opacity: 1;
}
}

@media (hover: none) {
// Show checkboxes and quick-actions on devices that do not support hover.
.components-checkbox-control__input.components-checkbox-control__input,
// Show quick-actions on devices that do not support hover.
.dataviews-item-actions .components-button:not(.dataviews-all-actions-button) {
opacity: 1;
}
Expand Down

0 comments on commit 00d73bb

Please sign in to comment.