@coolon/angular-ui-powerups 16.1.0-alpha.344 → 16.1.0-alpha.345
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/table.scss +20 -10
- package/package.json +1 -1
package/assets/table.scss
CHANGED
|
@@ -101,8 +101,23 @@
|
|
|
101
101
|
padding: 0
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
-
// A row
|
|
105
|
-
|
|
104
|
+
// A body row paints two layers: its own colour, --aup-table-row-background, and over it the tint of hover or
|
|
105
|
+
// selection, --aup-table-row-tint. A row class colours its row by setting the first, so hover and selection
|
|
106
|
+
// still show on a coloured row: `tr.active { --aup-table-row-background: … }`. A class that paints its cells
|
|
107
|
+
// instead covers the tint, and the row stops answering hover and selection. A cell kept in view paints the same
|
|
108
|
+
// two layers itself (see below).
|
|
109
|
+
//
|
|
110
|
+
// Material gives each cell its row's background by inheritance, so the cells used to paint a translucent tint a
|
|
111
|
+
// second time over the row's: a plain row darkened twice as much as its tint said, and twice as much as its
|
|
112
|
+
// kept cell. The other cells now leave the row's background to the row.
|
|
113
|
+
tr.mat-mdc-row {
|
|
114
|
+
background: linear-gradient(var(--aup-table-row-tint, transparent), var(--aup-table-row-tint, transparent)),
|
|
115
|
+
var(--aup-table-row-background, transparent);
|
|
116
|
+
|
|
117
|
+
> td:not(.keep-in-view) {
|
|
118
|
+
background: none;
|
|
119
|
+
}
|
|
120
|
+
|
|
106
121
|
&.enable-hover:hover {
|
|
107
122
|
--aup-table-row-tint: var(--resolved-row-hover-background-color);
|
|
108
123
|
}
|
|
@@ -110,10 +125,6 @@
|
|
|
110
125
|
&.aup-row-selected, &.aup-row-selected.enable-hover:hover {
|
|
111
126
|
--aup-table-row-tint: var(--resolved-row-selected-background-color);
|
|
112
127
|
}
|
|
113
|
-
|
|
114
|
-
&.enable-hover:hover, &.aup-row-selected {
|
|
115
|
-
background-color: var(--aup-table-row-tint);
|
|
116
|
-
}
|
|
117
128
|
}
|
|
118
129
|
|
|
119
130
|
td.enable-cursor {
|
|
@@ -124,10 +135,8 @@
|
|
|
124
135
|
// it stays on screen however far the table scrolls sideways. The table body gives each kept cell its offsets
|
|
125
136
|
// (KeptColumnOffsets), so that kept columns stuck to the same edge sit side by side.
|
|
126
137
|
//
|
|
127
|
-
//
|
|
128
|
-
//
|
|
129
|
-
// over the table's own colour instead. A row class that colours its row through --aup-table-row-tint colours
|
|
130
|
-
// the kept cell too. One that sets its own background leaves the kept cell in the table's plain colour.
|
|
138
|
+
// A row's colour and tint can be translucent, so the columns scrolling under the cell would show through it. The
|
|
139
|
+
// cell paints the row's tint and colour itself, over the table's own colour.
|
|
131
140
|
td, th {
|
|
132
141
|
&.keep-in-view {
|
|
133
142
|
position: sticky;
|
|
@@ -135,6 +144,7 @@
|
|
|
135
144
|
right: var(--aup-keep-in-view-right, 0);
|
|
136
145
|
z-index: 1;
|
|
137
146
|
background: linear-gradient(var(--aup-table-row-tint, transparent), var(--aup-table-row-tint, transparent)),
|
|
147
|
+
linear-gradient(var(--aup-table-row-background, transparent), var(--aup-table-row-background, transparent)),
|
|
138
148
|
var(--mat-table-background-color);
|
|
139
149
|
container-type: scroll-state;
|
|
140
150
|
|