summaryrefslogtreecommitdiff
path: root/website/static/sass/components/_section.scss
blob: 849297d1c27fb630f2f5b730cf427f8ed82f13a8 (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
///
/// Stellar by HTML5 UP
/// html5up.net | @ajlkn
/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
///

/* Section/Article */

	section, article {
		&.special {
			text-align: center;
		}
	}

	header {
		&.major {
			margin-bottom: (_size(element-margin) * 1.5);

			h2 {
				font-size: 2em;

				&:after {
					display: block;
					content: '';
					width: 3.25em;
					height: 2px;
					margin: (_size(element-margin) * 0.35) 0 (_size(element-margin) * 0.5) 0;
					border-radius: 2px;

					section.special &, article.special & {
						margin-left: auto;
						margin-right: auto;
					}
				}
			}

			p {
				font-size: 1.25em;
				letter-spacing: _font(letter-spacing);
			}

			&.special {
				text-align: center;

				h2 {
					&:after {
						margin-left: auto;
						margin-right: auto;
					}
				}
			}
		}
	}

	footer {
		&.major {
			margin-top: (_size(element-margin) * 1.5);
		}
	}

	@include breakpoint(small) {
		header {
			&.major {
				margin-bottom: 0;

				h2 {
					font-size: 1.5em;
				}

				p {
					font-size: 1em;
					letter-spacing: 0;

					br {
						display: none;
					}
				}
			}
		}

		footer {
			&.major {
				margin-top: 0;
			}
		}
	}

	@mixin color-section($p: null) {
		header {
			&.major {
				h2 {
					&:after {
						background-color: _palette($p, border);

						@if $p == 'invert' {
							@include vendor('background-image', 'linear-gradient(90deg, #{_palette(accent1)}, #{_palette(accent3)}, #{_palette(accent5)})');
						}
					}
				}
			}
		}
	}

	@include color-section;