bitters 0.9.5 → 0.10.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NjQ3N2RiNzdmNzA5YjMzOGI2NjhkMDgyMjljYzJkZDNiMmVhZWY1Ng==
4
+ MDExM2E1YTc2ZWExMWVhOGIwNWFiNGQ5OGQ4OTdmYTg2MzM5MmE3OQ==
5
5
  data.tar.gz: !binary |-
6
- NGEwY2MzYTczMDQ0Mzk1MmJhOTM2YWZhODE1M2E3YWMyMWVkMTJjMg==
6
+ NjlmNTFjNmYyOTdjNWNkYjcxOWI3MTM0OGUyYmVkNWJlMTdjZjI3NA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NmJkZDViYTI4MDVkMDM1YWExNTk2MmJjMjdiZDgwODFkMDAzOTZkMWI2ZTdj
10
- ZGY0YThlYThkMjRhYmM2NWIyNWI4YWY2NTIwMzJhNDdhZjgxZmIyMmNiOWYy
11
- YzM5MTcxYWE0ZDA0OWMzM2E3N2IwNjdhYjE0MzUzN2ViY2QwYWY=
9
+ ZmY4OGFkNDA3ZmIwYTllMWZiNzBlOWE3MzNjMTFmMGJhZTUyMTczZTE2MzNm
10
+ MDdiZjFkODFlNTMzZWFiYWI1YjViMGYxY2NlYmE3NGUxODZlY2ZjNDQyYjY3
11
+ ZmY2MGRkOThjNGFkODgzN2MzODA2ZmRmZWQwNjgxOGNiNDQ2NDY=
12
12
  data.tar.gz: !binary |-
13
- NjU2YjlkMzU1NWFjMjJmZmIzODcyYTM4MDVhOTk0M2M4NTdkNzFlNWRiNzQz
14
- MWQyYzQ1Yzg4MGY0NWE2MGZlNGExMjBiN2U4MGZkMjliNmQxMTRkZDhhMTY4
15
- NmIyMzY4NTZlNGEwYzNhNjYwYzkzOGZlMmE0OTNhZGE5M2NkMjQ=
13
+ NmQ0ZDlkZTIzZWI5NmYwY2RjOTQzNmFmYmQ0MTRjNWRiZWEzMTE5N2ViNzEz
14
+ ZjE4ZTcwOTEyYzkzODM1MDI3NmYzNDBiMGJiMGU2NzcwM2VkZTg0OTlmN2Nj
15
+ YjA5OWZhZDIxYTc2MTA4ODdkYTU4ZDVhNmEyODgxNzU5Mzc4ZWU=
data/CONTRIBUTING.md ADDED
@@ -0,0 +1,35 @@
1
+ We love pull requests. Here's a quick guide:
2
+
3
+ 1. Fork the repository.
4
+ 2. Make your changes in a topic branch.
5
+ 4. Squash your commits into a single one (more on that [here](http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html)).
6
+ 5. Rebase against `origin/master`, push to your fork and submit a pull request.
7
+ 6. If you are writing a new feature please add documentation for it by making another pull request to the `gh_pages` branch.
8
+
9
+ At this point you're waiting on us. We like to at least comment on, if not
10
+ accept, pull requests within three business days (and, typically, one business
11
+ day). We may suggest some changes or improvements or alternatives.
12
+
13
+ Some things that will increase the chance that your pull request is accepted:
14
+
15
+ * Fix a bug, refactor code or expand an existing feature.
16
+ * Use the right syntax and naming conventions.
17
+ * Update parts of the documentation that are affected by your contribution.
18
+
19
+ **Git Commit Messages**
20
+
21
+ * Capitalize your commit messages.
22
+ * Start your message with a verb.
23
+ * Use present tense.
24
+ * Refer to the issue/PR number in your squashed commit message.
25
+
26
+ **SCSS Style Guide**
27
+
28
+ * Two spaces, no tabs.
29
+ * Dashes instead of underscores or camel case: `linear-gradient` **not** `linear_gradient` or `linearGradient`
30
+ * Names should be descriptive and written in full-words: `$all-text-inputs-hover` **not** `$hover` or `$alltxthvr`
31
+ * Space between property and value: `width: 20px` **not** `width:20px`
32
+ * Declarations within a block should be ordered alphabetically.
33
+ * Blank lines between rules.
34
+ * No trailing whitespace. Blank lines should not have any space.
35
+
data/README.md CHANGED
@@ -22,27 +22,36 @@ Then `cd` to your Sass directory and run:
22
22
  bitters install
23
23
  ```
24
24
 
25
- The generated folder will contain all Bitters files.
25
+ A `base` directory will be generated which contains all of the Bitters files.
26
26
 
27
- Import Bitters after Bourbon in your `application.css.scss`. All additional stylesheets should be imported below Bitters.
27
+ Import Bitters after Bourbon in your `application.css.scss` or main manifest file. All additional stylesheets should be imported below Bitters.
28
28
 
29
- If you are using Neat, import it after Bitters. Be sure to not include any of Neat's mixins or functions in the Bitters files when modifying Bitters.
29
+ When using Neat, have the following line in `_base.scss` uncommented:
30
30
 
31
31
  ```scss
32
- @import "bourbon";
33
- @import "bitters/bitters";
34
- @import "neat";
32
+ @import 'grid-settings';
33
+ ```
34
+
35
+ If you are using Neat, import it after Bitters.
36
+
37
+ ```scss
38
+ @import 'bourbon';
39
+ @import 'base/base';
40
+ @import 'neat';
35
41
 
36
42
  // All other imports
37
43
  ```
38
44
 
39
- Also, when using Neat, have the following lines in "_bitters.scss" uncommented:
45
+ If you want to use Neat functions in Bitters files you can `@import 'grid-settings';` before Neat, remove `@import 'grid-settings';` from `_base.scss` and import the rest of bitters after. eg:
40
46
 
41
47
  ```scss
42
- @import "neat-helpers"; // or "../neat/neat-helpers" when not in Rails
43
- @import "grid-settings";
44
- ```
48
+ @import 'bourbon';
49
+ @import 'base/grid-settings';
50
+ @import 'neat';
51
+ @import 'base/base';
45
52
 
53
+ // All other imports
54
+ ```
46
55
  We suggest using [Normalize](http://necolas.github.io/normalize.css/) for a CSS reset with Bitters.
47
56
 
48
57
  Getting Started
data/Rakefile CHANGED
@@ -1 +1,8 @@
1
1
  require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task :default => :spec
7
+ task :install => :spec
8
+ task :release => :spec
@@ -0,0 +1,24 @@
1
+ // Bitters v0.10.0
2
+ // http://bitters.bourbon.io
3
+
4
+ // Variables
5
+ @import 'variables';
6
+
7
+ // Neat Settings -- uncomment if using Neat -- must be imported before Neat
8
+ // @import 'grid-settings';
9
+
10
+ // Mixins
11
+ @import 'mixins/flash';
12
+
13
+ // Extends
14
+ @import 'extends/button';
15
+ @import 'extends/clearfix';
16
+ @import 'extends/hide-text';
17
+
18
+ // Typography and Elements
19
+ @import 'typography';
20
+ @import 'forms';
21
+ @import 'tables';
22
+ @import 'lists';
23
+ @import 'flashes';
24
+ @import 'buttons';
@@ -2,6 +2,7 @@ button,
2
2
  input[type="submit"] {
3
3
  @extend %button;
4
4
  @include appearance(none);
5
+ border: none;
5
6
  cursor: pointer;
6
7
  user-select: none;
7
8
  vertical-align: middle;
@@ -1,3 +1,7 @@
1
+ %flash-alert {
2
+ @include flash($alert-color);
3
+ }
4
+
1
5
  %flash-error {
2
6
  @include flash($error-color);
3
7
  }
@@ -1,12 +1,12 @@
1
+ @import 'neat-helpers'; // or '../neat/neat-helpers' when not in Rails
2
+
1
3
  // Neat Overrides
2
- ///////////////////////////////////////////////////////////////////////////////
3
4
  // $column: 90px;
4
5
  // $gutter: 30px;
5
6
  // $grid-columns: 12;
6
7
  // $max-width: em(1088);
7
8
 
8
9
  // Neat Breakpoints
9
- ///////////////////////////////////////////////////////////////////////////////
10
10
  $medium-screen: em(640);
11
11
  $large-screen: em(860);
12
12
 
@@ -17,7 +17,6 @@ ul, ol {
17
17
  }
18
18
 
19
19
  dl {
20
- line-height: $base-line-height;
21
20
  margin-bottom: $base-line-height / 2;
22
21
 
23
22
  dt {
@@ -1,14 +1,15 @@
1
1
  body {
2
+ -webkit-font-smoothing: antialiased;
3
+ background-color: $base-background-color;
2
4
  color: $base-font-color;
3
5
  font-family: $base-font-family;
4
6
  font-size: $base-font-size;
5
- -webkit-font-smoothing: antialiased;
6
- line-height: $base-line-height;
7
+ line-height: $unitless-line-height;
7
8
  }
8
9
 
9
10
  h1, h2, h3, h4, h5, h6 {
10
11
  font-family: $header-font-family;
11
- line-height: 1.25em;
12
+ line-height: $header-line-height;
12
13
  margin: 0;
13
14
  text-rendering: optimizeLegibility; // Fix the character spacing for headings
14
15
  }
@@ -42,9 +43,9 @@ p {
42
43
  }
43
44
 
44
45
  a {
46
+ @include transition(color 0.1s linear);
45
47
  color: $base-link-color;
46
48
  text-decoration: none;
47
- @include transition(color 0.1s linear);
48
49
 
49
50
  &:hover {
50
51
  color: $hover-link-color;
@@ -69,24 +70,6 @@ img {
69
70
  max-width: 100%;
70
71
  }
71
72
 
72
- abbr, acronym {
73
- border-bottom: 1px dotted $base-border-color;
74
- cursor: help;
75
- }
76
-
77
- address {
78
- display: block;
79
- margin: 0 0 ($base-line-height / 2);
80
- }
81
-
82
- hgroup {
83
- margin-bottom: $base-line-height / 2;
84
- }
85
-
86
- del {
87
- color: lighten($base-font-color, 15);
88
- }
89
-
90
73
  blockquote {
91
74
  border-left: 2px solid $base-border-color;
92
75
  color: lighten($base-font-color, 15);
@@ -1,20 +1,17 @@
1
1
  // Typography
2
- ///////////////////////////////////////////////////////////////////////////////
3
2
  $sans-serif: $helvetica;
4
3
  $serif: $georgia;
5
-
6
4
  $base-font-family: $sans-serif;
7
5
  $header-font-family: $base-font-family;
8
6
 
9
7
  // Sizes
10
- ///////////////////////////////////////////////////////////////////////////////
11
8
  $base-font-size: 1em;
12
9
  $base-line-height: $base-font-size * 1.5;
10
+ $unitless-line-height: $base-line-height / ($base-line-height * 0 + 1); // Strip units from line-height: https://developer.mozilla.org/en-US/docs/Web/CSS/line-height#Prefer_unitless_numbers_for_line-height_values
11
+ $header-line-height: $base-font-size * 1.25;
13
12
  $base-border-radius: em(3);
14
13
 
15
14
  // Colors
16
- ///////////////////////////////////////////////////////////////////////////////
17
-
18
15
  $blue: #477DCA;
19
16
  $dark-gray: #333;
20
17
  $medium-gray: #999;
@@ -23,21 +20,24 @@ $light-red: #FBE3E4;
23
20
  $light-yellow: #FFF6BF;
24
21
  $light-green: #E6EFC2;
25
22
 
26
- // Body Color
27
- $base-body-color: white;
23
+ // Background Color
24
+ $base-background-color: white;
28
25
 
29
- // Font Colors
26
+ // Font Colors
30
27
  $base-font-color: $dark-gray;
31
28
  $base-accent-color: $blue;
32
29
 
33
- // Text Link Colors
30
+ // Link Colors
34
31
  $base-link-color: $base-accent-color;
35
32
  $hover-link-color: darken($base-accent-color, 15);
33
+ $base-button-color: $base-link-color;
34
+ $hover-button-color: $hover-link-color;
36
35
 
37
36
  // Border color
38
37
  $base-border-color: $light-gray;
39
38
 
40
39
  // Flash Colors
40
+ $alert-color: $light-yellow;
41
41
  $error-color: $light-red;
42
42
  $notice-color: $light-yellow;
43
43
  $success-color: $light-green;
@@ -51,6 +51,3 @@ $form-box-shadow: inset 0 1px 3px rgba(0,0,0,0.06);
51
51
  $form-box-shadow-focus: $form-box-shadow, 0 0 5px rgba(darken($form-border-color-focus, 5), 0.7);
52
52
  $form-font-size: $base-font-size;
53
53
  $form-font-family: $base-font-family;
54
-
55
- // Buttons
56
- $button-style: simple;
@@ -1,7 +1,17 @@
1
1
  %button {
2
- @include button($button-style, $base-accent-color);
3
2
  -webkit-font-smoothing: antialiased;
3
+ background-color: $base-button-color;
4
+ border-radius: $base-border-radius;
5
+ color: white;
6
+ display: inline-block;
4
7
  font-size: $base-font-size;
5
8
  font-weight: bold;
6
- line-height: 1em;
9
+ line-height: 1;
10
+ padding: .75em 1em;
11
+ text-decoration: none;
12
+
13
+ &:hover {
14
+ background-color: $hover-button-color;
15
+ color: white;
16
+ }
7
17
  }
data/bitters.gemspec CHANGED
@@ -20,8 +20,9 @@ Gem::Specification.new do |spec|
20
20
 
21
21
  spec.add_development_dependency 'bundler', '~> 1.3'
22
22
  spec.add_development_dependency 'rake'
23
+ spec.add_development_dependency 'rspec'
23
24
 
24
- spec.add_dependency 'bourbon', '>= 3.1'
25
+ spec.add_dependency 'bourbon', '>= 3.2'
25
26
  spec.add_dependency 'sass', '>= 3.2'
26
27
  spec.add_dependency 'thor'
27
28
  end
@@ -16,7 +16,7 @@ module Bitters
16
16
  puts "Bitters files already installed, doing nothing."
17
17
  else
18
18
  install_files
19
- puts "Bitters files installed to #{install_path}/bitters"
19
+ puts "Bitters files installed to #{install_path}/base"
20
20
  end
21
21
  end
22
22
 
@@ -53,7 +53,7 @@ module Bitters
53
53
  end
54
54
 
55
55
  def install_path
56
- Pathname.new(options[:path].to_s).join('bitters')
56
+ Pathname.new(options[:path].to_s).join('base')
57
57
  end
58
58
 
59
59
  def install_files
@@ -62,7 +62,7 @@ module Bitters
62
62
  end
63
63
 
64
64
  def remove_bitters_directory
65
- FileUtils.rm_rf("bitters")
65
+ FileUtils.rm_rf("base")
66
66
  end
67
67
 
68
68
  def all_stylesheets
@@ -1,3 +1,3 @@
1
1
  module Bitters
2
- VERSION = "0.9.5"
2
+ VERSION = "0.10.0"
3
3
  end
@@ -0,0 +1,17 @@
1
+ require 'spec_helper'
2
+ require 'sass'
3
+ require 'bourbon'
4
+
5
+ describe Bitters do
6
+ after do
7
+ `rm -rf spec/fixtures/base`
8
+ end
9
+
10
+ it 'compiles to valid css' do
11
+ `bitters install --path spec/fixtures`
12
+
13
+ Sass.compile_file('spec/fixtures/application.scss', '/tmp/output.css')
14
+
15
+ expect(Pathname('/tmp/output.css')).to exist
16
+ end
17
+ end
@@ -0,0 +1,2 @@
1
+ @import 'bourbon';
2
+ @import 'base/base';
@@ -0,0 +1,3 @@
1
+ $LOAD_PATH << File.join('../lib')
2
+
3
+ require 'bitters'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bitters
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.5
4
+ version: 0.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kyle Fiedler
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-05-22 00:00:00.000000000 Z
12
+ date: 2014-06-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -39,20 +39,34 @@ dependencies:
39
39
  - - ! '>='
40
40
  - !ruby/object:Gem::Version
41
41
  version: '0'
42
+ - !ruby/object:Gem::Dependency
43
+ name: rspec
44
+ requirement: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - ! '>='
47
+ - !ruby/object:Gem::Version
48
+ version: '0'
49
+ type: :development
50
+ prerelease: false
51
+ version_requirements: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - ! '>='
54
+ - !ruby/object:Gem::Version
55
+ version: '0'
42
56
  - !ruby/object:Gem::Dependency
43
57
  name: bourbon
44
58
  requirement: !ruby/object:Gem::Requirement
45
59
  requirements:
46
60
  - - ! '>='
47
61
  - !ruby/object:Gem::Version
48
- version: '3.1'
62
+ version: '3.2'
49
63
  type: :runtime
50
64
  prerelease: false
51
65
  version_requirements: !ruby/object:Gem::Requirement
52
66
  requirements:
53
67
  - - ! '>='
54
68
  - !ruby/object:Gem::Version
55
- version: '3.1'
69
+ version: '3.2'
56
70
  - !ruby/object:Gem::Dependency
57
71
  name: sass
58
72
  requirement: !ruby/object:Gem::Requirement
@@ -90,11 +104,12 @@ extensions: []
90
104
  extra_rdoc_files: []
91
105
  files:
92
106
  - .gitignore
107
+ - CONTRIBUTING.md
93
108
  - Gemfile
94
109
  - LICENSE
95
110
  - README.md
96
111
  - Rakefile
97
- - app/assets/stylesheets/_bitters.scss
112
+ - app/assets/stylesheets/_base.scss
98
113
  - app/assets/stylesheets/_buttons.scss
99
114
  - app/assets/stylesheets/_flashes.scss
100
115
  - app/assets/stylesheets/_forms.scss
@@ -105,16 +120,16 @@ files:
105
120
  - app/assets/stylesheets/_variables.scss
106
121
  - app/assets/stylesheets/extends/_button.scss
107
122
  - app/assets/stylesheets/extends/_clearfix.scss
108
- - app/assets/stylesheets/extends/_ellipsis.scss
109
- - app/assets/stylesheets/extends/_extends.scss
110
123
  - app/assets/stylesheets/extends/_hide-text.scss
111
124
  - app/assets/stylesheets/mixins/_flash.scss
112
- - app/assets/stylesheets/mixins/_mixins.scss
113
125
  - bin/bitters
114
126
  - bitters.gemspec
115
127
  - lib/bitters.rb
116
128
  - lib/bitters/generator.rb
117
129
  - lib/bitters/version.rb
130
+ - spec/bitters_spec.rb
131
+ - spec/fixtures/application.scss
132
+ - spec/spec_helper.rb
118
133
  homepage: http://github.com/thoughtbot/bitters
119
134
  licenses:
120
135
  - MIT
@@ -139,4 +154,7 @@ rubygems_version: 2.2.2
139
154
  signing_key:
140
155
  specification_version: 4
141
156
  summary: Base styles for Web design
142
- test_files: []
157
+ test_files:
158
+ - spec/bitters_spec.rb
159
+ - spec/fixtures/application.scss
160
+ - spec/spec_helper.rb
@@ -1,16 +0,0 @@
1
- // Neat Settings -- uncomment if using Neat
2
- ///////////////////////////////////////////////////////////////////////////////
3
- // @import 'neat-helpers'; // or '../neat/neat-helpers' when not in Rails
4
- // @import 'grid-settings';
5
-
6
-
7
- // Bitters
8
- ///////////////////////////////////////////////////////////////////////////////
9
- @import 'variables';
10
- @import 'extends/extends';
11
- @import 'mixins/mixins';
12
- @import 'typography';
13
- @import 'forms';
14
- @import 'tables';
15
- @import 'lists';
16
- @import 'flashes';
@@ -1,3 +0,0 @@
1
- %ellipsis {
2
- @include ellipsis;
3
- }
@@ -1,4 +0,0 @@
1
- @import 'button';
2
- @import 'clearfix';
3
- @import 'ellipsis';
4
- @import 'hide-text';
@@ -1 +0,0 @@
1
- @import 'flash';