UNPKG

5.62 kBtext/lessView Raw
1@import (reference) './imports/global';
2
3@aui-restfultable-row-focused-horizontal-border-width: 2px;
4@aui-restfultable-row-focused-border-color: var(--aui-restfultable-row-focused-border-color);
5@aui-restfultable-row-create-border: var(--aui-restfultable-row-create-border-color);
6@aui-restfultable-row-editable-hover-bg-color: var(--aui-restfultable-row-editable-hover-bg-color);
7@aui-restfultable-error-text-color: var(--aui-restfultable-error-text-color);
8@aui-restfultable-header-row-bg-color: var(--aui-restfultable-header-row-bg-color);
9@aui-restfultable-header-row-text-color: var(--aui-restfultable-header-row-text-color);
10@aui-restfultable-row-moving-bg-color: var(--aui-restfultable-row-moving-bg-color);
11@aui-restfultable-editable-em-text-color: var(--aui-restfultable-editable-em-text-color);
12@aui-restfultable-row-active-bg-color: var(--aui-restfultable-row-active-bg-color);
13@aui-restfultable-row-hover-bg-color: var(--aui-restfultable-row-hover-bg-color);
14
15/* ----- table loading styles ----- */
16.aui-restfultable-init {
17 text-align: center;
18 vertical-align: middle;
19 padding: 20px;
20}
21
22.aui-restfultable-init .aui-restfultable-loading {
23 display: flex;
24 justify-content: center;
25 aui-spinner {
26 margin-right: 8px;
27 }
28}
29
30/* ----- Some basics ----- */
31table.aui.aui-restfultable > thead > tr > th {
32 background-color: @aui-restfultable-header-row-bg-color;
33 color: @aui-restfultable-header-row-text-color;
34}
35
36.aui-restfultable .aui-restfultable-status {
37 width: 1px;
38 white-space: nowrap;
39}
40
41/* ----- Generic row - All states ----- */
42.aui-restfultable-row td {
43 vertical-align: top;
44}
45
46.aui-restfultable-row .aui-restfultable-order {
47 width: 8px;
48}
49
50.aui-restfultable-row .aui-restfultable-operations {
51 width: 160px;
52 white-space: nowrap;
53}
54
55.aui-restfultable-row .aui-restfultable-operations input.button,
56.aui-restfultable .aui-restfultable-row select {
57 margin-top: 2px;
58}
59
60.aui-restfultable .aui-restfultable-row input.text,
61.aui-restfultable .aui-restfultable-row select {
62 box-sizing: border-box;
63 margin: 0;
64 max-width: none;
65 width: 100%;
66}
67
68.aui-restfultable .aui-restfultable-order {
69 width: 8px;
70}
71
72.aui-restfultable .aui-restfultable-row .aui-restfultable-draghandle {
73 display: inline-block;
74 width: 8px;
75 min-height: 24px;
76 margin-bottom: -6px;
77 background-image: url('images/bg-grippy.png');
78 cursor: move;
79}
80
81/* ----- Create row ----- */
82.aui-restfultable-create td {
83 border: solid @aui-restfultable-row-create-border;
84 border-width: 1px 0;
85}
86
87.aui-restfultable .aui-restfultable-create .aui-restfultable-draghandle {
88 display: none;
89}
90
91/* ----- Focused row ----- */
92.aui-restfultable-focused:not(.aui-restfultable-disabled) {
93 border-color: @aui-restfultable-row-focused-border-color;
94 border-style: solid;
95 border-width: @aui-restfultable-row-focused-horizontal-border-width 0;
96}
97
98/* ----- Disabled row ----- */
99.aui-restfultable-row.aui-restfultable-disabled td {
100 opacity: 0.5;
101}
102
103/* ----- Readonly row ----- */
104
105/* https://ecosystem.atlassian.net/browse/AUI-1940
106 * Because the table cells have fractional widths in IE, which then rounds up/down at random when calling clientWidth
107 * which means the helper is too narrow to contain the children.
108 */
109.aui-restfultable-readonly.ui-sortable-helper {
110 white-space: nowrap;
111}
112
113.aui-restfultable-readonly.aui-restfultable-movable > div {
114 background-color: @aui-restfultable-row-moving-bg-color !important;
115 box-sizing: border-box;
116 display: table-cell;
117 height: 100%;
118 min-height: 40px; /* the average height of a row in a restful table. The actual height should be set on the container */
119 padding: 7px 10px;
120 vertical-align: middle;
121}
122
123.aui-restfultable-readonly > .aui-restfultable-movable {
124 height: 100%;
125}
126
127.aui-restfultable-readonly .aui-restfultable-editable-no-value .aui-restfultable-editable {
128 visibility: hidden;
129}
130
131.aui-restfultable-readonly .aui-restfultable-operations a {
132 visibility: visible;
133}
134
135.aui-restfultable-readonly .aui-restfultable-editable {
136 display: block;
137 box-sizing: border-box;
138 margin: 0;
139 padding: 3px 24px 2px 4px;
140 position: relative;
141}
142
143.aui-restfultable-readonly .aui-restfultable-editable .aui-iconfont-edit,
144.aui-restfultable-readonly .aui-restfultable-editable .icon-edit-sml {
145 margin: 0;
146 position: absolute;
147 right: 4px;
148 top: 4px;
149 visibility: hidden;
150}
151
152.aui-restfultable-allowhover td .aui-restfultable-editable .aui-iconfont-edit,
153.aui-restfultable-allowhover td .aui-restfultable-editable .icon-edit-sml {
154 visibility: hidden;
155}
156
157.aui-restfultable-allowhover .aui-restfultable-readonly td:hover .aui-restfultable-editable .aui-iconfont-edit,
158.aui-restfultable-allowhover .aui-restfultable-readonly td:hover .aui-restfultable-editable .icon-edit-sml {
159 visibility: visible;
160}
161
162.aui-restfultable-readonly .aui-restfultable-editable em {
163 color: @aui-restfultable-editable-em-text-color; // doubt this is still used
164}
165
166/* ----- Hover row ----- */
167.aui-restfultable-row.aui-restfultable-active {
168 background-color: @aui-restfultable-row-active-bg-color;
169}
170
171.aui-restfultable-allowhover tr:hover td {
172 background-color: @aui-restfultable-row-hover-bg-color;
173}
174
175.aui-restfultable-allowhover td:hover .aui-restfultable-editable {
176 visibility: visible;
177 background: @aui-restfultable-row-editable-hover-bg-color;
178 cursor: pointer;
179}
180
181/* ----- Validation ----- */
182.aui-restfultable .error {
183 clear: both;
184 color: @aui-restfultable-error-text-color;
185 display: block;
186 margin: 5px 0 0 0;
187}