ad_particles 0.1.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 (47) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +25 -0
  3. data/.npmignore +11 -0
  4. data/.scss-lint.yml +243 -0
  5. data/Gemfile +3 -0
  6. data/README.md +7 -0
  7. data/Rakefile +15 -0
  8. data/ad_particles.gemspec +30 -0
  9. data/atomic/_particles.scss +3 -0
  10. data/atomic/particles/_mixins.scss +7 -0
  11. data/atomic/particles/_modifiers.scss +1 -0
  12. data/atomic/particles/_props.scss +7 -0
  13. data/atomic/particles/mixins/_box.scss +21 -0
  14. data/atomic/particles/mixins/_color.scss +9 -0
  15. data/atomic/particles/mixins/_form.scss +45 -0
  16. data/atomic/particles/mixins/_helper.scss +32 -0
  17. data/atomic/particles/mixins/_layout.scss +155 -0
  18. data/atomic/particles/mixins/_rwd.scss +29 -0
  19. data/atomic/particles/mixins/_type.scss +15 -0
  20. data/atomic/particles/modifiers/_rwd.scss +18 -0
  21. data/atomic/particles/modifiers/_string.scss +3 -0
  22. data/atomic/particles/props/_box.scss +6 -0
  23. data/atomic/particles/props/_color.scss +27 -0
  24. data/atomic/particles/props/_config.scss +4 -0
  25. data/atomic/particles/props/_icon.scss +1 -0
  26. data/atomic/particles/props/_image.scss +4 -0
  27. data/atomic/particles/props/_motion.scss +4 -0
  28. data/atomic/particles/props/_rwd.scss +3 -0
  29. data/atomic/particles/props/_type.scss +51 -0
  30. data/eyeglass-exports.js +7 -0
  31. data/index.js +7 -0
  32. data/lib/ad_particles.rb +8 -0
  33. data/lib/ad_particles/generator.rb +81 -0
  34. data/lib/ad_particles/version.rb +3 -0
  35. data/package.json +37 -0
  36. data/spec/fixtures/_setup.scss +1 -0
  37. data/spec/fixtures/mixins/box.scss +33 -0
  38. data/spec/fixtures/mixins/color.scss +6 -0
  39. data/spec/particles/mixins/box_spec.rb +61 -0
  40. data/spec/particles/mixins/color_spec.rb +20 -0
  41. data/spec/spec_helper.rb +24 -0
  42. data/spec/support/matchers/have_rule.rb +38 -0
  43. data/spec/support/matchers/have_ruleset.rb +23 -0
  44. data/spec/support/matchers/have_value.rb +20 -0
  45. data/spec/support/parser_support.rb +16 -0
  46. data/spec/support/sass_support.rb +12 -0
  47. metadata +201 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 5cdbe3166a09b14edfba2261cb445360f7b48d13
4
+ data.tar.gz: f602add7e91140fe2f4c41d8d52871fd5b893ad0
5
+ SHA512:
6
+ metadata.gz: 4ec1c795771face361bcd684d3c7a3c5b74d78865b0daa23a70565c00ebfff7210713857e0588489f2fc626cd369970d1b078c811045bee67bfb3025e3690916
7
+ data.tar.gz: f56b48eec4073fa3d69006a8001723da975b316a6cd7257fa593a347ed75d132086beb5c511b04096cf4742f7148cfb69f627bc8f26d51fbf02580668aa245b8
data/.gitignore ADDED
@@ -0,0 +1,25 @@
1
+ .DS_Store
2
+
3
+ *~
4
+ \#*
5
+ .\#*
6
+
7
+ .idea
8
+ .sass-cache
9
+ ## VIM
10
+ *.swp
11
+ tags
12
+
13
+ rdoc
14
+ pkg
15
+ *.log
16
+
17
+ ## PROJECT::SPECIFIC
18
+ tmp
19
+ .bundle
20
+ doc
21
+ Gemfile.lock
22
+ Gemfile.local
23
+
24
+ ## Ruby versioniser
25
+ .ruby-version
data/.npmignore ADDED
@@ -0,0 +1,11 @@
1
+ .gitignore
2
+ .sass-cache
3
+ .scss-lint.yml
4
+ bin/
5
+ atomic_particles.gemspec
6
+ Gemfile
7
+ Gemfile.lock
8
+ lib/
9
+ pkg/
10
+ Rakefile
11
+ spec/
data/.scss-lint.yml ADDED
@@ -0,0 +1,243 @@
1
+ scss_files: "**/*.scss"
2
+
3
+ severity: warning
4
+
5
+ linters:
6
+ BangFormat:
7
+ enabled: true
8
+ space_before_bang: true
9
+ space_after_bang: false
10
+
11
+ BemDepth:
12
+ enabled: false
13
+
14
+ BorderZero:
15
+ enabled: true
16
+ convention: zero
17
+
18
+ ChainedClasses:
19
+ enabled: false
20
+
21
+ ColorKeyword:
22
+ enabled: true
23
+
24
+ ColorVariable:
25
+ enabled: false
26
+
27
+ Comment:
28
+ enabled: true
29
+ style: silent
30
+
31
+ DebugStatement:
32
+ enabled: true
33
+
34
+ DeclarationOrder:
35
+ enabled: true
36
+
37
+ DisableLinterReason:
38
+ enabled: false
39
+
40
+ DuplicateProperty:
41
+ enabled: true
42
+
43
+ ElsePlacement:
44
+ enabled: true
45
+ style: same_line
46
+
47
+ EmptyLineBetweenBlocks:
48
+ enabled: true
49
+ ignore_single_line_blocks: true
50
+
51
+ EmptyRule:
52
+ enabled: true
53
+
54
+ ExtendDirective:
55
+ enabled: false
56
+
57
+ FinalNewline:
58
+ enabled: true
59
+ present: true
60
+
61
+ HexLength:
62
+ enabled: true
63
+ style: short
64
+
65
+ HexNotation:
66
+ enabled: true
67
+ style: lowercase
68
+
69
+ HexValidation:
70
+ enabled: true
71
+
72
+ IdSelector:
73
+ enabled: true
74
+
75
+ ImportantRule:
76
+ enabled: true
77
+
78
+ ImportPath:
79
+ enabled: true
80
+ leading_underscore: false
81
+ filename_extension: false
82
+
83
+ Indentation:
84
+ enabled: true
85
+ allow_non_nested_indentation: false
86
+ character: space
87
+ width: 2
88
+
89
+ LeadingZero:
90
+ enabled: true
91
+ style: include_zero
92
+
93
+ MergeableSelector:
94
+ enabled: true
95
+ force_nesting: true
96
+
97
+ NameFormat:
98
+ enabled: false
99
+ allow_leading_underscore: true
100
+ convention: hyphenated_lowercase
101
+
102
+ NestingDepth:
103
+ enabled: true
104
+ max_depth: 3
105
+ ignore_parent_selectors: false
106
+
107
+ PlaceholderInExtend:
108
+ enabled: true
109
+
110
+ PrivateNamingConvention:
111
+ enabled: false
112
+ prefix: _
113
+
114
+ PropertyCount:
115
+ enabled: false
116
+
117
+ PropertySortOrder:
118
+ enabled: true
119
+ ignore_unspecified: false
120
+ min_properties: 2
121
+ separate_groups: false
122
+
123
+ PropertySpelling:
124
+ enabled: true
125
+ extra_properties: []
126
+ disabled_properties: []
127
+
128
+ PropertyUnits:
129
+ enabled: true
130
+ global: [
131
+ 'ch', 'em', 'ex', 'rem',
132
+ 'cm', 'in', 'mm', 'pc', 'pt', 'px', 'q',
133
+ 'vh', 'vw', 'vmin', 'vmax',
134
+ 'deg', 'grad', 'rad', 'turn',
135
+ 'ms', 's',
136
+ 'Hz', 'kHz',
137
+ 'dpi', 'dpcm', 'dppx',
138
+ '%']
139
+ properties:
140
+ line-height: []
141
+
142
+ PseudoElement:
143
+ enabled: false
144
+
145
+ QualifyingElement:
146
+ enabled: true
147
+ allow_element_with_attribute: false
148
+ allow_element_with_class: false
149
+ allow_element_with_id: false
150
+
151
+ SelectorDepth:
152
+ enabled: true
153
+ max_depth: 2
154
+
155
+ SelectorFormat:
156
+ enabled: true
157
+ convention: hyphenated_BEM
158
+
159
+ Shorthand:
160
+ enabled: true
161
+ allowed_shorthands: [1, 2, 3]
162
+
163
+ SingleLinePerProperty:
164
+ enabled: true
165
+ allow_single_line_rule_sets: true
166
+
167
+ SingleLinePerSelector:
168
+ enabled: true
169
+
170
+ SpaceAfterComma:
171
+ enabled: true
172
+ style: one_space
173
+
174
+ SpaceAfterPropertyColon:
175
+ enabled: true
176
+ style: one_space
177
+
178
+ SpaceAfterPropertyName:
179
+ enabled: true
180
+
181
+ SpaceAfterVariableColon:
182
+ enabled: true
183
+ style: at_least_one_space
184
+
185
+ SpaceAfterVariableName:
186
+ enabled: true
187
+
188
+ SpaceAroundOperator:
189
+ enabled: true
190
+ style: one_space
191
+
192
+ SpaceBeforeBrace:
193
+ enabled: true
194
+ style: space
195
+ allow_single_line_padding: true
196
+
197
+ SpaceBetweenParens:
198
+ enabled: true
199
+ spaces: 0
200
+
201
+ StringQuotes:
202
+ enabled: true
203
+ style: double_quotes
204
+
205
+ TrailingSemicolon:
206
+ enabled: true
207
+
208
+ TrailingWhitespace:
209
+ enabled: true
210
+
211
+ TrailingZero:
212
+ enabled: true
213
+
214
+ TransitionAll:
215
+ enabled: true
216
+
217
+ UnnecessaryMantissa:
218
+ enabled: true
219
+
220
+ UnnecessaryParentReference:
221
+ enabled: true
222
+
223
+ UrlFormat:
224
+ enabled: true
225
+
226
+ UrlQuotes:
227
+ enabled: true
228
+
229
+ VariableForProperty:
230
+ enabled: false
231
+ properties: []
232
+
233
+ VendorPrefix:
234
+ enabled: false
235
+ identifier_list: base
236
+ additional_identifiers: []
237
+ excluded_identifiers: []
238
+
239
+ ZeroUnit:
240
+ enabled: true
241
+
242
+ Compass::*:
243
+ enabled: false
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source "https://rubygems.org"
2
+
3
+ gemspec
data/README.md ADDED
@@ -0,0 +1,7 @@
1
+ # Atomic Design : Particles
2
+
3
+ This is SASS Module that defines a base set of variables that can used as a
4
+ standard in component styling & consistent theming. Particles, although not
5
+ originally discussed by Atomic Design creator Brad Frost, are the abstract &
6
+ configuration structures that shape the Atomic design structure from the ground
7
+ up.
data/Rakefile ADDED
@@ -0,0 +1,15 @@
1
+
2
+ require "bundler"
3
+ require "rspec/core/rake_task"
4
+ require "scss_lint/rake_task"
5
+
6
+ SCSSLint::RakeTask.new(:scss_lint) do |t|
7
+ t.config = ".scss-lint.yml"
8
+ t.files = [
9
+ "atomic/particles"
10
+ ]
11
+ end
12
+ Bundler::GemHelper.install_tasks
13
+ RSpec::Core::RakeTask.new(:spec)
14
+
15
+ task :default => [:spec, :scss_lint]
@@ -0,0 +1,30 @@
1
+ $:.push File.expand_path("../lib", __FILE__)
2
+ require "ad_particles/version"
3
+
4
+ Gem::Specification.new do |s|
5
+ s.add_development_dependency "css_parser", '~> 1.4', '>= 1.4.1'
6
+ s.add_development_dependency "rake", "~> 11.1", ">= 11.1.2"
7
+ s.add_development_dependency "rspec", "~> 3.4", '>= 3.4.0'
8
+ s.add_development_dependency "scss_lint", "0.48.0"
9
+ s.add_runtime_dependency "sass", "~> 3.4", ">= 3.4.22"
10
+ s.add_runtime_dependency "thor", "~> 0.19.1"
11
+ s.authors = [ "Erik Isaksen" ]
12
+ s.description = <<-DESC
13
+ ad_particles is SASS Module that defines a base set of variables that can used as a
14
+ standard in component styling & consistent theming. Particles, although not
15
+ originally discussed by Atomic Design creator Brad Frost, are the abstract &
16
+ configuration structures that shape the Atomic design structure from the ground
17
+ up.
18
+ DESC
19
+ s.email = "nevraeka@gmail.com"
20
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
21
+ s.files = `git ls-files`.split("\n")
22
+ s.homepage = "https://github.com/thewebplatform/ad-particles"
23
+ s.license = "MIT"
24
+ s.name = "ad_particles"
25
+ s.platform = Gem::Platform::RUBY
26
+ s.require_paths = ["lib"]
27
+ s.summary = "A SASS Module that defines a base set of variables"
28
+ s.test_files = `git ls-files -- {spec}/*`.split("\n")
29
+ s.version = AtomicDesignParticles::VERSION
30
+ end
@@ -0,0 +1,3 @@
1
+ @import "particles/props";
2
+ @import "particles/modifiers";
3
+ @import "particles/mixins";
@@ -0,0 +1,7 @@
1
+ @import "mixins/box";
2
+ @import "mixins/color";
3
+ @import "mixins/form";
4
+ @import "mixins/helper";
5
+ @import "mixins/layout";
6
+ @import "mixins/rwd";
7
+ @import "mixins/type";
@@ -0,0 +1 @@
1
+ @import "modifiers/rwd";
@@ -0,0 +1,7 @@
1
+ @import "props/config";
2
+ @import "props/box";
3
+ @import "props/color";
4
+ @import "props/image";
5
+ @import "props/motion";
6
+ @import "props/rwd";
7
+ @import "props/type";
@@ -0,0 +1,21 @@
1
+ @import "../props/color";
2
+ @import "../props/box";
3
+
4
+ @mixin box-border-rounded($radius: $box-border_radius) {
5
+ border-radius: $radius;
6
+ }
7
+
8
+ @mixin box-border($color: $color-gray--light, $radius: 0) {
9
+ border: 1px solid $color;
10
+ @if($radius != 0){
11
+ @include box-border-rounded($radius);
12
+ }
13
+ }
14
+
15
+ @mixin box-border--primary {
16
+ @include box-border($color-brand--primary);
17
+ }
18
+
19
+ @mixin box-border--secondary {
20
+ @include box-border($color-brand--secondary);
21
+ }
@@ -0,0 +1,9 @@
1
+ @import "../props/color";
2
+
3
+ @mixin color-gray--fade {
4
+ background: $color-gray;
5
+ background-image: -o-linear-gradient(top, $color-black--alpha 0%, $color-gray--alpha_dark 90%, $color-gray--alpha_light 100%);
6
+ background-image: -moz-linear-gradient(top, $color-black--alpha 0%, $color-gray--alpha_dark 90%, $color-gray--alpha_light 100%);
7
+ background-image: -webkit-linear-gradient(top, $color-black--alpha 0%, $color-gray--alpha_dark 90%, $color-gray--alpha_light 100%);
8
+ background-image: linear-gradient(top, $color-black--alpha 0%, $color-gray--alpha_dark 90%, $color-gray--alpha_light 100%);
9
+ }
@@ -0,0 +1,45 @@
1
+
2
+ @import "../props/color";
3
+ @import "../props/type";
4
+ @import "../props/box";
5
+ @import "type";
6
+
7
+ @mixin placeholder($color: $color_gray--light) {
8
+
9
+ &::-webkit-input-placeholder {
10
+ color: $color;
11
+ opacity: 0.54;
12
+ }
13
+
14
+ &:-moz-placeholder {
15
+ color: $color;
16
+ }
17
+
18
+ &::-moz-placeholder {
19
+ color: $color;
20
+ }
21
+
22
+ &:-ms-input-placeholder {
23
+ color: $color;
24
+ }
25
+
26
+ }
27
+
28
+ @mixin form-focus_outline($color: $color-brand--primary) {
29
+
30
+ &:focus {
31
+ outline-color: $color;
32
+ outline-width: 1px;
33
+ }
34
+
35
+ }
36
+
37
+ @mixin form-textbox($color: $color-brand--primary) {
38
+ display: inline-block;
39
+ @include type-baseline;
40
+ color: $color;
41
+ line-height: $type-leading;
42
+ padding: $box-spacing--thinner;
43
+ @include box-border($color);
44
+ @include form-focus_outline($color);
45
+ }