Skip to content

Commit

Permalink
fix(datagrid): align checkbox with text in datagrid (port of #1006) (#…
Browse files Browse the repository at this point in the history
…1011)

## 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?
Position of checkbox in data grid is not aligned with text.

![image](/~https://github.com/vmware-clarity/ng-clarity/assets/6692908/b876edd4-fed8-4804-ba8a-613296ed74af)

Issue Number: CDE-1350

## What is the new behavior?

Position of checkbox is centered with text's first line.

![image](/~https://github.com/vmware-clarity/ng-clarity/assets/6692908/e8e632ef-d186-4eb6-948d-8ab3c617fd11)

## Does this PR introduce a breaking change?

- [ ] Yes
- [x] 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
valentin-mladenov and web-flow authored Oct 19, 2023
1 parent cd3c84a commit a550051
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions projects/angular/src/data/datagrid/_datagrid.clarity.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1604,6 +1604,13 @@
}
}

.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: variables.$clr_baselineRem_1;
Expand Down
Binary file modified tests/snapshots/datagrid/row--variants-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/datagrid/row--variants-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.

0 comments on commit a550051

Please sign in to comment.