Skip to content

Commit

Permalink
fix(datagrid): align detail caret to top and remove unnecessary check…
Browse files Browse the repository at this point in the history
…box styles (#1357)

## PR Checklist

Please check if your PR fulfills the following requirements:

- [ ] Tests for the changes have been added (for bug fixes / features)
- [ ] Docs have been added / updated (for bug fixes / features)
- [ ] If applicable, have a visual design approval

## PR Type

What kind of change does this PR introduce?

<!-- Please check the one that applies to this PR using "x". -->

- [X] Bugfix
- [ ] Feature
- [ ] Code style update (formatting, local variables)
- [ ] Refactoring (no functional changes, no api changes)
- [ ] Build related changes
- [ ] CI related changes
- [ ] Documentation content changes
- [ ] Other... Please describe:

## What is the current behavior?
 
Detail caret is aligned to center

<!-- Please describe the current behavior that you are modifying, or
link to a relevant issue. -->

Issue Number: CDE-1897

## What is the new behavior?

Detail caret is aligned to top

## Does this PR introduce a breaking change?

- [ ] Yes
- [ ] No

<!-- If this PR contains a breaking change, please describe the impact
and migration path for existing applications below. -->

## Other information

---------

Co-authored-by: GitHub <noreply@github.com>
  • Loading branch information
dtsanevmw and web-flow authored Apr 15, 2024
1 parent 5986ec5 commit a48b4e7
Show file tree
Hide file tree
Showing 9 changed files with 2 additions and 23 deletions.
25 changes: 2 additions & 23 deletions projects/angular/src/data/datagrid/_datagrid.clarity.scss
Original file line number Diff line number Diff line change
Expand Up @@ -242,12 +242,7 @@
tokens.$cds-global-space-5 - tables-variables.$clr-table-borderwidth
); // This fixed an issue that made the cell too wide.
align-items: center;

.clr-checkbox-wrapper {
display: block;
// compensate for the default checkbox margin, defined in its ::before section
margin-top: calc(-1 * tokens.$cds-global-space-4);
}
padding: tokens.$cds-global-space-3 tokens.$cds-global-space-7;

&,
input {
Expand Down Expand Up @@ -854,21 +849,6 @@
z-index: map.get(variables.$clr-layers, datagrid-host); // Keeps the spinner above the datagrid header.
}

.datagrid-select {
.clr-control-label {
min-height: tokens.$cds-global-space-6;
margin-top: calc(-1 * tokens.$cds-global-space-3);
padding-left: tokens.$cds-global-space-7;
}
}

.datagrid-table > .datagrid-row .datagrid-select {
.clr-checkbox-wrapper input[type='checkbox'] + .clr-control-label::before,
.clr-checkbox-wrapper input[type='checkbox'] + .clr-control-label::after {
top: 50%;
}
}

.datagrid-compact {
.datagrid-header {
min-height: tokens.$cds-global-space-9;
Expand Down Expand Up @@ -1215,11 +1195,10 @@

.datagrid-detail-caret {
display: flex;
align-items: center;
justify-content: center;

&.datagrid-cell {
padding: 0;
padding: tokens.$cds-global-space-3 0;
}

.datagrid-detail-caret-button {
Expand Down
Binary file modified tests/snapshots/chromium/datagrid/detail--detail-core-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/snapshots/chromium/datagrid/detail--detail-core-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/snapshots/firefox/datagrid/detail--detail-core-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/snapshots/firefox/datagrid/detail--detail-core-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit a48b4e7

Please sign in to comment.