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
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 7a483a85b0d8fb36fc6d843a31ca7b6171bfd670
4
+ data.tar.gz: c8ec427baa516f453b152c9f91a343092553d1d6
5
+ SHA512:
6
+ metadata.gz: ea9dd48e5f8928a77069976982c36f7aae008f64b2ea9ef2f0b76eff6874bb1b1eb16a835e91f775c8e4188a318980951d3c8a66b8f44b04473df0579416efa7
7
+ data.tar.gz: 00fd08609acaeba3712fae4a241f64db4b76aa4f517f2d78636c692aa49a746926b0f838d8b04ef7c59775d3cdecc99c3931b4a9e13f4c6433c6a34e2eed21e9
data/.eslintignore ADDED
@@ -0,0 +1,5 @@
1
+ node_modules
2
+ build
3
+ styleguide
4
+ backstop_data
5
+ specificity_graph
data/.eslintrc ADDED
@@ -0,0 +1,4 @@
1
+ {
2
+ "root": true,
3
+ "extends": "bitcrowd-base"
4
+ }
@@ -0,0 +1,20 @@
1
+ ### Summary
2
+
3
+ Fixes # .
4
+
5
+ The following changes are contained in this pull request:
6
+ - x
7
+ - y
8
+ - z
9
+
10
+ ### Changes to objects & trumps
11
+
12
+ - [ ] Styleguide documentation has been updated.
13
+ - [ ] `backstop.json` file has been updated
14
+ - [ ] `npm run test:build` script has been sucessfully run and new/changed images committed
15
+ - [ ] `npm run stats` script run and updated `stats/css.json` commited
16
+
17
+ ### Linting and testing
18
+
19
+ - [ ] `npm run test` script has been run and visual tests pass
20
+ - [ ] `npm run checks` script has been run without errors
data/.gitignore ADDED
@@ -0,0 +1,19 @@
1
+ .sass-cache
2
+ node_modules
3
+ .npm
4
+ npm-debug.log*
5
+ /.bundle/
6
+ /.yardoc
7
+ /Gemfile.lock
8
+ /_yardoc/
9
+ /coverage/
10
+ /doc/
11
+ /pkg/
12
+ /spec/reports/
13
+ /tmp/
14
+
15
+ styleguide/*
16
+ bitmaps_test
17
+ html_report
18
+ ci_report
19
+ specificity_graph
data/.nvmrc ADDED
@@ -0,0 +1 @@
1
+ 5.7
data/.stylelintrc ADDED
@@ -0,0 +1,166 @@
1
+ {
2
+ "extends": "stylelint-config-standard",
3
+ "rules": {
4
+ "at-rule-no-vendor-prefix": true,
5
+ "media-feature-name-no-vendor-prefix": true,
6
+ "property-no-vendor-prefix": true,
7
+ "selector-no-vendor-prefix": true,
8
+ "value-no-vendor-prefix": true,
9
+ "max-nesting-depth": 2,
10
+ "declaration-no-important": true,
11
+ "selector-no-id": true,
12
+ "declaration-block-no-duplicate-properties": true,
13
+ "no-unknown-animations": true,
14
+ "selector-no-type": true,
15
+ "no-descending-specificity": true,
16
+ "declaration-block-properties-order": [
17
+ "position",
18
+ "top",
19
+ "right",
20
+ "bottom",
21
+ "left",
22
+ "z-index",
23
+ "display",
24
+ "float",
25
+ "width",
26
+ "height",
27
+ "max-width",
28
+ "max-height",
29
+ "min-width",
30
+ "min-height",
31
+ "padding",
32
+ "padding-top",
33
+ "padding-right",
34
+ "padding-bottom",
35
+ "padding-left",
36
+ "margin",
37
+ "margin-top",
38
+ "margin-right",
39
+ "margin-bottom",
40
+ "margin-left",
41
+ "margin-collapse",
42
+ "margin-top-collapse",
43
+ "margin-right-collapse",
44
+ "margin-bottom-collapse",
45
+ "margin-left-collapse,",
46
+ "overflow",
47
+ "overflow-x",
48
+ "overflow-y,",
49
+ "clip",
50
+ "clear,",
51
+ "font",
52
+ "font-family",
53
+ "font-size",
54
+ "font-smoothing",
55
+ "osx-font-smoothing",
56
+ "font-style",
57
+ "font-weight",
58
+ "hyphens",
59
+ "src",
60
+ "line-height",
61
+ "letter-spacing",
62
+ "word-spacing,",
63
+ "color,",
64
+ "text-align",
65
+ "text-decoration",
66
+ "text-indent",
67
+ "text-overflow",
68
+ "text-rendering",
69
+ "text-size-adjust",
70
+ "text-shadow",
71
+ "text-transform,",
72
+ "word-break",
73
+ "word-wrap",
74
+ "white-space",
75
+ "vertical-align,",
76
+ "list-style",
77
+ "list-style-type",
78
+ "list-style-position",
79
+ "list-style-image,",
80
+ "pointer-events",
81
+ "cursor,",
82
+ "background",
83
+ "background-attachment",
84
+ "background-color",
85
+ "background-image",
86
+ "background-position",
87
+ "background-repeat",
88
+ "background-size,",
89
+ "border",
90
+ "border-collapse",
91
+ "border-top",
92
+ "border-right",
93
+ "border-bottom",
94
+ "border-left",
95
+ "border-color",
96
+ "border-image",
97
+ "border-top-color",
98
+ "border-right-color",
99
+ "border-bottom-color",
100
+ "border-left-color",
101
+ "border-spacing",
102
+ "border-style",
103
+ "border-top-style",
104
+ "border-right-style",
105
+ "border-bottom-style",
106
+ "border-left-style",
107
+ "border-width",
108
+ "border-top-width",
109
+ "border-right-width",
110
+ "border-bottom-width",
111
+ "border-left-width",
112
+ "border-radius",
113
+ "border-top-right-radius",
114
+ "border-bottom-right-radius",
115
+ "border-bottom-left-radius",
116
+ "border-top-left-radius",
117
+ "border-radius-topright",
118
+ "border-radius-bottomright",
119
+ "border-radius-bottomleft",
120
+ "border-radius-topleft,",
121
+ "content",
122
+ "quotes",
123
+ "outline",
124
+ "outline-offset",
125
+ "opacity",
126
+ "filter",
127
+ "visibility",
128
+ "size",
129
+ "zoom",
130
+ "transform",
131
+ "box-align",
132
+ "box-flex",
133
+ "box-orient",
134
+ "box-pack",
135
+ "box-shadow",
136
+ "box-sizing",
137
+ "table-layout",
138
+ "animation",
139
+ "animation-delay",
140
+ "animation-duration",
141
+ "animation-iteration-count",
142
+ "animation-name",
143
+ "animation-play-state",
144
+ "animation-timing-function",
145
+ "animation-fill-mode",
146
+ "transition",
147
+ "transition-delay",
148
+ "transition-duration",
149
+ "transition-property",
150
+ "transition-timing-function",
151
+ "background-clip",
152
+ "backface-visibility",
153
+ "will-change",
154
+ "resize",
155
+ "appearance",
156
+ "user-select",
157
+ "interpolation-mode",
158
+ "direction",
159
+ "marks",
160
+ "page",
161
+ "set-link-source",
162
+ "unicode-bidi",
163
+ "speak",
164
+ ]
165
+ }
166
+ }
@@ -0,0 +1,49 @@
1
+ # Contributor Code of Conduct
2
+
3
+ As contributors and maintainers of this project, and in the interest of
4
+ fostering an open and welcoming community, we pledge to respect all people who
5
+ contribute through reporting issues, posting feature requests, updating
6
+ documentation, submitting pull requests or patches, and other activities.
7
+
8
+ We are committed to making participation in this project a harassment-free
9
+ experience for everyone, regardless of level of experience, gender, gender
10
+ identity and expression, sexual orientation, disability, personal appearance,
11
+ body size, race, ethnicity, age, religion, or nationality.
12
+
13
+ Examples of unacceptable behavior by participants include:
14
+
15
+ * The use of sexualized language or imagery
16
+ * Personal attacks
17
+ * Trolling or insulting/derogatory comments
18
+ * Public or private harassment
19
+ * Publishing other's private information, such as physical or electronic
20
+ addresses, without explicit permission
21
+ * Other unethical or unprofessional conduct
22
+
23
+ Project maintainers have the right and responsibility to remove, edit, or
24
+ reject comments, commits, code, wiki edits, issues, and other contributions
25
+ that are not aligned to this Code of Conduct, or to ban temporarily or
26
+ permanently any contributor for other behaviors that they deem inappropriate,
27
+ threatening, offensive, or harmful.
28
+
29
+ By adopting this Code of Conduct, project maintainers commit themselves to
30
+ fairly and consistently applying these principles to every aspect of managing
31
+ this project. Project maintainers who do not follow or enforce the Code of
32
+ Conduct may be permanently removed from the project team.
33
+
34
+ This code of conduct applies both within project spaces and in public spaces
35
+ when an individual is representing the project or its community.
36
+
37
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
38
+ reported by contacting a project maintainer at darren@bitcrowd.net. All
39
+ complaints will be reviewed and investigated and will result in a response that
40
+ is deemed necessary and appropriate to the circumstances. Maintainers are
41
+ obligated to maintain confidentiality with regard to the reporter of an
42
+ incident.
43
+
44
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
45
+ version 1.3.0, available at
46
+ [http://contributor-covenant.org/version/1/3/0/][version]
47
+
48
+ [homepage]: http://contributor-covenant.org
49
+ [version]: http://contributor-covenant.org/version/1/3/0/
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in bitstyles.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,7 @@
1
+ ISC License (ISC)
2
+
3
+ Copyright (c) 2016, Bitcrowd GmbH. <info@bitcrowd.net>
4
+
5
+ Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
6
+
7
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,251 @@
1
+ # Bitstyles
2
+
3
+ A developing collection of CSS styles and helpers, for use in Bitcrowd projects.
4
+
5
+ ## Using Bitstyles in a project
6
+
7
+ Bitstyles can be added to your project via [npm](https://www.npmjs.com/) or [Bower](http://bower.io/), as each project demands.
8
+
9
+ The source repository is currently private, and is not registered with the Bower
10
+ or npm registries. You will therefore need to install directly from a tagged
11
+ Github release (not from master), and you will need read access to the repo.
12
+
13
+ ### Bower
14
+ ```shell
15
+ bower install git@github.com:bitcrowd/bitstyles.git#0.7.5 --save
16
+ ```
17
+
18
+ Once installed, you need to provide your sass installation with the path for bitstyles’ sass. This should be:
19
+
20
+ ```
21
+ bower_components/bitstyles/scss
22
+ ```
23
+
24
+ If you’re using gulp-sass, you can provide this path when `pipe`ing to sass:
25
+
26
+ ```javascript
27
+ gulp.task('stylesheet', function(){
28
+ return gulp.src('app/css/main.scss')
29
+ .pipe(sass({
30
+ includePaths: ['bower_components/bitstyles/scss']
31
+ }).on('error', sass.logError));
32
+ }
33
+ ```
34
+
35
+ If you’re using Rails 4+, you can add this path to the asset pipeline in `config/initializers/assets.rb` where you see the commmented-out lines
36
+
37
+ ```ruby
38
+ # Add additional assets to the asset load path
39
+ # Rails.application.config.assets.paths << Emoji.images_path
40
+ ```
41
+
42
+ Add the following:
43
+
44
+ ```ruby
45
+ Rails.application.config.assets.paths << Rails.root.join("bower_components", "bitstyles", "bitstyles")
46
+ ```
47
+
48
+ If you’re using a version of Rails previous to 4, you must instead add the path to the asset pipeline in `config/application.rb`:
49
+
50
+ ```ruby
51
+ config.assets.paths << Rails.root.join("bower_components", "bitstyles", "bitstyles")
52
+ ```
53
+
54
+ ### npm
55
+ ```shell
56
+ npm install git+ssh://github.com/bitcrowd/bitstyles.git#0.7.5 --save
57
+ ```
58
+
59
+ Once installed, you need to provide your sass installation with the path for bitstyles’ sass. This should be:
60
+
61
+ ```
62
+ node_modules/bitstyles/scss
63
+ ```
64
+
65
+ If you’re using gulp-sass, you can provide this path when `pipe`ing to sass:
66
+
67
+ ```javascript
68
+ gulp.task('stylesheet', function(){
69
+ return gulp.src('app/css/main.scss')
70
+ .pipe(sass({
71
+ includePaths: ['node_modules/bitstyles/scss']
72
+ }).on('error', sass.logError));
73
+ }
74
+ ```
75
+
76
+ If you’re using Rails 4+, you can add this path to the asset pipeline in `config/initializers/assets.rb` where you see the commmented-out lines
77
+
78
+ ```ruby
79
+ # Add additional assets to the asset load path
80
+ # Rails.application.config.assets.paths << Emoji.images_path
81
+ ```
82
+
83
+ Add the following:
84
+
85
+ ```ruby
86
+ Rails.application.config.assets.paths << Rails.root.join("node_modules", "bitstyles", "bitstyles")
87
+ ```
88
+
89
+ If you’re using a version of Rails previous to 4, you must instead add the path to the asset pipeline in `config/application.rb`:
90
+
91
+ ```ruby
92
+ config.assets.paths << Rails.root.join("node_modules", "bitstyles", "bitstyles")
93
+ ```
94
+
95
+ ### Rails gem
96
+
97
+ Add this line to your application's Gemfile:
98
+
99
+ ```ruby
100
+ gem 'bitstyles'
101
+ ```
102
+
103
+ And then execute:
104
+ ```shell
105
+ bundle
106
+ ```
107
+
108
+ Or install it yourself as:
109
+ ```shell
110
+ gem install bitstyles
111
+ ```
112
+
113
+ ### Importing the sass to your project
114
+
115
+ Copy the contents of the bitstyles manifest file (`bitstyles.scss`) to your project’s own sass manifest file (e.g. `app.scss`, `main.scss`) to make use of the entire library. Most likely you’ll not need everything in there, so comment-out the lines of objects you don’t need:
116
+
117
+ ```scss
118
+ @import 'bitstyles/settings/global.setup';
119
+ @import 'bitstyles/settings/global.layout';
120
+ @import 'bitstyles/settings/global.breakpoints';
121
+ @import 'bitstyles/settings/global.animation';
122
+ @import 'bitstyles/settings/global.color-base';
123
+ @import 'bitstyles/settings/global.color-theme';
124
+ @import 'bitstyles/settings/global.typography';
125
+
126
+ // …
127
+
128
+ @import 'bitstyles/objects/icon';
129
+ // @import 'bitstyles/object/button';
130
+ // @import 'bitstyles/object/button-icon';
131
+ @import 'bitstyles/objects/absolute-center';
132
+ ```
133
+
134
+ To change the css output by the library (e.g. standard margins, typographic scale, column count of the grid system…) you must override the variables used to build it. To do this declare any variables with your own values before including the bitstyles settings:
135
+
136
+ ```scss
137
+ @import 'settings/icon-overrides';
138
+ @import 'settings/grid-overrides';
139
+
140
+ @import 'bitstyles/settings/global.setup';
141
+ @import 'bitstyles/settings/global.layout';
142
+ @import 'bitstyles/settings/global.breakpoints';
143
+ @import 'bitstyles/settings/global.animation';
144
+ @import 'bitstyles/settings/global.color-base';
145
+ @import 'bitstyles/settings/global.color-theme';
146
+ @import 'bitstyles/settings/global.typography';
147
+
148
+ @import 'bitstyles/objects/icon';
149
+ // @import 'bitstyles/object/button';
150
+ // @import 'bitstyles/object/button-icon';
151
+ @import 'bitstyles/objects/absolute-center';
152
+ ```
153
+
154
+ For the complete list of variables you can override, look through the various files in the `bitstyles/settings/` folder.
155
+
156
+ ## Developing Bitstyles
157
+ Bitstyles requires `node v5.7.0`. If you have [nvm](https://github.com/creationix/nvm) installed:
158
+
159
+ ```shell
160
+ nvm use
161
+ ```
162
+ will switch to the correct version of nodejs.
163
+
164
+ Clone this repository, `cd` into the folder created, then install dependencies:
165
+
166
+ ```shell
167
+ npm install
168
+ ```
169
+
170
+ ### Build
171
+ To ensure your changes do not break the build, run
172
+
173
+ ```shell
174
+ npm run watch
175
+ ```
176
+
177
+ to recompile sass on every change.
178
+
179
+ For a single one-off build, run
180
+
181
+ ```shell
182
+ npm run build
183
+ ```
184
+
185
+ ## Testing
186
+ ### Installation
187
+ CasperJS, PhantomJS, & BackstopJS all need to be installed globally:
188
+
189
+ ```shell
190
+ npm install -g phantomjs casperjs backstopjs
191
+ ```
192
+
193
+ ### Run tests
194
+ The project uses the visual regression testing system [BackstopJS](https://garris.github.io/BackstopJS/) to compare screenshots of each object before & after changes are made. For existing objects, if there is no visual difference between the reference images and the newly-generated images, your changes are good. For new objects, create new reference images (see below) and commit them to the repo.
195
+
196
+ #### Existing objects
197
+ If you haven’t added a new object to the `backstop.json` file, you can simply run the tests against the already-existing reference images:
198
+
199
+ Start the styleguide server and leave it running:
200
+
201
+ ```shell
202
+ npm run styleguide
203
+ ```
204
+
205
+ To test your changes against the known-good reference images run the tests:
206
+
207
+ ```shell
208
+ npm run test
209
+ ```
210
+
211
+ Short results from the comparison will be displayed on the command line, more detail is available from the in-browser report:
212
+
213
+ ```shell
214
+ backstop openReport
215
+ ```
216
+
217
+ Then go to [http://localhost:3001](http://localhost:3001).
218
+
219
+ ### Before you create your PR
220
+
221
+ Start up the styleguide (see the section below on testing for more information on this):
222
+
223
+ ```shell
224
+ npm run styleguide
225
+ ```
226
+
227
+ …then run the checks:
228
+
229
+ ```shell
230
+ npm run checks
231
+ ```
232
+
233
+ Once all tests pass, you’re good to go.
234
+
235
+ #### New objects
236
+
237
+ If you add new object scenarios to the `backstop.json`, backstop will complain if you try to run these tests without creating reference images for them.
238
+
239
+ Start the styleguide server:
240
+
241
+ ```shell
242
+ npm run styleguide
243
+ ```
244
+
245
+ Then recreate the reference images:
246
+
247
+ ```shell
248
+ npm run test:build
249
+ ```
250
+
251
+ Check the new reference images match what you expect, then commit them and you’re done.
data/Rakefile ADDED
@@ -0,0 +1,2 @@
1
+ require "bundler/gem_tasks"
2
+ task :default => :spec
data/bin/console ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "bitstyles"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
data/bitstyles.gemspec ADDED
@@ -0,0 +1,29 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'bitstyles/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "bitstyles"
8
+ spec.version = Bitstyles::VERSION
9
+ spec.authors = ["Darren Cadwallader", "Charlie Owen"]
10
+ spec.email = ["info@bitcrowd.net"]
11
+
12
+ spec.summary = %q{The CSS library of Bitcrowd GmbH.}
13
+ spec.homepage = "https://github.com/bitcrowd/bitstyles"
14
+ spec.license = "ISC"
15
+
16
+ if spec.respond_to?(:metadata)
17
+ spec.metadata['allowed_push_host'] = "https://rubygems.org"
18
+ else
19
+ raise "RubyGems 2.0 or newer is required to protect against public gem pushes."
20
+ end
21
+
22
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
23
+ spec.bindir = "exe"
24
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
25
+ spec.require_paths = ["lib"]
26
+
27
+ spec.add_development_dependency "bundler", "~> 1.12"
28
+ spec.add_development_dependency "rake", "~> 10.0"
29
+ end
data/bower.json ADDED
@@ -0,0 +1,31 @@
1
+ {
2
+ "name": "bitstyles",
3
+ "description": "The Bitcrowd CSS library",
4
+ "main": "bitstyles.scss",
5
+ "authors": [
6
+ "Charlie Owen",
7
+ "Darren Cadwallader"
8
+ ],
9
+ "license": "ISC",
10
+ "keywords": [
11
+ "css",
12
+ "sass"
13
+ ],
14
+ "homepage": "https://github.com/bitcrowd/bitstyles",
15
+ "moduleType": [],
16
+ "ignore": [
17
+ "**/.*",
18
+ "node_modules",
19
+ "bower_components",
20
+ "test",
21
+ "tests",
22
+ "backstop_data",
23
+ "assets",
24
+ "styleguide",
25
+ "build",
26
+ "package.json",
27
+ "backstop.json",
28
+ "gulpfile.json",
29
+ "stats"
30
+ ]
31
+ }
data/build/.gitignore ADDED
@@ -0,0 +1,4 @@
1
+ # Ignore everything in this directory
2
+ *
3
+ # Except this file
4
+ !.gitignore
@@ -0,0 +1,9 @@
1
+ module Bitstyles
2
+ class Engine < Rails::Engine
3
+
4
+ initializer 'bitstyles.assets.precompile' do |app|
5
+ app.config.assets.paths << root.join('scss').to_s
6
+ end
7
+
8
+ end
9
+ end
@@ -0,0 +1,3 @@
1
+ module Bitstyles
2
+ VERSION = "0.8.0"
3
+ end
data/lib/bitstyles.rb ADDED
@@ -0,0 +1,2 @@
1
+ require "bitstyles/version"
2
+ require "bitstyles/engine"