bitstyles 0.8.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.
Files changed (119) hide show
  1. checksums.yaml +7 -0
  2. data/.eslintignore +5 -0
  3. data/.eslintrc +4 -0
  4. data/.github/PULL_REQUEST_TEMPLATE.md +20 -0
  5. data/.gitignore +19 -0
  6. data/.nvmrc +1 -0
  7. data/.stylelintrc +166 -0
  8. data/CODE_OF_CONDUCT.md +49 -0
  9. data/Gemfile +4 -0
  10. data/LICENSE.txt +7 -0
  11. data/README.md +251 -0
  12. data/Rakefile +2 -0
  13. data/bin/console +14 -0
  14. data/bin/setup +8 -0
  15. data/bitstyles.gemspec +29 -0
  16. data/bower.json +31 -0
  17. data/build/.gitignore +4 -0
  18. data/lib/bitstyles/engine.rb +9 -0
  19. data/lib/bitstyles/version.rb +3 -0
  20. data/lib/bitstyles.rb +2 -0
  21. data/package.json +85 -0
  22. data/postcss_build.json +12 -0
  23. data/postcss_lint.json +11 -0
  24. data/scripts/styleguide.sh +16 -0
  25. data/scss/bitstyles/base/_figure.scss +9 -0
  26. data/scss/bitstyles/base/_forms.scss +182 -0
  27. data/scss/bitstyles/base/_hr.scss +6 -0
  28. data/scss/bitstyles/base/_images.scss +13 -0
  29. data/scss/bitstyles/base/_link.scss +32 -0
  30. data/scss/bitstyles/base/_media.scss +24 -0
  31. data/scss/bitstyles/base/_typography.scss +354 -0
  32. data/scss/bitstyles/components/_expander.scss +45 -0
  33. data/scss/bitstyles/components/_modal.scss +170 -0
  34. data/scss/bitstyles/generic/_box-sizing.scss +16 -0
  35. data/scss/bitstyles/generic/_normalize.scss +421 -0
  36. data/scss/bitstyles/layout/_content.scss +33 -0
  37. data/scss/bitstyles/layout/_grid.scss +148 -0
  38. data/scss/bitstyles/layout/_topbar.scss +25 -0
  39. data/scss/bitstyles/layout/_width.scss +48 -0
  40. data/scss/bitstyles/objects/_absolute-center.scss +16 -0
  41. data/scss/bitstyles/objects/_absolute-cover.scss +16 -0
  42. data/scss/bitstyles/objects/_block.scss +14 -0
  43. data/scss/bitstyles/objects/_bordered-header.scss +39 -0
  44. data/scss/bitstyles/objects/_break-long-words.scss +15 -0
  45. data/scss/bitstyles/objects/_button--icon.scss +30 -0
  46. data/scss/bitstyles/objects/_button.scss +103 -0
  47. data/scss/bitstyles/objects/_clearfix.scss +19 -0
  48. data/scss/bitstyles/objects/_expander.scss +45 -0
  49. data/scss/bitstyles/objects/_fixed-ratio.scss +23 -0
  50. data/scss/bitstyles/objects/_flex.scss +24 -0
  51. data/scss/bitstyles/objects/_hidden.scss +33 -0
  52. data/scss/bitstyles/objects/_icon.scss +43 -0
  53. data/scss/bitstyles/objects/_input.scss +83 -0
  54. data/scss/bitstyles/objects/_label.scss +15 -0
  55. data/scss/bitstyles/objects/_link.scss +29 -0
  56. data/scss/bitstyles/objects/_list-reset.scss +25 -0
  57. data/scss/bitstyles/objects/_media.scss +20 -0
  58. data/scss/bitstyles/objects/_truncate-with-ellipsis.scss +18 -0
  59. data/scss/bitstyles/objects/_typography.scss +92 -0
  60. data/scss/bitstyles/objects/_vertical-center.scss +16 -0
  61. data/scss/bitstyles/objects/_visuallyhidden.scss +30 -0
  62. data/scss/bitstyles/settings/_bordered-header.scss +3 -0
  63. data/scss/bitstyles/settings/_button--icon.scss +5 -0
  64. data/scss/bitstyles/settings/_button.scss +18 -0
  65. data/scss/bitstyles/settings/_content.scss +5 -0
  66. data/scss/bitstyles/settings/_global.animation.scss +3 -0
  67. data/scss/bitstyles/settings/_global.breakpoints.scss +12 -0
  68. data/scss/bitstyles/settings/_global.color-base.scss +14 -0
  69. data/scss/bitstyles/settings/_global.color-theme.scss +11 -0
  70. data/scss/bitstyles/settings/_global.layout.scss +7 -0
  71. data/scss/bitstyles/settings/_global.setup.scss +1 -0
  72. data/scss/bitstyles/settings/_global.typography.scss +28 -0
  73. data/scss/bitstyles/settings/_grid.scss +1 -0
  74. data/scss/bitstyles/settings/_hidden.scss +1 -0
  75. data/scss/bitstyles/settings/_icon.scss +5 -0
  76. data/scss/bitstyles/settings/_input.scss +12 -0
  77. data/scss/bitstyles/settings/_link.scss +4 -0
  78. data/scss/bitstyles/settings/_modal.scss +9 -0
  79. data/scss/bitstyles/settings/_topbar.scss +2 -0
  80. data/scss/bitstyles/settings/_visuallyhidden.scss +1 -0
  81. data/scss/bitstyles/settings/_width.scss +12 -0
  82. data/scss/bitstyles/tools/_absolute-center.scss +13 -0
  83. data/scss/bitstyles/tools/_absolute-cover.scss +13 -0
  84. data/scss/bitstyles/tools/_block.scss +9 -0
  85. data/scss/bitstyles/tools/_break-long-words.scss +11 -0
  86. data/scss/bitstyles/tools/_clearfix.scss +13 -0
  87. data/scss/bitstyles/tools/_fixed-ratio.scss +27 -0
  88. data/scss/bitstyles/tools/_flex.scss +15 -0
  89. data/scss/bitstyles/tools/_font-face.scss +21 -0
  90. data/scss/bitstyles/tools/_hidden.scss +11 -0
  91. data/scss/bitstyles/tools/_list-reset.scss +17 -0
  92. data/scss/bitstyles/tools/_media-query.scss +30 -0
  93. data/scss/bitstyles/tools/_media.scss +15 -0
  94. data/scss/bitstyles/tools/_truncate-with-ellipsis.scss +13 -0
  95. data/scss/bitstyles/tools/_typography-conversions.scss +18 -0
  96. data/scss/bitstyles/tools/_typography.scss +17 -0
  97. data/scss/bitstyles/tools/_vertical-center.scss +11 -0
  98. data/scss/bitstyles/tools/_visuallyhidden.scss +18 -0
  99. data/scss/bitstyles/tools/_width.scss +30 -0
  100. data/scss/bitstyles/tools/_zindex.scss +36 -0
  101. data/scss/bitstyles/trumps/_background-color.scss +18 -0
  102. data/scss/bitstyles/trumps/_color.scss +19 -0
  103. data/scss/bitstyles/trumps/_margin.scss +39 -0
  104. data/scss/bitstyles/trumps/_no-margin.scss +39 -0
  105. data/scss/bitstyles/trumps/_no-padding.scss +43 -0
  106. data/scss/bitstyles/trumps/_padding.scss +43 -0
  107. data/scss/bitstyles/trumps/_text-align.scss +21 -0
  108. data/scss/bitstyles/trumps/_text-style.scss +19 -0
  109. data/scss/bitstyles/trumps/_text-weight.scss +25 -0
  110. data/scss/bitstyles.scss +167 -0
  111. data/styleguide/assets/images/icons.svg +12 -0
  112. data/styleguide/assets/images/placeholder_16-9.png +0 -0
  113. data/styleguide/assets/images/placeholder_button.png +0 -0
  114. data/styleguide/assets/javascripts/a11y-dialog.js +135 -0
  115. data/styleguide/assets/javascripts/expander.js +40 -0
  116. data/styleguide/assets/javascripts/modal.js +55 -0
  117. data/styleguide/assets/javascripts/styleguide-init.js +6 -0
  118. data/styleguide/assets/stylesheets/styleguide-extras.css +17 -0
  119. metadata +192 -0
@@ -0,0 +1,14 @@
1
+ /** @define block */
2
+ //
3
+ // Block
4
+ //
5
+ // Display an element as a block.
6
+ //
7
+ // Markup:
8
+ // <span class="o-block background-grey">Jelly cake marshmallow. Pie cotton candy chupa chups marzipan liquorice cheesecake wafer.</span>
9
+ //
10
+ // Styleguide 1.25
11
+
12
+ .#{$bitstyles-namespace}o-block {
13
+ @include block;
14
+ }
@@ -0,0 +1,39 @@
1
+ /** @define bordered-header */
2
+ //
3
+ // Bordered Header
4
+ //
5
+ // Creates equally-sized horizontal lines to the left & right of the element.
6
+ //
7
+ // markup:
8
+ // <h2 class="o-bordered-header">Bordered header</h2>
9
+ //
10
+ // Styleguide 1.17
11
+
12
+ @import '../settings/bordered-header';
13
+
14
+ .#{$bitstyles-namespace}o-bordered-header {
15
+ display: flex;
16
+ align-items: center;
17
+ justify-content: center;
18
+ width: 100%;
19
+ text-align: center;
20
+ white-space: nowrap;
21
+
22
+ &::before,
23
+ &::after {
24
+ display: inline-block;
25
+ vertical-align: middle;
26
+ flex-grow: 1;
27
+ min-width: $bitstyles-bordered-header-line-min-width;
28
+ border-top: $bitstyles-bordered-header-border;
29
+ content: '';
30
+ }
31
+
32
+ &::before {
33
+ margin-right: $bitstyles-bordered-header-gutter;
34
+ }
35
+
36
+ &::after {
37
+ margin-left: $bitstyles-bordered-header-gutter;
38
+ }
39
+ }
@@ -0,0 +1,15 @@
1
+ /** @define o-break-long-words */
2
+ //
3
+ // Break long words
4
+ //
5
+ // A cross-browser friendly emthod of ensuring no words exceed the width of the container.
6
+ // Use especially with user-generated content.
7
+ //
8
+ // markup:
9
+ // <p class="o-break-long-words">LongcontentwithnolinebreaksgoeshereLongcontentwithnolinebreaksgoeshereLongcontentwithnolinebreaksgoeshereLongcontentwithnolinebreaksgoeshereLongcontentwithnolinebreaksgoeshere</p>
10
+ //
11
+ // Styleguide 1.8
12
+
13
+ .#{$bitstyles-namespace}o-break-long-words {
14
+ @include break-long-words;
15
+ }
@@ -0,0 +1,30 @@
1
+ // Icon Button
2
+ //
3
+ // A specialised button type — (visible) content is intended to be only an icon.
4
+ // Specify the svg `<title>` when `<use>`ing the icon element so the button has valid text to use as button label (see example markup),
5
+ // or provide a `<span class="visuallyhidden"></span>` as sibling to the icon.
6
+ //
7
+ // markup:
8
+ // <button class="o-button o-button--icon {$modifiers}">
9
+ // <svg class="o-icon">
10
+ // <title>Twitter logo</title>
11
+ // <use xlink:href="assets/images/icons.svg#icon-twitter"></use>
12
+ // </svg>
13
+ // </button>
14
+ //
15
+ // - Base state
16
+ // :hover - Hover state.
17
+ // :focus - Focus state.
18
+ //
19
+ // Styleguide 1.2
20
+
21
+ @import '../settings/button--icon';
22
+
23
+ .#{$bitstyles-namespace}o-button--icon {
24
+ padding: $bitstyles-button-icon-padding;
25
+ line-height: 1;
26
+ color: $bitstyles-button-icon-color;
27
+ background-color: $bitstyles-button-icon-background-color;
28
+ border: $bitstyles-button-icon-border;
29
+ border-radius: $bitstyles-button-icon-border-radius;
30
+ }
@@ -0,0 +1,103 @@
1
+ /** @define button */
2
+ //
3
+ // Button
4
+ //
5
+ // Styleguide 1.1
6
+
7
+ // Button - generic
8
+ //
9
+ // Produces a larger-than-text hit target. Intended to be an action, not a link — most often a `<button>` rather than `<a href="#">`.
10
+ //
11
+ // markup:
12
+ // <button class="o-button {$modifiers}">
13
+ // <span class="o-button__label">Button Text</span>
14
+ // </button>
15
+ //
16
+ // - Base state
17
+ // :hover - Hover state.
18
+ // :focus - Focus state.
19
+ // :disabled - Disabled state.
20
+ //
21
+ // Styleguide 1.1.1
22
+
23
+ @import '../settings/button';
24
+
25
+ .#{$bitstyles-namespace}o-button {
26
+ position: relative;
27
+ display: inline-block;
28
+ padding: $bitstyles-button-padding-vertical $bitstyles-button-padding-horizontal;
29
+ margin: 0;
30
+ overflow: visible;
31
+ font: inherit;
32
+ color: $bitstyles-button-color;
33
+ text-align: center;
34
+ vertical-align: middle;
35
+ cursor: pointer;
36
+ background: $bitstyles-button-background-color;
37
+ border: $bitstyles-button-border;
38
+ border-radius: $bitstyles-button-border-radius;
39
+ transition: $bitstyles-button-transition;
40
+ -webkit-appearance: none; // stylelint-disable-line property-no-vendor-prefix
41
+ user-select: none;
42
+ touch-action: manipulation;
43
+
44
+ &:hover,
45
+ &:focus {
46
+ color: $bitstyles-button-color-hover;
47
+ background: $bitstyles-button-background-color-hover;
48
+ outline: none;
49
+ }
50
+
51
+ &:disabled {
52
+ background: $bitstyles-button-background-color-disabled;
53
+ border-color: $bitstyles-button-border-color-disabled;
54
+ color: $bitstyles-button-color-disabled;
55
+ cursor: default;
56
+ }
57
+ }
58
+
59
+ .#{$bitstyles-namespace}o-button__label {
60
+ position: relative;
61
+ display: inline-block;
62
+ vertical-align: middle;
63
+ }
64
+
65
+ // Button - with icon
66
+ //
67
+ // A button can be used with an optional decorative icon, placed before the
68
+ // text. Source order dictates icon position.
69
+ //
70
+ // markup:
71
+ // <button class="o-button {$modifiers}">
72
+ // <svg class="o-button__icon o-icon"><use xlink:href="assets/images/icons.svg#icon-twitter"></use></svg><span class="o-button__label">Button Text</span>
73
+ // </button>
74
+ //
75
+ // - Base state
76
+ // :hover - Hover state.
77
+ // :focus - Focus state.
78
+ //
79
+ // Styleguide 1.1.2
80
+
81
+ // Button - with icon, reversed
82
+ //
83
+ // A button can be used with an optional decorative icon, placed before the
84
+ // text. Source order dictates icon position.
85
+ //
86
+ // markup:
87
+ // <button class="o-button {$modifiers}">
88
+ // <span class="o-button__label">Button Text</span><svg class="o-button__icon o-icon"><use xlink:href="assets/images/icons.svg#icon-twitter"></use></svg>
89
+ // </button>
90
+ //
91
+ // - Base state
92
+ // :hover - Hover state.
93
+ // :focus - Focus state.
94
+ //
95
+ // Styleguide 1.1.3
96
+
97
+ .#{$bitstyles-namespace}o-button__icon + .#{$bitstyles-namespace}o-button__label {
98
+ margin-left: $bitstyles-button-icon-spacing;
99
+ }
100
+
101
+ .#{$bitstyles-namespace}o-button__label + .#{$bitstyles-namespace}o-button__icon {
102
+ margin-left: $bitstyles-button-icon-spacing;
103
+ }
@@ -0,0 +1,19 @@
1
+ /** @define clearfix */
2
+ //
3
+ // Clearfix
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).
8
+ //
9
+ // markup:
10
+ // <div class="o-clearfix background-grey">
11
+ // <div class="floated-element">Content goes here</div>
12
+ // <div class="floated-element">Content goes here</div>
13
+ // </div>
14
+ //
15
+ // Styleguide 1.7
16
+
17
+ .#{$bitstyles-namespace}o-clearfix {
18
+ @include clearfix;
19
+ }
@@ -0,0 +1,45 @@
1
+ // Expander
2
+ //
3
+ // Needs JS to function. The toggle is an interactive element of some kind (button, link),
4
+ // the body is the content you want to be revealed — it starts at zero height,
5
+ // expands to size of content once active.
6
+ //
7
+ // Use the `.o-button` classes on the `.o-expander-toggle` to set size & appearance.
8
+ //
9
+ // markup:
10
+ // <p>
11
+ // <button class="o-expander-toggle o-button" aria-expanded="false" aria-controls="expander-0" id="expander_button">
12
+ // Toggle content
13
+ // <svg class="o-icon o-expander-toggle__indicator">
14
+ // <use xlink:href="assets/images/icons.svg#icon-arrow-up"></use>
15
+ // </svg>
16
+ // </button>
17
+ // </p>
18
+ // <p>Other content</p>
19
+ // <div class="o-expander-body" id="expander-0" aria-hidden="true">
20
+ // <p>Pudding oat cake brownie. Gummies jelly beans apple pie. Donut sugar plum cotton candy sesame snaps muffin oat cake. Lemon drops carrot cake croissant gingerbread danish. Gingerbread liquorice soufflé croissant dessert sweet roll candy sweet roll. Pastry chocolate bar donut tiramisu marshmallow donut. Brownie chupa chups macaroon cupcake. Marzipan soufflé jelly sweet roll sesame snaps chocolate bar cake cotton candy brownie.</p>
21
+ // <p>Powder sweet roll sesame snaps. Sweet roll fruitcake ice cream cheesecake croissant. Candy cupcake cake brownie muffin oat cake gummi bears bear claw. Chupa chups liquorice jelly cotton candy gummies gummies. Jujubes lemon drops candy gummi bears cake cake fruitcake tart pastry. Cake topping candy canes. Lollipop dragée icing chocolate cake sugar plum. Jujubes halvah tootsie roll chocolate gingerbread sweet roll danish. Biscuit bonbon sweet.</p>
22
+ // </div>
23
+ //
24
+ // Styleguide 1.9
25
+
26
+ .#{$bitstyles-namespace}o-expander-toggle__indicator {
27
+ transform: rotate(180deg);
28
+ transition: transform $bitstyles-transition-duration $bitstyles-transition-easing;
29
+
30
+ .#{$bitstyles-namespace}o-expander-toggle[aria-expanded="true"] & {
31
+ transform: rotate(0deg); /* stylelint-disable-line length-zero-no-unit */
32
+ }
33
+ }
34
+
35
+ .#{$bitstyles-namespace}o-expander-body {
36
+ height: auto;
37
+ max-height: 0;
38
+ overflow: hidden;
39
+ transition: max-height $bitstyles-transition-duration-long $bitstyles-transition-easing;
40
+
41
+ &[aria-hidden="false"] {
42
+ max-height: 999rem;
43
+ max-height: 200vh; // stylelint-disable-line declaration-block-no-duplicate-properties
44
+ }
45
+ }
@@ -0,0 +1,23 @@
1
+ /** @define fixed-ratio */
2
+ //
3
+ // Fixed-ratio
4
+ //
5
+ // Enforces an aspect ratio on this element anbd its contents. Default ratio is 16:9, element take 100% width and height matches.
6
+ //
7
+ // 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>
14
+ //
15
+ // Styleguide 1.18
16
+
17
+ .#{$bitstyles-namespace}o-fixed-ratio {
18
+ @include fixed-ratio;
19
+ }
20
+
21
+ .#{$bitstyles-namespace}o-fixed-ratio__inner {
22
+ @include fixed-ratio__inner;
23
+ }
@@ -0,0 +1,24 @@
1
+ /** @define flex */
2
+ //
3
+ // Flex
4
+ //
5
+ // Simple flex layout.
6
+ // Make one of the children `.o-flex__primary` to make it take as much space as is available.
7
+ //
8
+ // 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>
14
+ // </ul>
15
+ //
16
+ // Styleguide 1.10
17
+
18
+ .#{$bitstyles-namespace}o-flex {
19
+ @include flex;
20
+ }
21
+
22
+ .#{$bitstyles-namespace}o-flex__primary {
23
+ @include flex__primary;
24
+ }
@@ -0,0 +1,33 @@
1
+ /** @define hidden */
2
+ //
3
+ // Hidden
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`.
7
+ //
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
11
+ //
12
+ // markup:
13
+ // <p>Paragraph 1 content</p>
14
+ // <p class="{$modifiers}">Paragraph 2 content</p>
15
+ // <p>Paragraph 3 content</p>
16
+ // <p class="{$modifiers}">Paragraph 4 content</p>
17
+ // <p>Paragraph 5 content</p>
18
+ //
19
+ // Styleguide 1.13
20
+
21
+ @import '../settings/hidden';
22
+
23
+ .#{$bitstyles-namespace}o-hidden {
24
+ @include hidden;
25
+ }
26
+
27
+ @each $breakpoint in $hidden-breakpoints {
28
+ @include media-query($breakpoint) {
29
+ .#{$bitstyles-namespace}o-hidden\@#{$breakpoint} {
30
+ @include hidden;
31
+ }
32
+ }
33
+ }
@@ -0,0 +1,43 @@
1
+ /** @define icon */
2
+ //
3
+ // Icons
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`.
8
+ //
9
+ // markup:
10
+ // <svg class="o-icon {$modifiers}">
11
+ // <title>Twitter logo</title>
12
+ // <use xlink:href="assets/images/icons.svg#icon-twitter"></use>
13
+ // </svg>
14
+ //
15
+ // default - Base size, matches font-size of parent element.
16
+ // .o-icon--small - Small icon (given default vars).
17
+ // .o-icon--medium - Medium icon (given default vars).
18
+ // .o-icon--large - Large icon (given default vars).
19
+ //
20
+ // Styleguide 1.3
21
+
22
+ @import '../settings/icon';
23
+
24
+ .#{$bitstyles-namespace}o-icon {
25
+ display: inline-block;
26
+ width: 1em;
27
+ height: 1em;
28
+ font-size: 1em;
29
+ vertical-align: middle;
30
+ outline: none;
31
+ transition: fill $bitstyles-transition-duration $bitstyles-transition-easing, stroke $bitstyles-transition-duration $bitstyles-transition-easing, background-color $bitstyles-transition-duration $bitstyles-transition-easing, transform $bitstyles-transition-duration $bitstyles-transition-easing;
32
+ fill: currentColor;
33
+ }
34
+
35
+ @each $icon-size in $bitstyles-icon-sizes {
36
+ $alias: nth($icon-size, 1);
37
+ $size: nth($icon-size, 2);
38
+
39
+ /* postcss-bem-linter: ignore */
40
+ .#{$bitstyles-namespace}o-icon--#{$alias} {
41
+ font-size: $size;
42
+ }
43
+ }
@@ -0,0 +1,83 @@
1
+ /** @define input */
2
+ // Form inputs
3
+ //
4
+ // Basic styling for input elements. All inputs stretch to fill their parent —
5
+ // their width can be constrained by the parent element.
6
+ //
7
+ // Styleguide 1.22
8
+
9
+ @import '../settings/input';
10
+
11
+ // Form inputs - text
12
+ //
13
+ // Text inputs are those that accept a string input — text, email, number, date.
14
+ //
15
+ // Markup:
16
+ // <label class="o-label" for="input_1">This is labeling text</label>
17
+ // <input type="text" class="o-input o-input--text {$modifiers}" id="input_1" placeholder="Placeholder text" />
18
+ //
19
+ //
20
+ // - default state
21
+ // :disabled - Disabled state.
22
+ // :active - Active/focus state
23
+ //
24
+ // Styleguide 1.22.1
25
+
26
+ .#{$bitstyles-namespace}o-input {
27
+ @include block;
28
+
29
+ width: 100%;
30
+ }
31
+
32
+ .#{$bitstyles-namespace}o-input--text {
33
+ padding: $bitstyles-input-padding;
34
+ background-color: $bitstyles-input-background;
35
+ border: $bitstyles-input-border;
36
+ border-radius: $bitstyles-input-border-radius;
37
+ color: $bitstyles-input-color;
38
+
39
+ &::placeholder {
40
+ color: $bitstyles-input-placeholder-color;
41
+ }
42
+
43
+ &:disabled {
44
+ background: $bitstyles-input-background-color-disabled;
45
+ color: $bitstyles-input-color-disabled;
46
+ cursor: default;
47
+ }
48
+
49
+ &:active,
50
+ &:focus {
51
+ border: $bitstyles-input-border-active;
52
+ }
53
+ }
54
+
55
+ // Form inputs - Select
56
+ //
57
+ // Markup:
58
+ // <label class="o-label" for="select_1">This is labeling text</label>
59
+ // <select class="o-input" id="select_1">
60
+ // <option value="value1">Value 1</option>
61
+ // <option value="value2" selected>Value 2</option>
62
+ // <option value="value3">Value 3</option>
63
+ // </select>
64
+ //
65
+ // Styleguide 1.22.2
66
+
67
+ // Form inputs - Checkbox
68
+ //
69
+ // Markup:
70
+ // <label class="o-label">
71
+ // <input type="checkbox" class="o-input o-input--checkbox">
72
+ // 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
+ // </label>
74
+ //
75
+ // Styleguide 1.22.3
76
+
77
+ .#{$bitstyles-namespace}o-input--checkbox {
78
+ display: inline-block;
79
+ width: $bitstyles-input-checkbox-size;
80
+ height: $bitstyles-input-checkbox-size;
81
+ margin-right: $bitstyles-input-padding;
82
+ vertical-align: middle;
83
+ }
@@ -0,0 +1,15 @@
1
+ /** @define label */
2
+ // Form labels
3
+ //
4
+ // Default styling for form labels.
5
+ //
6
+ // Markup:
7
+ // <label class="o-label" for="input_1">This is label text</label>
8
+ // <input class="o-input o-input--text" type="text" placeholder="Placeholder text" id="input_1" />
9
+ //
10
+ // Styleguide 1.23
11
+
12
+ .#{$bitstyles-namespace}o-label {
13
+ display: block;
14
+ margin-bottom: 0;
15
+ }
@@ -0,0 +1,29 @@
1
+ /* @define Link */
2
+ // Link
3
+ //
4
+ // Mimicking standard anchors e.g. allows a `<button>` to look like a link
5
+ //
6
+ // Markup:
7
+ // <p>Read our <button class="o-link">Privacy Policy</button>.</p>
8
+ //
9
+ // Styleguide 1.26
10
+
11
+ @import '../settings/link';
12
+
13
+ .#{$bitstyles-namespace}o-link {
14
+ padding: 0;
15
+ background: none;
16
+ color: $bitstyles-color-link;
17
+ border: 0;
18
+ cursor: pointer;
19
+ -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
+ }
@@ -0,0 +1,25 @@
1
+ /** @define list-reset */
2
+ // List reset
3
+ //
4
+ // List reset removes the default margin, padding and bullets on a list, making
5
+ // it more useful as a semantic container.
6
+ //
7
+ // Markup:
8
+ // <ul class="{$modifiers}">
9
+ // <li>Item 1</li>
10
+ // <li>Item 2</li>
11
+ // <li>Item 3</li>
12
+ // </ul>
13
+ //
14
+ // o-list-reset - Remove padding, margin and list-style-type
15
+ // 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
+ //
17
+ // Styleguide 1.19
18
+
19
+ .#{$bitstyles-namespace}o-list-reset {
20
+ @include list-reset();
21
+ }
22
+
23
+ .#{$bitstyles-namespace}o-list-reset--bullets-only {
24
+ @include list-reset(false);
25
+ }
@@ -0,0 +1,20 @@
1
+ /** @define media */
2
+ // Media
3
+ //
4
+ // Nicole Sullivan’s OOCSS media object.
5
+ //
6
+ // markup:
7
+ // <div class="o-media">
8
+ // <img class="o-media__feature" src="assets/images/placeholder_16-9.png"/>
9
+ // <p>Some text here that sits against the featured image on its left</p>
10
+ // </div>
11
+ //
12
+ // Styleguide 1.21
13
+
14
+ .#{$bitstyles-namespace}o-media {
15
+ @include media;
16
+ }
17
+
18
+ .#{$bitstyles-namespace}o-media__feature {
19
+ @include media__feature;
20
+ }
@@ -0,0 +1,18 @@
1
+ /** @define truncate-with-ellipsis */
2
+ //
3
+ // Truncate with ellipsis
4
+ //
5
+ // Truncates text with an ellipsis (…). Parent element needs a set or limited width.
6
+ // Note the exact algorithm is defined per browser and is of varying quality
7
+ // — you may loose a couple of characters just to display an ellipsis instead.
8
+ //
9
+ // markup:
10
+ // <div class="l-width--2-of-12 background-grey">
11
+ // <p class="o-truncate-with-ellipsis">Truncated content goes here</p>
12
+ // </div>
13
+ //
14
+ // Styleguide 1.15
15
+
16
+ .#{$bitstyles-namespace}o-truncate-with-ellipsis {
17
+ @include truncate-with-ellipsis;
18
+ }