aboutsummaryrefslogtreecommitdiff
path: root/cydia/assets/sass/components/_panel-banner.scss
blob: 983ad3297ac71ed82b28b9291124f9251f0f9e7f (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
///
/// Ethereal by HTML5 UP
/// html5up.net | @ajlkn
/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
///

/* Panel (Banner) */

	$pad: _size(pad);
	$pad-small-tb: _size(pad-small-tb);
	$pad-small-lr: _size(pad-small-lr);

	.panel.banner {
		@include vendor('align-items', 'stretch');

		.content {
			@include padding($pad, $pad);
			@include vendor('display', 'flex');
			@include vendor('flex-direction', 'column');
			@include vendor('justify-content', 'center');
			@include vendor('flex-grow', '0');
			@include vendor('flex-shrink', '0');

			> .actions:last-child {
				margin-bottom: 0;
			}
		}

		.image {
			@include vendor('flex-grow', '0');
			@include vendor('flex-shrink', '0');
			position: relative;

			img {
				@include vendor('object-fit', 'cover');
				display: block;
				position: absolute;
				top: 0;
				left: 0;
				width: 100%;
				height: 100%;
			}
		}

		&.left {
			@include vendor('flex-direction', 'row');
		}

		&.right {
			@include vendor('flex-direction', 'row-reverse');
		}
	}

	@include breakpoint(small) {
		.panel.banner {
			.content {
				@include padding($pad-small-tb, $pad-small-lr);
				@include vendor('flex-basis', '60%');

				> .actions:last-child {
					margin-bottom: _size(element-margin);
				}
			}

			.image {
				@include vendor('flex-basis', '40%');
			}
		}

		@include orientation(portrait) {
			.panel.banner {
				.content {
					@include vendor('flex-basis', 'auto');
				}

				.image {
					@include vendor('flex-basis', 'auto');
					height: 18rem;
				}

				&.left {
					@include vendor('flex-direction', 'column');
				}

				&.right {
					@include vendor('flex-direction', 'column-reverse');
				}
			}
		}
	}