|
1 | 1 | @use "../tokens" as *;
|
2 | 2 | @use "../functions" as *;
|
3 | 3 | @import "../mixins";
|
| 4 | +@import "../config"; |
4 | 5 |
|
5 | 6 | /**
|
6 |
| -This mixin is used in _richtext.scss component to style blockquotes. |
7 |
| -It could eventually be used for a standalone blockquote component. |
| 7 | +This mixin is also used in _richtext.scss component to style blockquotes. |
8 | 8 | **/
|
9 | 9 | @mixin blockquote {
|
10 |
| - blockquote { |
11 |
| - background-color: $color-ux-background-highlight; |
12 |
| - background-position: right top; |
13 |
| - background-repeat: no-repeat; |
14 |
| - background-size: px-to-rem(72px) px-to-rem(40px); |
15 |
| - display: block; |
16 |
| - font-family: var(--ilo-fonts-display); |
17 |
| - padding: spacing(19) 0 spacing(9) spacing(8); // check |
| 10 | + background-color: var(--ilo-color-blue-lighter); |
| 11 | + background-position: right top; |
| 12 | + background-repeat: no-repeat; |
| 13 | + background-size: px-to-rem(72px) px-to-rem(40px); |
| 14 | + display: block; |
| 15 | + font-family: var(--ilo-fonts-display); |
| 16 | + padding: spacing(19) 0 spacing(9) spacing(8); // check |
| 17 | + position: relative; |
| 18 | + width: fit-content; |
| 19 | + border-bottom: px-to-rem(3px) solid var(--ilo-color-gray-base); |
| 20 | + @include cornercut(72px, 40px); |
| 21 | + |
| 22 | + p { |
| 23 | + color: var(--ilo-color-purple); |
| 24 | + font-weight: 300; |
| 25 | + padding: 0 spacing(12) 0 0; |
18 | 26 | position: relative;
|
19 |
| - width: fit-content; |
20 |
| - @include cornercut(72px, 40px); |
| 27 | + @include font-styles("pull-quote-sm"); |
| 28 | + |
| 29 | + &:after { |
| 30 | + bottom: 0; |
| 31 | + content: ""; |
| 32 | + display: inline-block; |
| 33 | + height: px-to-rem(20px); |
| 34 | + position: absolute; |
| 35 | + right: 0; |
| 36 | + transform: scaleX(-1); |
| 37 | + width: px-to-rem(26.5px); |
| 38 | + @include icon("quote", var(--ilo-color-purple)); |
| 39 | + } |
| 40 | + } |
| 41 | + |
| 42 | + cite { |
| 43 | + color: var(--ilo-color-gray-accessible); |
| 44 | + font-weight: 400; |
| 45 | + // @include font-styles("pull-quote-cite"); |
| 46 | + font-size: var(--ilo-font-size-sm); |
| 47 | + line-height: 135%; |
| 48 | + letter-spacing: 0; |
| 49 | + font-style: normal; |
| 50 | + } |
| 51 | + |
| 52 | + &:before { |
| 53 | + content: ""; |
| 54 | + display: inline-block; |
| 55 | + height: px-to-rem(40px); |
| 56 | + left: 0; |
| 57 | + position: absolute; |
| 58 | + width: px-to-rem(53px); |
| 59 | + top: 0; |
| 60 | + @include icon("quote", var(--ilo-color-purple)); |
| 61 | + } |
| 62 | + |
| 63 | + @include breakpoint("md") { |
| 64 | + background-size: px-to-rem(86px) px-to-rem(48px); |
| 65 | + padding: spacing(16) 0 spacing(12) spacing(12); |
| 66 | + @include cornercut(86px, 48px); |
21 | 67 |
|
22 | 68 | p {
|
23 |
| - color: $color-font-blockquote; |
24 |
| - font-weight: 300; |
| 69 | + margin-bottom: spacing(6); |
25 | 70 | padding: 0 spacing(12) 0 0;
|
26 | 71 | position: relative;
|
27 |
| - @include font-styles("pull-quote-sm"); |
| 72 | + @include font-styles("pull-quote-lg"); |
28 | 73 |
|
29 | 74 | &:after {
|
30 |
| - bottom: 0; |
31 |
| - content: ""; |
32 |
| - display: inline-block; |
33 |
| - height: px-to-rem(20px); |
34 |
| - position: absolute; |
35 |
| - right: 0; |
36 |
| - transform: scaleX(-1); |
37 |
| - width: px-to-rem(26.5px); |
38 |
| - @include icon("quote", var(--ilo-color-purple)); |
| 75 | + height: px-to-rem(24px); |
| 76 | + width: px-to-rem(32px); |
39 | 77 | }
|
40 | 78 | }
|
41 | 79 |
|
42 |
| - cite { |
43 |
| - color: $color-font-cite; |
44 |
| - font-weight: 400; |
45 |
| - @include font-styles("pull-quote-cite"); |
46 |
| - } |
47 |
| - |
48 | 80 | &:before {
|
49 |
| - content: ""; |
50 |
| - display: inline-block; |
51 |
| - height: px-to-rem(40px); |
52 |
| - left: 0; |
53 |
| - position: absolute; |
54 |
| - width: px-to-rem(53px); |
55 |
| - top: 0; |
56 |
| - @include icon("quote", var(--ilo-color-purple)); |
57 |
| - } |
58 |
| - |
59 |
| - @include breakpoint("md") { |
60 |
| - background-size: px-to-rem(86px) px-to-rem(48px); |
61 |
| - padding: spacing(16) 0 spacing(12) spacing(12); |
62 |
| - @include cornercut(86px, 48px); |
63 |
| - |
64 |
| - p { |
65 |
| - margin-bottom: spacing(6); |
66 |
| - padding: 0 spacing(12) 0 0; |
67 |
| - position: relative; |
68 |
| - @include font-styles("pull-quote-lg"); |
69 |
| - |
70 |
| - &:after { |
71 |
| - height: px-to-rem(24px); |
72 |
| - width: px-to-rem(32px); |
73 |
| - } |
74 |
| - } |
75 |
| - |
76 |
| - &:before { |
77 |
| - height: px-to-rem(48px); |
78 |
| - width: px-to-rem(64px); |
79 |
| - } |
| 81 | + height: px-to-rem(48px); |
| 82 | + width: px-to-rem(64px); |
80 | 83 | }
|
| 84 | + } |
81 | 85 |
|
82 |
| - [dir="rtl"] & { |
83 |
| - background-position: -1px -1px; |
84 |
| - padding: spacing(14) spacing(8) spacing(9) 0; |
85 |
| - @include cornercut(72px, 40px, "left"); |
| 86 | + [dir="rtl"] & { |
| 87 | + background-position: -1px -1px; |
| 88 | + padding: spacing(14) spacing(8) spacing(9) 0; |
| 89 | + @include cornercut(72px, 40px, "left"); |
86 | 90 |
|
87 |
| - p { |
88 |
| - padding: 0 0 0 spacing(12); |
| 91 | + p { |
| 92 | + padding: 0 0 0 spacing(12); |
89 | 93 |
|
90 |
| - &:after { |
91 |
| - left: 0; |
92 |
| - right: auto; |
93 |
| - transform: scaleX(1); |
94 |
| - } |
| 94 | + &:after { |
| 95 | + left: 0; |
| 96 | + right: auto; |
| 97 | + transform: scaleX(1); |
95 | 98 | }
|
| 99 | + } |
96 | 100 |
|
97 |
| - &:before { |
98 |
| - left: auto; |
99 |
| - right: 0; |
100 |
| - transform: scaleX(-1); |
101 |
| - } |
| 101 | + &:before { |
| 102 | + left: auto; |
| 103 | + right: 0; |
| 104 | + transform: scaleX(-1); |
| 105 | + } |
102 | 106 |
|
103 |
| - @include breakpoint("md") { |
104 |
| - padding: spacing(15) spacing(12) spacing(12) 0; |
| 107 | + @include breakpoint("md") { |
| 108 | + padding: spacing(15) spacing(12) spacing(12) 0; |
105 | 109 |
|
106 |
| - @include cornercut(86px, 48px, "left"); |
107 |
| - } |
| 110 | + @include cornercut(86px, 48px, "left"); |
108 | 111 | }
|
109 | 112 | }
|
110 | 113 | }
|
| 114 | + |
| 115 | +.ilo--blockquote { |
| 116 | + @include blockquote; |
| 117 | +} |
0 commit comments