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

_columns-wrapper.scss « components « sass « stylesheets « sass - github.com/zabbix/zabbix.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 3f10c77bf29627bcaed5448de222de6e6603b1b6 (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
.columns-wrapper {
	$column-count: (2, 3);
	$column-size: (
			5: 5%,
			10: 10%,
			15: 15%,
			20: 20%,
			33: 33.33333%,
			35: 35%,
			40: 40%,
			50: 50%,
			75: 75%,
			90: 90%,
			95: 95%
	);

	display: flex;
	flex-wrap: wrap;
	align-items: start;

	&.columns-nowrap {
		flex-wrap: nowrap;
	}

	// Dynamically generated classes for the columns count:
	//  .columns-2
	//  .columns-3
	@each $count in $column-count {
		&.columns-#{$count} > {
			div,
			li {
				display: block;
				flex: 0 0 (100% / $count);
				max-width: (100% / $count);
			}
		}
	}

	// Dynamically generated classes for the column width:
	//  .column-5
	//  .column-10
	//  .column-15
	//  .column-20
	//  .column-33
	//  .column-35
	//  .column-40
	//  .column-50
	//  .column-75
	//  .column-90
	//  .column-95
	@each $class, $width in $column-size {
		.column-#{$class} {
			flex: 0 0 $width;
			max-width: $width;
		}
	}

	.column-center {
		display: flex;
		justify-content: center;
		text-align: center;
	}

	.column-middle {
		display: flex;
		align-items: center;
	}

	& > {
		div,
		ul {
			&:not(:last-child) {
				section {
					margin-right: 10px;
				}
			}
		}
	}
}