@internetstiftelsen/styleguide 2.25.3 → 2.25.5-beta.0.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@internetstiftelsen/styleguide",
3
- "version": "2.25.3",
3
+ "version": "2.25.5-beta.0.1",
4
4
  "main": "dist/components.js",
5
5
  "ports": {
6
6
  "fractal": "3000"
@@ -12,6 +12,7 @@ html {
12
12
  color: $color-cyberspace;
13
13
  font-family: sans-serif;
14
14
  font-size: percentage(math.div($size-base, 16px));
15
+ font-variant-ligatures: no-common-ligatures;
15
16
  -ms-overflow-style: scrollbar;
16
17
  -webkit-text-size-adjust: 100%;
17
18
  -ms-text-size-adjust: 100%;
@@ -322,6 +322,53 @@
322
322
  }
323
323
  }
324
324
 
325
+ @include m(no-break) {
326
+ @include e(image) {
327
+ aspect-ratio: 1 / 1;
328
+ object-position: 100% 25%;
329
+
330
+ @include bp-up(sm-xs) {
331
+ aspect-ratio: 4 / 3;
332
+ }
333
+
334
+ @include bp-up(sm) {
335
+ aspect-ratio: 16 / 9;
336
+ }
337
+
338
+ @include bp-up(md) {
339
+ object-position: 50% 25%;
340
+ }
341
+ }
342
+
343
+ @include e(caption) {
344
+ position: absolute;
345
+ z-index: z_index(middlegroundImportant);
346
+ top: 0;
347
+ right: 0;
348
+ bottom: 0;
349
+ left: 0;
350
+ padding: rhythm(1);
351
+ background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, rgba($color-black, 0) 35%, rgba($color-black, 1) 100%);
352
+ text-shadow: $text-shadow;
353
+
354
+ @include bp-up(sm) {
355
+ padding: rhythm(2);
356
+ }
357
+
358
+ @include bp-up(md) {
359
+ padding: rhythm(4);
360
+ }
361
+ }
362
+
363
+ @include e(text) {
364
+ color: $color-snow;
365
+ }
366
+
367
+ @include e(link) {
368
+ color: $color-snow;
369
+ }
370
+ }
371
+
325
372
  // Hero without darkened caption
326
373
  @include m(clean) {
327
374
  @include e(caption) {
@@ -11,6 +11,7 @@ module.exports = {
11
11
  hero_image: '/assets/images/hero.jpg',
12
12
  has_link: true,
13
13
  has_pre_heading: false,
14
+ has_text: true,
14
15
  },
15
16
  variants: [
16
17
  {
@@ -127,6 +128,17 @@ module.exports = {
127
128
  has_buttons: false,
128
129
  }
129
130
  },
131
+ {
132
+ name: 'No breakpoint',
133
+ context: {
134
+ no_image_class: 'o-hero--no-break',
135
+ limited_width: false,
136
+ has_button: true,
137
+ has_tags: false,
138
+ has_link: false,
139
+ has_text: false,
140
+ }
141
+ },
130
142
  {
131
143
  name: 'Dynamic headline',
132
144
  status: 'wip',