0f5d96d1bbc81c8ce07120655df5cc6481a5e565
[editorial.git] / assets / main / sass / components / _section.scss
1 ///
2 /// Massively by HTML5 UP
3 /// html5up.net | @ajlkn
4 /// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
5 ///
6
7 /* Section/Article */
8
9 section, article {
10 &.special {
11 text-align: center;
12 }
13 }
14
15 header {
16 cursor: default;
17
18 > .date {
19 display: block;
20 font-size: 0.8rem;
21 height: 1;
22 margin: 0 0 (_size(element-margin) * 0.5) 0;
23 position: relative;
24 }
25
26 > p {
27 font-style: italic;
28 }
29
30 > h1 + p {
31 font-size: 1.1rem;
32 margin-top: -0.5rem;
33 line-height: 2;
34 }
35
36 > h2 + p {
37 font-size: 1rem;
38 margin-top: -0.75rem;
39 }
40
41 > h3 + p {
42 font-size: 0.9rem;
43 margin-top: -0.75rem;
44 }
45
46 > h4 + p {
47 font-size: 0.8rem;
48 margin-top: -0.75rem;
49 }
50
51 &.major {
52 margin: 0 0 (_size(element-margin) * 2) 0;
53 text-align: center;
54
55 > :last-child {
56 margin-bottom: 0;
57 }
58
59 > p {
60 margin-top: 0;
61 text-align: center;
62 }
63
64 > .date {
65 font-size: 1rem;
66 margin: 0 0 (_size(element-margin) * 2) 0;
67
68 &:before, &:after {
69 content: '';
70 display: block;
71 position: absolute;
72 top: 50%;
73 width: calc(50% - 6rem);
74 border-top: solid 2px;
75 }
76
77 &:before {
78 left: 0;
79 }
80
81 &:after {
82 right: 0;
83 }
84 }
85 }
86
87 @include breakpoint('<=medium') {
88 br {
89 display: none;
90 }
91 }
92
93 @include breakpoint('<=small') {
94 &.major {
95 margin: 0 0 _size(element-margin) 0;
96 }
97 }
98 }
99
100 @mixin color-section($p: null) {
101 header {
102 &.major {
103 .date {
104 &:before, &:after {
105 border-top-color: _palette($p, border);
106 }
107 }
108 }
109 }
110 }
111
112 @include color-section;