forked from canonical/vanilla-framework
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_patterns_pull-quotes.scss
118 lines (95 loc) · 2.01 KB
/
_patterns_pull-quotes.scss
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
@import 'settings';
@mixin vf-quote-mark {
color: $colors--theme--text-muted;
display: inline-block;
position: absolute;
width: 0.5em;
}
@mixin vf-pull-quote {
border: 0;
margin: $spv--x-large 0 $spv--x-large;
overflow: visible;
position: relative;
&.has-image {
margin-top: 0;
}
}
// Pull quote styling
@mixin vf-p-pull-quotes {
.p-pull-quote,
.p-pull-quote--small,
.p-pull-quote--large {
@include vf-pull-quote;
// this needs to be nested to increase the specificity
.p-pull-quote__citation {
@extend %vf-heading-6;
display: block;
margin-top: $spv--small;
}
}
.p-pull-quote__image {
height: $sp-x-large;
margin: $spv--large 0 $spv--small;
}
.p-pull-quote__quote {
position: relative;
&:first-of-type::before {
@include vf-quote-mark;
content: '\201C'; // Unicode for left double quotation mark + 1/2 em space
left: -0.75em;
text-align: right;
top: 0.5rem;
}
&:last-of-type {
margin-bottom: 0;
}
&:last-of-type::after {
@include vf-quote-mark;
bottom: 0.55em;
content: '\201E';
margin-left: 0.25em;
}
}
.p-pull-quote {
padding: 0 2rem;
.p-pull-quote__quote {
@extend %vf-heading-4;
&::before,
&::after {
font-size: 2em;
}
}
}
.p-pull-quote--small {
padding: 0 1.5rem;
.p-pull-quote__quote {
@extend %default-text;
&::before,
&::after {
font-size: 1.5em;
}
}
}
.p-pull-quote--large {
padding: 0 2.5rem;
.p-pull-quote__quote {
@extend %vf-heading-3;
&::before,
&::after {
font-size: 2em;
max-width: 1em;
}
}
}
// align the opening quote with the increased top padding of %vf-heading-3 / %vf-heading-4
.p-pull-quote,
.p-pull-quote--large {
.p-pull-quote__quote {
&:first-of-type::before {
@media (width < $breakpoint-heading-threshold) {
top: 0.75rem;
}
}
}
}
}