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
data/package.json ADDED
@@ -0,0 +1,85 @@
1
+ {
2
+ "name": "bitstyles",
3
+ "version": "0.8.0",
4
+ "description": "The Bitcrowd CSS library",
5
+ "main": "bitstyles.scss",
6
+ "scripts": {
7
+ "build": "node-sass scss/bitstyles.scss -o build --output-style compact",
8
+ "postbuild": "postcss -c postcss_build.json",
9
+ "lint:scss": "postcss -c postcss_lint.json",
10
+ "lint:js": "eslint .",
11
+ "lint": "npm run lint:scss && npm run lint:js",
12
+
13
+ "test:build": "npm run test:build:base && npm run test:build:objects && npm run test:build:layout && npm run test:build:components && npm run test:build:trumps",
14
+ "test:build:base": "backstop reference --configPath=test/backstop_tests/base.json",
15
+ "test:build:objects": "backstop reference --configPath=test/backstop_tests/objects.json",
16
+ "test:build:layout": "backstop reference --configPath=test/backstop_tests/layout.json",
17
+ "test:build:components": "backstop reference --configPath=test/backstop_tests/components.json",
18
+ "test:build:trumps": "backstop reference --configPath=test/backstop_tests/trumps.json",
19
+
20
+ "test": "npm run test:base && npm run test:layout && npm run test:objects && npm run test:components && npm run test:trumps",
21
+ "test:base": "backstop test --configPath=test/backstop_tests/base.json",
22
+ "test:objects": "backstop test --configPath=test/backstop_tests/objects.json",
23
+ "test:layout": "backstop test --configPath=test/backstop_tests/layout.json",
24
+ "test:components": "backstop test --configPath=test/backstop_tests/components.json",
25
+ "test:trumps": "backstop test --configPath=test/backstop_tests/trumps.json",
26
+
27
+ "checks": "npm run lint && npm run test",
28
+ "prestyleguide": "npm run build && cat build/bitstyles.css styleguide/assets/stylesheets/styleguide-extras.css > build/bitstyles_styleguide.css",
29
+ "styleguide": "scripts/styleguide.sh",
30
+ "watch": "npm run build && npm run build -- --watch --recursive",
31
+ "clean": "rimraf build/*",
32
+ "precss:stats": "npm run build",
33
+ "css:stats": "parker build/bitstyles.css --format=json > test/css-stats.json",
34
+ "precss:graph": "npm run build",
35
+ "css:graph": "specificity-graph build/bitstyles.css --output test/specificity_graph/"
36
+ },
37
+ "repository": {
38
+ "type": "git",
39
+ "url": "git+https://github.com/bitcrowd/bitstyles.git"
40
+ },
41
+ "keywords": [
42
+ "css",
43
+ "sass"
44
+ ],
45
+ "author": {
46
+ "name": "Bitcrowd GmbH.",
47
+ "email": "info@bitcrowd.net"
48
+ },
49
+ "contributors": [
50
+ {
51
+ "name": "Darren Cadwallader"
52
+ },
53
+ {
54
+ "name": "Charlie Owen"
55
+ }
56
+ ],
57
+ "license": "ISC",
58
+ "bugs": {
59
+ "url": "https://github.com/bitcrowd/bitstyles/issues"
60
+ },
61
+ "homepage": "https://github.com/bitcrowd/bitstyles#readme",
62
+ "devDependencies": {
63
+ "autoprefixer": "^6.5.0",
64
+ "cssnano": "^3.7.7",
65
+ "eslint": "^3.7.1",
66
+ "eslint-config-bitcrowd": "0.0.3",
67
+ "eslint-config-bitcrowd-base": "^8.0.0",
68
+ "eslint-plugin-import": "^1.16.0",
69
+ "node-sass": "^3.10.1",
70
+ "parker": "1.0.0-alpha.0",
71
+ "postcss": "^5.2.4",
72
+ "postcss-bem-linter": "^2.6.0",
73
+ "postcss-cli": "^2.6.0",
74
+ "postcss-reporter": "^1.4.1",
75
+ "postcss-scss": "^0.3.1",
76
+ "rimraf": "^2.5.4",
77
+ "sc5-styleguide": "^1.2.0",
78
+ "specificity-graph": "^0.1.7",
79
+ "stylelint": "^7.4.2",
80
+ "stylelint-config-standard": "^13.0.2"
81
+ },
82
+ "files": [
83
+ "scss"
84
+ ]
85
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "use": ["autoprefixer", "cssnano"],
3
+ "input": "build/bitstyles.css",
4
+ "output": "build/bitstyles.css",
5
+ "local-plugins": true,
6
+ "autoprefixer": {
7
+ "browsers": ["last 3 versions"]
8
+ },
9
+ "cssnano": {
10
+ "safe": true
11
+ }
12
+ }
data/postcss_lint.json ADDED
@@ -0,0 +1,11 @@
1
+ {
2
+ "use": ["stylelint", "postcss-bem-linter", "postcss-reporter"],
3
+ "input": "./scss/**/*.scss",
4
+ "dir": "./tmp/",
5
+ "local-plugins": true,
6
+ "syntax": "postcss-scss",
7
+ "postcss-bem-linter": {
8
+ "componentName": "^[a-zA-Z0-9-]+$",
9
+ "componentSelectors": "\\.#{\\$bitstyles-namespace}(l-|c-|o-|t-|is-|has-|js-){componentName}(?:__[a-zA-Z0-9-]+)?(?:--[a-zA-Z0-9-]+)?(?:\\[.+\\])?"
10
+ }
11
+ }
@@ -0,0 +1,16 @@
1
+ #!/bin/sh
2
+
3
+ styleguide \
4
+ --kss-source 'scss/**/*.scss' \
5
+ --style-source 'build/bitstyles_styleguide.css' \
6
+ --output 'styleguide' \
7
+ --overviewPath 'README.md' \
8
+ --readOnly \
9
+ --watch \
10
+ --server \
11
+ --disableEncapsulation \
12
+ --title 'bitstyles' \
13
+ --extraHead '<script src="/assets/javascripts/a11y-dialog.js"></script>' \
14
+ --extraHead '<script src="/assets/javascripts/styleguide-init.js"></script>' \
15
+ --extraHead '<script src="/assets/javascripts/modal.js"></script>' \
16
+ --extraHead '<script src="/assets/javascripts/expander.js"></script>' \
@@ -0,0 +1,9 @@
1
+ // Figure and figcaption
2
+ //
3
+ // markup:
4
+ // <figure>
5
+ // <img src="assets/images/placeholder_16-9.png">
6
+ // <figcaption>An image at 16:9 aspect ratio</figcaption>
7
+ // </figure>
8
+ //
9
+ // Styleguide 4.13
@@ -0,0 +1,182 @@
1
+ // Forms
2
+ //
3
+ // Styleguide 4.16
4
+
5
+ // fieldset
6
+ //
7
+ // markup:
8
+ // <fieldset><legend>Fieldset</legend></fieldset>
9
+ //
10
+ // Styleguide 4.16.1
11
+
12
+ // input - text
13
+ //
14
+ // markup:
15
+ // <input type="text" placeholder="Jelly cake marshmallow">
16
+ //
17
+ // Styleguide 4.16.2
18
+
19
+ // input - email
20
+ //
21
+ // markup:
22
+ // <input type="email" placeholder="jellycake@marshmallow.com">
23
+ //
24
+ // Styleguide 4.16.3
25
+
26
+ // input - number
27
+ //
28
+ // markup:
29
+ // <input type="number" placeholder="123456789">
30
+ //
31
+ // Styleguide 4.16.4
32
+
33
+ // input - range
34
+ //
35
+ // markup:
36
+ // <input type="range" min="0" max="10" step="1">
37
+ //
38
+ // Styleguide 4.16.5
39
+
40
+ // textarea
41
+ //
42
+ // markup:
43
+ // <textarea>Jelly cake marshmallow. Pie cotton candy chupa chups marzipan liquorice cheesecake wafer.</textarea>
44
+ //
45
+ // Styleguide 4.16.6
46
+
47
+ // select
48
+ //
49
+ // markup:
50
+ // <select>
51
+ // <option value="value1" selected>Value 1</option>
52
+ // <option value="value2">Value 2</option>
53
+ // <option value="value3">Value 3</option>
54
+ // </select>
55
+ //
56
+ // Styleguide 4.16.7
57
+
58
+ // label
59
+ //
60
+ // markup:
61
+ // <label>Jelly cake marshmallow. Pie cotton candy chupa chups marzipan liquorice cheesecake wafer.</label>
62
+ //
63
+ // Styleguide 4.16.8
64
+
65
+ // input - radio
66
+ //
67
+ // markup:
68
+ // <input type="radio">
69
+ //
70
+ // Styleguide 4.16.9
71
+
72
+ // input - checkbox
73
+ //
74
+ // markup:
75
+ // <input type="checkbox">
76
+ //
77
+ // Styleguide 4.16.10
78
+
79
+ // input - button
80
+ //
81
+ // markup:
82
+ // <input type="button" value="Button">
83
+ //
84
+ // Styleguide 4.16.11
85
+
86
+ // input - color
87
+ //
88
+ // markup:
89
+ // <input type="color">
90
+ //
91
+ // Styleguide 4.16.12
92
+
93
+ // input - date
94
+ //
95
+ // markup:
96
+ // <input type="date">
97
+ //
98
+ // Styleguide 4.16.13
99
+
100
+ // input - datetime-local
101
+ //
102
+ // markup:
103
+ // <input type="datetime-local">
104
+ //
105
+ // Styleguide 4.16.14
106
+
107
+ // input - file
108
+ //
109
+ // markup:
110
+ // <input type="file">
111
+ //
112
+ // Styleguide 4.16.15
113
+
114
+ // input - image
115
+ //
116
+ // markup:
117
+ // <input type="image" src="assets/images/placeholder_button.png" alt="Image">
118
+ //
119
+ // Styleguide 4.16.16
120
+
121
+ // input - month
122
+ //
123
+ // markup:
124
+ // <input type="month">
125
+ //
126
+ // Styleguide 4.16.17
127
+
128
+ // input - password
129
+ //
130
+ // markup:
131
+ // <input type="password" value="Password">
132
+ //
133
+ // Styleguide 4.16.18
134
+
135
+ // input - reset
136
+ //
137
+ // markup:
138
+ // <input type="reset">
139
+ //
140
+ // Styleguide 4.16.19
141
+
142
+ // input - search
143
+ //
144
+ // markup:
145
+ // <input type="search">
146
+ //
147
+ // Styleguide 4.16.20
148
+
149
+ // input - submit
150
+ //
151
+ // markup:
152
+ // <input type="submit" value="Submit">
153
+ //
154
+ // Styleguide 4.16.21
155
+
156
+ // input - tel
157
+ //
158
+ // markup:
159
+ // <input type="tel">
160
+ //
161
+ // Styleguide 4.16.22
162
+
163
+ // input - time
164
+ //
165
+ // markup:
166
+ // <input type="time">
167
+ //
168
+ // Styleguide 4.16.23
169
+
170
+ // input - url
171
+ //
172
+ // markup:
173
+ // <input type="url">
174
+ //
175
+ // Styleguide 4.16.24
176
+
177
+ // input - week
178
+ //
179
+ // markup:
180
+ // <input type="week">
181
+ //
182
+ // Styleguide 4.16.25
@@ -0,0 +1,6 @@
1
+ // Horizontal rule
2
+ //
3
+ // markup:
4
+ // <hr>
5
+ //
6
+ // Styleguide 4.12
@@ -0,0 +1,13 @@
1
+ // Image
2
+ //
3
+ // markup:
4
+ // <img src="assets/images/placeholder_16-9.png">
5
+ //
6
+ // Styleguide 4.11
7
+
8
+ /* stylelint-disable selector-no-type */
9
+ img {
10
+ height: auto;
11
+ max-width: 100%;
12
+ }
13
+ /* stylelint-enable selector-no-type */
@@ -0,0 +1,32 @@
1
+ /* stylelint-disable selector-no-type */
2
+ // Links
3
+ //
4
+ // Standard links.
5
+ //
6
+ // markup:
7
+ // <a href="#"" class="{$modifiers}">Jelly cake marshmallow</a>
8
+ //
9
+ // default - Default state
10
+ // :hover - Hover state
11
+ // :focus - Focus state
12
+ // :visited - Visited state
13
+ //
14
+ // Styleguide 4.3
15
+
16
+ @import '../settings/link';
17
+
18
+ a {
19
+ color: $bitstyles-color-link;
20
+ text-decoration: none;
21
+ transition: $bitstyles-link-transition;
22
+
23
+ &:visited {
24
+ color: $bitstyles-color-link-visited;
25
+ }
26
+
27
+ &:hover,
28
+ &:focus {
29
+ color: $bitstyles-color-link-hover;
30
+ text-decoration: underline;
31
+ }
32
+ }
@@ -0,0 +1,24 @@
1
+ // Audio
2
+ //
3
+ // markup:
4
+ // <audio controls="">
5
+ // <source src="http://hpr.dogphilosophy.net/test/opus.opus" type="audio/ogg; codecs=&quot;opus&quot;">
6
+ // <source src="http://hpr.dogphilosophy.net/test/weba.weba">
7
+ // <source src="http://hpr.dogphilosophy.net/test/ogg.ogg">
8
+ // <source src="http://hpr.dogphilosophy.net/test/mp3.mp3">
9
+ // <source src="http://hpr.dogphilosophy.net/test/wav.wav">
10
+ // <source src="http://hpr.dogphilosophy.net/test/flac.flac">
11
+ // </audio>
12
+ //
13
+ // Styleguide 4.14
14
+
15
+ // Video
16
+ //
17
+ // markup:
18
+ // <video width="640" height="360" controls="true" >
19
+ // <source src="http://clips.vorwaerts-gmbh.de/VfE_html5.mp4" type="video/mp4">
20
+ // <source src="http://clips.vorwaerts-gmbh.de/VfE.webm" type="video/webm">
21
+ // <source src="http://clips.vorwaerts-gmbh.de/VfE.ogv" type="video/ogg">
22
+ // </video>
23
+ //
24
+ // Styleguide 4.15