bitstyles 0.8.0 → 0.9.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (104) hide show
  1. checksums.yaml +4 -4
  2. data/.github/PULL_REQUEST_TEMPLATE.md +6 -10
  3. data/.nvmrc +1 -1
  4. data/.stylelintrc +1 -164
  5. data/.travis.yml +19 -0
  6. data/README.md +66 -33
  7. data/bitstyles.gemspec +1 -1
  8. data/lib/bitstyles/version.rb +1 -1
  9. data/package.json +21 -17
  10. data/scss/bitstyles.scss +53 -45
  11. data/scss/bitstyles/base/_all.scss +7 -0
  12. data/scss/bitstyles/base/_figure.scss +1 -1
  13. data/scss/bitstyles/base/_forms.scss +31 -26
  14. data/scss/bitstyles/base/_hr.scss +1 -1
  15. data/scss/bitstyles/base/_images.scss +1 -1
  16. data/scss/bitstyles/base/_link.scss +2 -14
  17. data/scss/bitstyles/base/_media.scss +2 -2
  18. data/scss/bitstyles/base/_typography.scss +37 -89
  19. data/scss/bitstyles/components/_expander.scss +8 -5
  20. data/scss/bitstyles/components/_modal.scss +41 -26
  21. data/scss/bitstyles/generic/_all.scss +2 -0
  22. data/scss/bitstyles/layout/_content.scss +7 -3
  23. data/scss/bitstyles/layout/_grid.scss +46 -23
  24. data/scss/bitstyles/layout/_topbar.scss +19 -4
  25. data/scss/bitstyles/layout/_width.scss +18 -11
  26. data/scss/bitstyles/objects/_absolute-center.scss +8 -2
  27. data/scss/bitstyles/objects/_absolute-cover.scss +11 -2
  28. data/scss/bitstyles/objects/_block.scss +5 -2
  29. data/scss/bitstyles/objects/_bordered-header.scss +8 -3
  30. data/scss/bitstyles/objects/_break-long-words.scss +6 -3
  31. data/scss/bitstyles/objects/_button--icon.scss +8 -4
  32. data/scss/bitstyles/objects/_button.scss +22 -13
  33. data/scss/bitstyles/objects/_clearfix.scss +7 -4
  34. data/scss/bitstyles/objects/_fixed-ratio.scss +24 -9
  35. data/scss/bitstyles/objects/_flex.scss +12 -8
  36. data/scss/bitstyles/objects/_hidden.scss +10 -7
  37. data/scss/bitstyles/objects/_icon.scss +19 -11
  38. data/scss/bitstyles/objects/_input.scss +16 -9
  39. data/scss/bitstyles/objects/_label.scss +2 -2
  40. data/scss/bitstyles/objects/_link.scss +18 -15
  41. data/scss/bitstyles/objects/_list-inline.scss +26 -0
  42. data/scss/bitstyles/objects/_list-reset.scss +5 -3
  43. data/scss/bitstyles/objects/_media.scss +9 -2
  44. data/scss/bitstyles/objects/_object-cover.scss +20 -0
  45. data/scss/bitstyles/objects/_overflow.scss +20 -0
  46. data/scss/bitstyles/objects/_truncate-with-ellipsis.scss +4 -3
  47. data/scss/bitstyles/objects/_typography.scss +8 -62
  48. data/scss/bitstyles/objects/_vertical-center.scss +5 -2
  49. data/scss/bitstyles/objects/_visuallyhidden.scss +10 -6
  50. data/scss/bitstyles/settings/_button.scss +1 -1
  51. data/scss/bitstyles/settings/_content.scss +2 -3
  52. data/scss/bitstyles/settings/_fixed-ratio.scss +3 -0
  53. data/scss/bitstyles/settings/_global.breakpoints.scss +5 -5
  54. data/scss/bitstyles/settings/_global.color-palette.scss +47 -0
  55. data/scss/bitstyles/settings/_global.layout.scss +7 -5
  56. data/scss/bitstyles/settings/_global.typography.scss +25 -17
  57. data/scss/bitstyles/settings/_grid.scss +1 -1
  58. data/scss/bitstyles/settings/_hidden.scss +1 -1
  59. data/scss/bitstyles/settings/_icon.scss +3 -3
  60. data/scss/bitstyles/settings/_input.scss +4 -4
  61. data/scss/bitstyles/settings/_link.scss +4 -0
  62. data/scss/bitstyles/settings/_modal.scss +2 -1
  63. data/scss/bitstyles/settings/_topbar.scss +4 -2
  64. data/scss/bitstyles/settings/_visuallyhidden.scss +1 -1
  65. data/scss/bitstyles/settings/_width.scss +1 -1
  66. data/scss/bitstyles/tools/_absolute-center.scss +8 -3
  67. data/scss/bitstyles/tools/_absolute-cover.scss +8 -2
  68. data/scss/bitstyles/tools/_all.scss +23 -0
  69. data/scss/bitstyles/tools/_block.scss +5 -2
  70. data/scss/bitstyles/tools/_break-long-words.scss +6 -2
  71. data/scss/bitstyles/tools/_clearfix.scss +7 -2
  72. data/scss/bitstyles/tools/_fixed-ratio.scss +41 -4
  73. data/scss/bitstyles/tools/_flex.scss +7 -3
  74. data/scss/bitstyles/tools/_font-face.scss +11 -2
  75. data/scss/bitstyles/tools/_hidden.scss +5 -2
  76. data/scss/bitstyles/tools/_link.scss +25 -0
  77. data/scss/bitstyles/tools/_list-reset.scss +7 -3
  78. data/scss/bitstyles/tools/_media-query.scss +14 -7
  79. data/scss/bitstyles/tools/_media.scss +10 -3
  80. data/scss/bitstyles/tools/_overflow.scss +19 -0
  81. data/scss/bitstyles/tools/_palette.scss +28 -0
  82. data/scss/bitstyles/tools/_spacing.scss +22 -0
  83. data/scss/bitstyles/tools/_truncate-with-ellipsis.scss +7 -3
  84. data/scss/bitstyles/tools/_typography-conversions.scss +20 -7
  85. data/scss/bitstyles/tools/_typography.scss +124 -5
  86. data/scss/bitstyles/tools/_vertical-center.scss +5 -2
  87. data/scss/bitstyles/tools/_visuallyhidden.scss +9 -6
  88. data/scss/bitstyles/tools/_width.scss +10 -1
  89. data/scss/bitstyles/tools/_zindex.scss +34 -14
  90. data/scss/bitstyles/trumps/_background-color.scss +8 -3
  91. data/scss/bitstyles/trumps/_color.scss +8 -3
  92. data/scss/bitstyles/trumps/_margin.scss +5 -5
  93. data/scss/bitstyles/trumps/_no-margin.scss +5 -5
  94. data/scss/bitstyles/trumps/_no-padding.scss +5 -5
  95. data/scss/bitstyles/trumps/_padding.scss +5 -5
  96. data/scss/bitstyles/trumps/_text-align.scss +3 -4
  97. data/scss/bitstyles/trumps/_text-style.scss +4 -2
  98. data/scss/bitstyles/trumps/_text-weight.scss +6 -3
  99. data/yarn.lock +6511 -0
  100. metadata +16 -14
  101. data/build/.gitignore +0 -4
  102. data/scripts/styleguide.sh +0 -16
  103. data/scss/bitstyles/objects/_expander.scss +0 -45
  104. data/scss/bitstyles/settings/_global.color-theme.scss +0 -11
@@ -2,9 +2,12 @@
2
2
  //
3
3
  // Clearfix
4
4
  //
5
- // Force an element to behave as if its floated children have been `clear: both`ed.
6
- // The element will therefore be of the correct height (including backgrounds etc.)
7
- // and will be separated from other content (as cleared elements are).
5
+ // **Cleanup after `float`ed elements**.
6
+ //
7
+ // Force an element to behave as if its floated children have an element after them
8
+ // with `clear: both`. The element will therefore be of the correct height (including
9
+ // backgrounds etc.) instead of collapsing on the floated children, and will be correctly separated
10
+ // from the following content, as cleared elements are.
8
11
  //
9
12
  // markup:
10
13
  // <div class="o-clearfix background-grey">
@@ -12,7 +15,7 @@
12
15
  // <div class="floated-element">Content goes here</div>
13
16
  // </div>
14
17
  //
15
- // Styleguide 1.7
18
+ // Styleguide 4.8
16
19
 
17
20
  .#{$bitstyles-namespace}o-clearfix {
18
21
  @include clearfix;
@@ -2,20 +2,35 @@
2
2
  //
3
3
  // Fixed-ratio
4
4
  //
5
- // Enforces an aspect ratio on this element anbd its contents. Default ratio is 16:9, element take 100% width and height matches.
5
+ // **Enforces an aspect ratio on this element and its contents**.
6
+ //
7
+ // The element takes 100% width, then the height is set to the keep the element
8
+ // at the specified ratio. Default ratio is defined as 16:9 in the Sass map
9
+ // `$fixed-ratio-default-ratio` under the keys `width` and `height` e.g.
10
+ // `$fixed-ratio-default-ratio: ('width': 10, 'height': 20)`
6
11
  //
7
12
  // markup:
8
- // <figure>
9
- // <div class="o-fixed-ratio">
10
- // <img class="o-fixed-ratio__inner" src="assets/images/placeholder_16-9.png">
11
- // </div>
12
- // <figcaption>An image at 16:9 aspect ratio</figcaption>
13
- // </figure>
13
+ // <div class="o-fixed-ratio">
14
+ // <img class="o-fixed-ratio__inner" src="assets/images/placeholder_16-9.png">
15
+ // </div>
16
+ //
17
+ // sg-wrapper:
18
+ // <div class="object-section">
19
+ // <figure>
20
+ // <sg-wrapper-content/>
21
+ // <figcaption>An image at 16:9 aspect ratio</figcaption>
22
+ // </figure>
23
+ // </div>
14
24
  //
15
- // Styleguide 1.18
25
+ // Styleguide 4.9
26
+
27
+ @import '../settings/fixed-ratio';
16
28
 
17
29
  .#{$bitstyles-namespace}o-fixed-ratio {
18
- @include fixed-ratio;
30
+ @include fixed-ratio(
31
+ map-get($fixed-ratio-default-ratio, 'width'),
32
+ map-get($fixed-ratio-default-ratio, 'height')
33
+ );
19
34
  }
20
35
 
21
36
  .#{$bitstyles-namespace}o-fixed-ratio__inner {
@@ -2,18 +2,22 @@
2
2
  //
3
3
  // Flex
4
4
  //
5
- // Simple flex layout.
6
- // Make one of the children `.o-flex__primary` to make it take as much space as is available.
5
+ // **Basic flex layout**.
6
+ //
7
+ // Apply to an element to simply make its children share the available width e.g.
8
+ // a list of links in a menu.
9
+ // Make one of the children `.o-flex__primary` to make it take as much space as is
10
+ // available i.e. all the horizontal space left after its siblings take the minimum width they need.
7
11
  //
8
12
  // markup:
9
- // <ul class="o-flex">
10
- // <li>Some content here</li>
11
- // <li class="o-flex__primary">Some more important content here</li>
12
- // <li>Some content here</li>
13
- // <li>Some content here</li>
13
+ // <ul class="o-flex o-list-reset">
14
+ // <li>List item one</li>
15
+ // <li class="o-flex__primary">Important content here</li>
16
+ // <li>List item three</li>
17
+ // <li>List item four</li>
14
18
  // </ul>
15
19
  //
16
- // Styleguide 1.10
20
+ // Styleguide 4.10
17
21
 
18
22
  .#{$bitstyles-namespace}o-flex {
19
23
  @include flex;
@@ -2,12 +2,15 @@
2
2
  //
3
3
  // Hidden
4
4
  //
5
- // Fully hides an element & its children does not affect document flow, does not get read by google or screenreaders.
6
- // Available at every breakpoint defined in `$hidden-breakpoints`.
5
+ // **Hidden from everyoneyou, search engines, screenreaders…**
7
6
  //
8
- // .o-hidden - Hide this element always (generally so it can be revealed using JS)
9
- // .o-hidden@small - Hide this content on smallscreens
10
- // .o-hidden@large - Hide this content on larger screens
7
+ // Fully hides an element & its children it will be taken out of the document
8
+ // flow, and will therefore not be read by google or screenreaders. Available at
9
+ // every breakpoint defined in `$bitstyles-hidden-breakpoints`.
10
+ //
11
+ // .o-hidden - Hide this element always (generally so it can be revealed using JS)
12
+ // .o-hidden@small-only - Hide this content on smallscreens
13
+ // .o-hidden@large - Hide this content on larger screens
11
14
  //
12
15
  // markup:
13
16
  // <p>Paragraph 1 content</p>
@@ -16,7 +19,7 @@
16
19
  // <p class="{$modifiers}">Paragraph 4 content</p>
17
20
  // <p>Paragraph 5 content</p>
18
21
  //
19
- // Styleguide 1.13
22
+ // Styleguide 4.11
20
23
 
21
24
  @import '../settings/hidden';
22
25
 
@@ -24,7 +27,7 @@
24
27
  @include hidden;
25
28
  }
26
29
 
27
- @each $breakpoint in $hidden-breakpoints {
30
+ @each $breakpoint in $bitstyles-hidden-breakpoints {
28
31
  @include media-query($breakpoint) {
29
32
  .#{$bitstyles-namespace}o-hidden\@#{$breakpoint} {
30
33
  @include hidden;
@@ -2,9 +2,20 @@
2
2
  //
3
3
  // Icons
4
4
  //
5
- // We use an svg-based icon system. All icons are present as symbols within `icons.svg`, and are used by embedding svg tags (see example markup).
6
- // Provide a `<title>` element at the point an icon is used to ensure there is some text content (equivalent to the alt property on `<img>`s.)
7
- // Set icon sizes by overiding the `$bitstyles-icon-sizes` map (see settings file). Default icon size is the same as surrounding text i.e. `1em`.
5
+ // **SVG icon system**.
6
+ //
7
+ // All icons are present as symbols within
8
+ // `icons.svg`, and are used by embedding svg tags (see example markup).
9
+ // Icons should be accompanied by some machine-readable text for accessibility &
10
+ // SEO purposes. If there is to be no such text (e.g. based on design mockups),
11
+ // provide an alternative:
12
+ // - provide a `<title>` element containing text, next to the `<use>` element
13
+ // - Next to the `<svg>` element place a `<span class="o-visuallyhidden">` containing descriptive text
14
+ //
15
+ // Set icon sizes by overiding the `$bitstyles-icon-sizes` list (see `settings/_icon.scss`) e.g.
16
+ // ``$bitstyles-icon-sizes: ('small' 2rem, 'medium' 4rem, 'large' 8rem);`
17
+ //
18
+ // The base icon size is the same as surrounding text i.e. `1em`.
8
19
  //
9
20
  // markup:
10
21
  // <svg class="o-icon {$modifiers}">
@@ -12,12 +23,12 @@
12
23
  // <use xlink:href="assets/images/icons.svg#icon-twitter"></use>
13
24
  // </svg>
14
25
  //
15
- // default - Base size, matches font-size of parent element.
26
+ // - Base size, matches font-size of parent element.
16
27
  // .o-icon--small - Small icon (given default vars).
17
28
  // .o-icon--medium - Medium icon (given default vars).
18
29
  // .o-icon--large - Large icon (given default vars).
19
30
  //
20
- // Styleguide 1.3
31
+ // Styleguide 4.12
21
32
 
22
33
  @import '../settings/icon';
23
34
 
@@ -32,12 +43,9 @@
32
43
  fill: currentColor;
33
44
  }
34
45
 
35
- @each $icon-size in $bitstyles-icon-sizes {
36
- $alias: nth($icon-size, 1);
37
- $size: nth($icon-size, 2);
38
-
46
+ @each $icon-size-alias, $icon-size-size in $bitstyles-icon-sizes {
39
47
  /* postcss-bem-linter: ignore */
40
- .#{$bitstyles-namespace}o-icon--#{$alias} {
41
- font-size: $size;
48
+ .#{$bitstyles-namespace}o-icon--#{$icon-size-alias} {
49
+ font-size: $icon-size-size;
42
50
  }
43
51
  }
@@ -1,16 +1,18 @@
1
1
  /** @define input */
2
2
  // Form inputs
3
3
  //
4
- // Basic styling for input elements. All inputs stretch to fill their parent —
5
- // their width can be constrained by the parent element.
4
+ // **Base styling for input elements**.
5
+ // All inputs stretch to fill their parent — their width is constrained by the parent element.
6
6
  //
7
- // Styleguide 1.22
7
+ // Styleguide 4.13
8
8
 
9
9
  @import '../settings/input';
10
10
 
11
11
  // Form inputs - text
12
12
  //
13
- // Text inputs are those that accept a string input text, email, number, date.
13
+ // **All inputs that accept a string input e.g. text, email, number, date**
14
+ //
15
+ // Includes styles for focus, active & disabled states.
14
16
  //
15
17
  // Markup:
16
18
  // <label class="o-label" for="input_1">This is labeling text</label>
@@ -21,7 +23,7 @@
21
23
  // :disabled - Disabled state.
22
24
  // :active - Active/focus state
23
25
  //
24
- // Styleguide 1.22.1
26
+ // Styleguide 4.13.1
25
27
 
26
28
  .#{$bitstyles-namespace}o-input {
27
29
  @include block;
@@ -31,19 +33,19 @@
31
33
 
32
34
  .#{$bitstyles-namespace}o-input--text {
33
35
  padding: $bitstyles-input-padding;
36
+ color: $bitstyles-input-color;
34
37
  background-color: $bitstyles-input-background;
35
38
  border: $bitstyles-input-border;
36
39
  border-radius: $bitstyles-input-border-radius;
37
- color: $bitstyles-input-color;
38
40
 
39
41
  &::placeholder {
40
42
  color: $bitstyles-input-placeholder-color;
41
43
  }
42
44
 
43
45
  &:disabled {
44
- background: $bitstyles-input-background-color-disabled;
45
46
  color: $bitstyles-input-color-disabled;
46
47
  cursor: default;
48
+ background: $bitstyles-input-background-color-disabled;
47
49
  }
48
50
 
49
51
  &:active,
@@ -54,6 +56,8 @@
54
56
 
55
57
  // Form inputs - Select
56
58
  //
59
+ // Base styling for select elements. Not much can be done here, sadly.
60
+ //
57
61
  // Markup:
58
62
  // <label class="o-label" for="select_1">This is labeling text</label>
59
63
  // <select class="o-input" id="select_1">
@@ -62,17 +66,20 @@
62
66
  // <option value="value3">Value 3</option>
63
67
  // </select>
64
68
  //
65
- // Styleguide 1.22.2
69
+ // Styleguide 4.13.2
66
70
 
67
71
  // Form inputs - Checkbox
68
72
  //
73
+ // Base styling for checkboxes. Not much can be done here, but size and spacing
74
+ // are set.
75
+ //
69
76
  // Markup:
70
77
  // <label class="o-label">
71
78
  // <input type="checkbox" class="o-input o-input--checkbox">
72
79
  // This is labeling text. Jelly cake marshmallow. Pie cotton candy chupa chups marzipan liquorice cheesecake wafer. Jelly cake marshmallow. Pie cotton candy chupa chups marzipan liquorice cheesecake wafer. Jelly cake marshmallow. Pie cotton candy chupa chups marzipan liquorice cheesecake wafer. Jelly cake marshmallow. Pie cotton candy chupa chups marzipan liquorice cheesecake wafer.
73
80
  // </label>
74
81
  //
75
- // Styleguide 1.22.3
82
+ // Styleguide 4.13.3
76
83
 
77
84
  .#{$bitstyles-namespace}o-input--checkbox {
78
85
  display: inline-block;
@@ -1,13 +1,13 @@
1
1
  /** @define label */
2
2
  // Form labels
3
3
  //
4
- // Default styling for form labels.
4
+ // **Default styling for form labels**.
5
5
  //
6
6
  // Markup:
7
7
  // <label class="o-label" for="input_1">This is label text</label>
8
8
  // <input class="o-input o-input--text" type="text" placeholder="Placeholder text" id="input_1" />
9
9
  //
10
- // Styleguide 1.23
10
+ // Styleguide 4.14
11
11
 
12
12
  .#{$bitstyles-namespace}o-label {
13
13
  display: block;
@@ -1,29 +1,32 @@
1
1
  /* @define Link */
2
2
  // Link
3
3
  //
4
- // Mimicking standard anchors e.g. allows a `<button>` to look like a link
4
+ // Mimicking the appearance of standard anchor elements e.g. allows a `<button>` to look like a link.
5
+ // This is generally a bad practice — if it looks like a link, it should be a link —
6
+ // but it’s sometimes necessary for technical reasons e.g. it can’t be a link because no
7
+ // url change occurs when displaying a modal or similar. This is always code smell
8
+ // but is sometimes necessary.
5
9
  //
6
10
  // Markup:
7
- // <p>Read our <button class="o-link">Privacy Policy</button>.</p>
11
+ // <button class="o-link {$modifiers}">Privacy Policy</button>
8
12
  //
9
- // Styleguide 1.26
13
+ // - Default state
14
+ // :hover - Hover state
15
+ // :focus - Focus state
16
+ // :visited - Visited state
17
+ //
18
+ // sg-wrapper:
19
+ // <p>Read our <sg-wrapper-content/>.</p>
20
+ //
21
+ // Styleguide 4.15
10
22
 
11
23
  @import '../settings/link';
12
24
 
13
25
  .#{$bitstyles-namespace}o-link {
26
+ @include link;
27
+
14
28
  padding: 0;
15
- background: none;
16
- color: $bitstyles-color-link;
17
29
  border: 0;
18
- cursor: pointer;
30
+ transition: $bitstyles-link-transition;
19
31
  -webkit-appearance: none; // stylelint-disable-line property-no-vendor-prefix
20
-
21
- &:visited {
22
- color: $bitstyles-color-link-visited;
23
- }
24
-
25
- &:hover,
26
- &:focus {
27
- color: $bitstyles-color-link-hover;
28
- }
29
32
  }
@@ -0,0 +1,26 @@
1
+ /** @define list-inline */
2
+ //
3
+ // List inline
4
+ //
5
+ // **Display a list of items inline**.
6
+ //
7
+ // Wherever a list is useful semantically but the default vertical-stack layout
8
+ // for bullet points isn’t correct, this object is useful. Often used to display
9
+ // a list of links (anchors wrapped in `<li>`s) in a row next to each other.
10
+ //
11
+ // markup:
12
+ // <ul class="o-list-inline">
13
+ // <li class="o-list-inline__item"><a href="#one">link one</a></li>
14
+ // <li class="o-list-inline__item"><a href="#two">link two</a></li>
15
+ // <li class="o-list-inline__item"><a href="#three">link three</a></li>
16
+ // </ul>
17
+ //
18
+ // Styleguide 4.16
19
+
20
+ .#{$bitstyles-namespace}o-list-inline {
21
+ list-style: none;
22
+ }
23
+
24
+ .#{$bitstyles-namespace}o-list-inline__item {
25
+ display: inline;
26
+ }
@@ -1,8 +1,10 @@
1
1
  /** @define list-reset */
2
2
  // List reset
3
3
  //
4
- // List reset removes the default margin, padding and bullets on a list, making
5
- // it more useful as a semantic container.
4
+ // **Removes the default margin, padding and bullets**
5
+ //
6
+ // This makes `<ul>`s much more usable as a semantic container, without it creating
7
+ // styling issues due to browser defaults intended for bullet lists in text documents.
6
8
  //
7
9
  // Markup:
8
10
  // <ul class="{$modifiers}">
@@ -14,7 +16,7 @@
14
16
  // o-list-reset - Remove padding, margin and list-style-type
15
17
  // o-list-reset--bullets-only - Remove list-style-type only. Does not rely on `list-reset`. Useful if `list-reset` would adversely affect the margin or padding of another component.
16
18
  //
17
- // Styleguide 1.19
19
+ // Styleguide 4.17
18
20
 
19
21
  .#{$bitstyles-namespace}o-list-reset {
20
22
  @include list-reset();
@@ -1,7 +1,14 @@
1
1
  /** @define media */
2
2
  // Media
3
3
  //
4
- // Nicole Sullivan’s OOCSS media object.
4
+ // **[Nicole Sullivan’s OOCSS media object](http://www.stubbornella.org/content/2010/06/25/the-media-object-saves-hundreds-of-lines-of-code/)**.
5
+ //
6
+ // Contains a ‘feature’ element floated left e.g. a small user image. All other content
7
+ // (perhaps the user’s comment) flows around it to the right. The feature element
8
+ // should have either implicit size (like an image or video element), or have width set.
9
+ //
10
+ // If the feature element is as wide as the viewport, any adjacent content will drop drown
11
+ // below it instead of ranging right.
5
12
  //
6
13
  // markup:
7
14
  // <div class="o-media">
@@ -9,7 +16,7 @@
9
16
  // <p>Some text here that sits against the featured image on its left</p>
10
17
  // </div>
11
18
  //
12
- // Styleguide 1.21
19
+ // Styleguide 4.18
13
20
 
14
21
  .#{$bitstyles-namespace}o-media {
15
22
  @include media;
@@ -0,0 +1,20 @@
1
+ // Object-fit Cover
2
+ //
3
+ // Any element with inherent size (e.g. an `<img>`) will expand to fill the available space
4
+ // while maintaining their aspect ratio. One dimension will overflow its parent as needed
5
+ // in order to fill the other dimension.
6
+ //
7
+ // markup:
8
+ // <div class="fixed-height-block">
9
+ // <img class="o-object-cover" src="assets/images/placeholder_16-9.png">
10
+ // </div>
11
+ //
12
+ // Styleguide 4.24
13
+
14
+ .o-object-cover {
15
+ display: block;
16
+ width: 100%;
17
+ height: 100%;
18
+ object-fit: cover;
19
+ font-family: 'object-fit: cover;'; // Required for the polyfill
20
+ }
@@ -0,0 +1,20 @@
1
+ /** @define overflow */
2
+ // Overflow
3
+ //
4
+ // **Vertical scrolling panel**
5
+ //
6
+ // Any vertical overflow on the element is allowed to scroll, horizontal overflow is not.
7
+ // Different browsers/OSes have different strategies for displaying scrollbars when they’re
8
+ // needed, this class at least ensures no scrollbars are displayed unless there’s
9
+ // something to scroll.
10
+ //
11
+ // markup:
12
+ // <div class="o-overflow fixed-height-block">
13
+ // <div class="min-height-block background-grey">Jelly cake marshmallow. Pie cotton candy chupa chups marzipan liquorice cheesecake wafer. Gummies cheesecake oat cake sugar plum icing cupcake tiramisu bonbon. Cotton candy chupa chups tootsie roll chupa chups cotton candy liquorice jelly gingerbread. Pastry gummi bears liquorice tart cotton candy marshmallow. Ice cream cotton candy chocolate cake cookie. Bonbon candy jelly-o sugar plum cotton candy carrot cake icing ice cream. Sweet chocolate marzipan. Candy canes danish cake carrot cake bonbon. Gummi bears sesame snaps tart bear claw pie chocolate bar. Ice cream candy canes sugar plum cookie. Macaroon biscuit biscuit carrot cake liquorice. Muffin pudding gingerbread powder jelly-o chocolate bar powder jelly beans toffee.</div>
14
+ // </div>
15
+ //
16
+ // Styleguide 4.23
17
+
18
+ .o-overflow {
19
+ @include overflow;
20
+ }