Skip to content

Commit a8efb1b

Browse files
committed
fix(grid-theme): column moving styles in multi-column headers
1 parent 81784d0 commit a8efb1b

File tree

1 file changed

+45
-41
lines changed

1 file changed

+45
-41
lines changed

projects/igniteui-angular/src/lib/core/styles/components/grid/_grid-theme.scss

Lines changed: 45 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,7 @@
425425
}
426426

427427
%grid-thead {
428+
position: relative;
428429
grid-row: 2;
429430
border-bottom: 1px dotted igx-color($palette, 'grays', 400);
430431
z-index: 2;
@@ -558,6 +559,7 @@
558559
}
559560

560561
%grid-cell-display {
562+
position: relative;
561563
display: flex;
562564
flex: 1 1 0%;
563565
align-items: center;
@@ -582,7 +584,9 @@
582584
}
583585

584586
%grid-cell--fixed-width {
587+
position: relative;
585588
flex-grow: 0;
589+
outline-style: none;
586590
}
587591

588592
%grid-cell--selected {
@@ -625,7 +629,7 @@
625629
min-width: 0;
626630
padding: map-get($grid-header-padding, 'comfortable');
627631
border-right: 1px dotted igx-color($palette, 'grays', 400);
628-
overflow: visible;
632+
outline-style: none;
629633
}
630634

631635
%grid-cell-header--cosy {
@@ -640,15 +644,22 @@
640644

641645
%grid-cell-header-title {
642646
@include ellipsis();
643-
display: inline-flex;
644-
align-items: center;
647+
min-width: 3ch;
645648
user-select: none;
646649
cursor: initial;
647650
flex-grow: 1; /* hey IE, the text should take most of the space */
648651
align-self: flex-end;
649652
line-height: map-get($grid-header-height, 'comfortable') / $grid-head-fs;
650653
}
651654

655+
%grid-cell-header-title--cosy {
656+
line-height: map-get($grid-header-height, 'cosy') / $grid-head-fs;
657+
}
658+
659+
%grid-cell-header-title--compact {
660+
line-height: map-get($grid-header-height, 'compact') / $grid-head-fs;
661+
}
662+
652663
%grid-cell-header-icons {
653664
display: inline-flex;
654665
align-items: center;
@@ -670,12 +681,10 @@
670681
}
671682
}
672683

673-
%grid-cell-header-title--cosy,
674684
%grid-cell-header-icons--cosy {
675685
height: map-get($grid-header-height, 'cosy');
676686
}
677687

678-
%grid-cell-header-title--compact,
679688
%grid-cell-header-icons--compact {
680689
height: map-get($grid-header-height, 'compact');
681690
}
@@ -751,22 +760,20 @@
751760

752761

753762
// Column moving
754-
755-
%igx-grid__th-drop-indicator-left {
763+
%igx-grid__th-drop-indicator-left,
764+
%igx-grid__th-drop-indicator-right {
756765
position: absolute;
757766
width: 1px;
758-
top: 0;
759-
left: -1px;
760767
height: 100%;
768+
top: 0;
761769
}
762770

771+
%igx-grid__th-drop-indicator-left {
772+
left: -1px;
773+
}
763774

764775
%igx-grid__th-drop-indicator-right {
765-
position: absolute;
766-
width: 1px;
767-
top: 0;
768776
right: -1px;
769-
height: 100%;
770777
}
771778

772779
%igx-grid__th-drop-indicator--active {
@@ -777,66 +784,65 @@
777784

778785
&::after,
779786
&::before {
780-
content: '';
781787
position: absolute;
788+
content: '';
782789
width: 0;
783790
height: 0;
784791
border-style: solid;
785-
left: -4.5px;
792+
left: -3px;
786793
}
787794

788795
&::before {
789796
bottom: 0;
790-
border-width: 0 5px 5px;
797+
border-width: 0 4px 4px;
791798
border-color: transparent transparent --var($theme, 'drop-indicator-color');
792799
}
793800

794801
&::after {
795802
top: 0;
796-
border-width: 5px 5px 0;
803+
border-width: 4px 4px 0;
797804
border-color: --var($theme, 'drop-indicator-color') transparent transparent;
798805
}
799806
}
800807

801-
%grid__scroll-on-drag-left {
808+
%grid__scroll-on-drag-left,
809+
%grid__scroll-on-drag-right {
802810
position: absolute;
803811
width: 15px;
804812
top: 0;
805-
left: 0;
806813
height: 100%;
807814
z-index: 25;
808815
}
809816

817+
%grid__scroll-on-drag-left {
818+
left: 0;
819+
}
820+
810821
%grid__scroll-on-drag-right {
811-
position: absolute;
812-
width: 15px;
813-
top: 0;
814822
right: 0;
815-
height: 100%;
816-
z-index: 25;
817823
}
818824

819825
%grid__scroll-on-drag-pinned {
820-
position: absolute;
821826
width: 15px;
822827
height: 100%;
823828
top: 0;
824829
z-index: 25;
825830
}
826831

827832
%grid__drag-ghost-image {
828-
background-color: --var($theme, 'ghost-header-background');
829-
color: --var($theme, 'ghost-header-text-color');
830833
position: absolute;
831-
z-index: 20;
834+
display: flex;
832835
align-items: center;
836+
background-color: --var($theme, 'ghost-header-background');
837+
color: --var($theme, 'ghost-header-text-color');
833838
height: map-get($grid-header-height, 'comfortable');
834839
min-height: map-get($grid-header-height, 'comfortable');
835840
top: -99999px;
836841
left: -99999px;
837-
overflow: visible;
838-
display: inline-flex;
842+
border: none;
839843
box-shadow: igx-elevation($elevations, 5);
844+
overflow: hidden;
845+
z-index: 20;
840846

841847
%grid-cell-header-title {
842848
min-width: calc(100% - 24px);
@@ -845,6 +851,10 @@
845851
%grid-cell-header-icons {
846852
display: none;
847853
}
854+
855+
%grid-thead-title {
856+
border: none;
857+
}
848858
}
849859

850860
%grid__drag-ghost-image--cosy {
@@ -859,19 +869,14 @@
859869

860870
%grid__drag-ghost-image-icon {
861871
color: --var($theme, 'ghost-header-icon-color');
862-
font-size: rem(24px);
863872
margin-right: rem(12px);
864-
padding-bottom: rem(12px);
865873
}
866874

867875
%grid__drag-ghost-image-icon-group {
868876
color: --var($theme, 'ghost-header-icon-color');
869-
font-size: rem(24px);
870-
margin-right: rem(12px);
871-
padding-top: rem(12px);
872-
padding-left: rem(12px);
877+
padding: --var($grid-header-padding, 'comfortable');
878+
padding-right: 0;
873879
margin-right: rem(8);
874-
width: rem(24px);
875880
}
876881

877882
%igx-grid__drag-col-header {
@@ -883,8 +888,7 @@
883888
}
884889
}
885890

886-
// Groupby section
887-
891+
// Group by section
888892
%igx-grid__group-row {
889893
background-color: --var($theme, 'group-row-background');
890894
display: flex;
@@ -1047,7 +1051,7 @@
10471051
flex-wrap: wrap;
10481052

10491053
&:focus {
1050-
outline: transparent;
1054+
outline-style: none;
10511055
}
10521056
}
10531057

@@ -1122,7 +1126,7 @@
11221126

11231127
&:hover,
11241128
&:focus {
1125-
outline: transparent;
1129+
outline-style: none;
11261130

11271131
%igx-icon-display {
11281132
color: --var($theme, 'expand-icon-hover-color');

0 commit comments

Comments
 (0)