Welcome to mirror list, hosted at ThFree Co, Russian Federation.

_form-grid.scss « layout « sass « stylesheets « sass - github.com/zabbix/zabbix.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: dedda435665336fdd600e642756da18194e12bfa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
.form-grid {
	display: grid;
	padding: 5px;
	row-gap: 10px;
	column-gap: 10px;

	// 15% label column width for use in standalone forms.
	grid-template-columns: minmax(15%, max-content) auto;

	// True label column width for use in filter forms.
	&.label-width-true {
		grid-template-columns: max-content auto;
	}

	.fields-group {
		grid-column: 2 / -1;
		padding: 5px;
		border: 1px solid $form-fields-group-border-color;
	}

	> label {
		line-height: 24px;
		text-align: right;
		word-wrap: break-word;

		&.fields-group-label {
			padding-top: 5px;
		}
	}

	> .form-field,
	> .field-fluid,
	.form-actions {
		grid-column: 2 / -1;
		text-align: left;
		line-height: 24px;
	}

	.form-actions {
		button {
			&:not(:first-of-type) {
				margin-left: 10px;
			}
		}
	}

	.form-field {
		$offsets: (
				1: 2,
				2: 3,
				3: 4
		);

		@each $offset, $value in $offsets {
			// Dynamically generated classes:
			//  .offset-1
			//  .offset-2
			//  .offset-3
			&.offset-#{$offset} {
				grid-column-start: $value !important;
			}
		}

		table {
			width: 100%;

			&.table-initial-width {
				width: auto;
			}

			.sortable td {
				padding-bottom: 0;
				vertical-align: middle;
				line-height: 24px;
			}
		}

		th {
			padding: 0 5px 0 0;
			color: $font-alt-color;

			&:last-child {
				padding: 0;
			}
		}

		td {
			padding: 0 5px 5px 0;
		}

		.list-check-radio {
			line-height: $body-line-height;
		}
	}

	&.form-grid-1-1 {
		grid-template-columns: repeat(2, minmax(15%, max-content) auto);

		&.label-width-true {
			grid-template-columns: repeat(2, max-content auto);
		}
	}

	&.form-grid-3-1 {
		grid-template-columns: minmax(15%, max-content) 3fr max-content auto;

		&.label-width-true {
			grid-template-columns: max-content auto 3fr max-content auto;
		}
	}

	&.form-grid-1-1,
	&.form-grid-3-1 {
		.form-field:not(.field-fluid) {
			grid-column-start: initial;
			grid-column-end: span 1;
		}
	}

	.table-forms-separator {
		display: inline-flex;
		line-height: 1.4;

		td {
			padding: 5px 5px 5px 0;
		}
	}
}