@financial-times/o-teaser 6.3.0 → 6.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## [6.4.0](https://github.com/Financial-Times/origami/compare/o-teaser-v6.3.0...o-teaser-v6.4.0) (2024-04-03)
4
+
5
+
6
+ ### Features
7
+
8
+ * add post modifier to teaser ([f4e0ffe](https://github.com/Financial-Times/origami/commit/f4e0ffe8d9d3f78b974a9cce1d816e0e1e4243c9))
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * fix lint ([469b08b](https://github.com/Financial-Times/origami/commit/469b08b5338e99af1e3ac6648ff640b08a3096a1))
14
+
3
15
  ## [6.3.0](https://github.com/Financial-Times/origami/compare/o-teaser-v6.2.10...o-teaser-v6.3.0) (2024-03-18)
4
16
 
5
17
 
package/README.md CHANGED
@@ -130,6 +130,7 @@ Additional modifiers:
130
130
  - `stacked`: moves the image to the top of the teaser
131
131
  - `opinion`: changes the tag colour to blue
132
132
  - `live`: change background to red and position of elements to make the teaser stand out
133
+ - `post`: set liveblog post styles
133
134
 
134
135
  #### Large teasers
135
136
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@financial-times/o-teaser",
3
- "version": "6.3.0",
3
+ "version": "6.4.0",
4
4
  "description": "Provides styling for teaser elements, which contain information about an article and link through to it",
5
5
  "keywords": [
6
6
  "article",
@@ -20,6 +20,14 @@
20
20
  display: none;
21
21
  }
22
22
  }
23
+
24
+ &.o-teaser--post {
25
+ @include _oTeaserPost;
26
+ }
27
+
28
+ &.o-teaser--post.o-teaser--opinion{
29
+ @include _oTeaserPostOpinion;
30
+ }
23
31
  }
24
32
 
25
33
  /// Small teaser styles for a stacked image
@@ -53,3 +61,108 @@
53
61
  padding-right: inherit;
54
62
  }
55
63
  }
64
+
65
+
66
+
67
+ @mixin _oTeaserPost {
68
+ border-bottom: 0;
69
+ .o-teaser__meta {
70
+ margin-bottom: oSpacingByName('s2');
71
+ }
72
+ .o-teaser__tag-prefix {
73
+ @include oTypographySans($scale: 0, $weight: 'semibold');
74
+ color: oColorsByName('claret');
75
+ margin-right: oSpacingByName('s1');
76
+ }
77
+ .o-teaser__tag {
78
+ @include oTypographySans($scale: 0, $weight: 'regular');
79
+ color: oColorsByName('claret');
80
+ }
81
+ .o-teaser__standfirst {
82
+ display: none;
83
+ }
84
+ .o-teaser__image-placeholder {
85
+ width: 100%;
86
+ height: auto;
87
+ padding: 0 ;
88
+ display: flex;
89
+ img {
90
+ width: 100%;
91
+ }
92
+ }
93
+ .o-teaser__timestamp {
94
+ display: none;
95
+ }
96
+ .o-teaser__content {
97
+ background: oColorsByName('wheat');
98
+ padding: oSpacingByName('s3');
99
+ box-sizing: border-box;
100
+ a {
101
+ text-decoration: none;
102
+ }
103
+ }
104
+ .o-teaser__image-container {
105
+ a {
106
+ width: 100%;
107
+ }
108
+
109
+ background: oColorsByName('wheat');
110
+ display: flex;
111
+ flex: 1 0 50%;
112
+ width: 100%;
113
+ padding: 0;
114
+ }
115
+ .o-teaser__content {
116
+ flex: 1 0 50%;
117
+ }
118
+
119
+ .o-teaser__heading,
120
+ .o-teaser__heading a {
121
+ @include oTypographyDisplay($scale: 2, $weight: 'medium');
122
+ color: oColorsByName('black');
123
+ }
124
+
125
+ @include oGridRespondTo($until: S) {
126
+ flex-direction: column;
127
+ .o-teaser__image-container {
128
+ display: block;
129
+ width: 100%;
130
+ padding: 0;
131
+ }
132
+ }
133
+ }
134
+
135
+ @mixin _oTeaserPostOpinion {
136
+ @include _oTeaserPost;
137
+ .o-teaser__content {
138
+ background: oColorsByName('sky');
139
+ }
140
+ .o-teaser__heading:before {
141
+ @include oIconsContent(
142
+ 'speech-left',
143
+ oColorsByName('oxford'),
144
+ 30,
145
+ $iconset-version: 1
146
+ );
147
+ content: '';
148
+ height: 13px;
149
+ position: relative;
150
+ background-size: cover;
151
+ margin-left: -5px;
152
+ }
153
+ .o-teaser__tag {
154
+ color: oColorsByName('oxford');
155
+ }
156
+ .o-teaser__tag-prefix {
157
+ color: oColorsByName('oxford');
158
+ }
159
+
160
+ @include oGridRespondTo($until: S) {
161
+ flex-direction: column;
162
+ .o-teaser__image-container {
163
+ display: block;
164
+ width: 100%;
165
+ padding: 0;
166
+ }
167
+ }
168
+ }