bitters 0.9.3 → 0.9.4

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -24,7 +24,9 @@ bitters install
24
24
 
25
25
  The generated folder will contain all Bitters files.
26
26
 
27
- Import Bitters after Bourbon in your `application.css.scss`. If you are using the Neat overrides found in `_grid-settings.scss`, be sure to `@import "bitters/bitters"` between Bourbon and Neat. Be sure to not include any of Neat's mixins or functions in the Bitters files when modifying Bitters. All additional stylesheets should be imported below Bitters:
27
+ Import Bitters after Bourbon in your `application.css.scss`. All additional stylesheets should be imported below Bitters.
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.
28
30
 
29
31
  ```scss
30
32
  @import "bourbon";
@@ -34,9 +36,14 @@ Import Bitters after Bourbon in your `application.css.scss`. If you are using th
34
36
  // All other imports
35
37
  ```
36
38
 
39
+ Also, when using Neat, have the following lines in "_bitters.scss" uncommented:
37
40
 
38
- We suggest using [Normalize](http://necolas.github.io/normalize.css/) for a CSS reset with Bitters.
41
+ ```scss
42
+ @import "neat-helpers"; // or "../neat/neat-helpers" when not in Rails
43
+ @import "grid-settings";
44
+ ```
39
45
 
46
+ We suggest using [Normalize](http://necolas.github.io/normalize.css/) for a CSS reset with Bitters.
40
47
 
41
48
  Getting Started
42
49
  ===
@@ -59,6 +66,9 @@ All lists have stripped out styles. No bullets, no left padding. To add back the
59
66
  ### Forms
60
67
  Adds basic styles all form elements. The variables at the top of the file all inherit from the variables file but make it really easy to be overridden.
61
68
 
69
+ ### Buttons
70
+ Basic style for `button` and `input[type="submit"]`. Button style can be changed by setting the `$button-style` variable to one of the [Bourbon](http://bourbon.io) button style [options](http://bourbon.io/docs/#buttons).
71
+
62
72
  ### Flashes
63
73
  Used for any error, warning or success messages in applications or forms. Specifically made for rails application notices.
64
74
 
@@ -1,16 +1,16 @@
1
1
  // Neat Settings -- uncomment if using Neat
2
2
  ///////////////////////////////////////////////////////////////////////////////
3
- // @import "neat-helpers"; // or "neat/neat-helpers" when not in Rails
4
- // @import "grid-settings";
3
+ // @import 'neat-helpers'; // or '../neat/neat-helpers' when not in Rails
4
+ // @import 'grid-settings';
5
5
 
6
6
 
7
7
  // Bitters
8
8
  ///////////////////////////////////////////////////////////////////////////////
9
- @import "variables";
10
- @import "extends/base";
11
- @import "mixins/base";
12
- @import "typography";
13
- @import "forms";
14
- @import "tables";
15
- @import "lists";
16
- @import "flashes";
9
+ @import 'variables';
10
+ @import 'extends/base';
11
+ @import 'mixins/base';
12
+ @import 'typography';
13
+ @import 'forms';
14
+ @import 'tables';
15
+ @import 'lists';
16
+ @import 'flashes';
@@ -0,0 +1,9 @@
1
+ button,
2
+ input[type="submit"] {
3
+ @extend %button;
4
+ @include appearance(none);
5
+ cursor: pointer;
6
+ user-select: none;
7
+ vertical-align: middle;
8
+ white-space: nowrap;
9
+ }
@@ -1,12 +1,3 @@
1
- $form-border-color: $base-border-color;
2
- $form-border-color-hover: darken($base-border-color, 10);
3
- $form-border-color-focus: $base-accent-color;
4
- $form-border-radius: $base-border-radius;
5
- $form-box-shadow: inset 0 1px 3px hsla(0, 0%, 0%, 0.06);
6
- $form-box-shadow-focus: $form-box-shadow, 0 0 5px rgba(darken($form-border-color-focus, 5), 0.7);
7
- $form-font-size: $base-font-size;
8
- $form-font-family: $base-font-family;
9
-
10
1
  fieldset {
11
2
  background: lighten($base-border-color, 10);
12
3
  border: 1px solid $base-border-color;
@@ -75,6 +66,8 @@ input[type="checkbox"], input[type="radio"] {
75
66
  }
76
67
 
77
68
  input[type="file"] {
69
+ margin-bottom: $base-line-height / 2;
70
+ padding-bottom: ($base-line-height / 3);
78
71
  width: 100%;
79
72
  }
80
73
 
@@ -83,13 +76,3 @@ select {
83
76
  max-width: 100%;
84
77
  margin-bottom: $base-line-height;
85
78
  }
86
-
87
- button,
88
- input[type="submit"] {
89
- @extend %button;
90
- @include appearance(none);
91
- cursor: pointer;
92
- user-select: none;
93
- vertical-align: middle;
94
- white-space: nowrap;
95
- }
@@ -41,3 +41,16 @@ $base-border-color: $light-gray;
41
41
  $error-color: $light-red;
42
42
  $notice-color: $light-yellow;
43
43
  $success-color: $light-green;
44
+
45
+ // Forms
46
+ $form-border-color: $base-border-color;
47
+ $form-border-color-hover: darken($base-border-color, 10);
48
+ $form-border-color-focus: $base-accent-color;
49
+ $form-border-radius: $base-border-radius;
50
+ $form-box-shadow: inset 0 1px 3px rgba(0,0,0,0.06);
51
+ $form-box-shadow-focus: $form-box-shadow, 0 0 5px rgba(darken($form-border-color-focus, 5), 0.7);
52
+ $form-font-size: $base-font-size;
53
+ $form-font-family: $base-font-family;
54
+
55
+ // Buttons
56
+ $button-style: simple;
@@ -1,5 +1,5 @@
1
1
  %button {
2
- @include button(simple, $base-accent-color);
2
+ @include button($button-style, $base-accent-color);
3
3
  -webkit-font-smoothing: antialiased;
4
4
  font-size: $base-font-size;
5
5
  font-weight: bold;
@@ -0,0 +1,3 @@
1
+ %clearfix {
2
+ @include clearfix;
3
+ }
@@ -0,0 +1,3 @@
1
+ %ellipsis {
2
+ @include ellipsis;
3
+ }
@@ -0,0 +1,4 @@
1
+ @import 'button';
2
+ @import 'clearfix';
3
+ @import 'ellipsis';
4
+ @import 'hide-text';
@@ -0,0 +1,3 @@
1
+ %hide-text {
2
+ @include hide-text;
3
+ }
@@ -0,0 +1 @@
1
+ @import 'flash';
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
10
10
  spec.email = ["support@thoughtbot.com"]
11
11
  spec.description = "Base styles for Web design"
12
12
  spec.summary = "Base styles for Web design"
13
- spec.homepage = "http://github.com/thoughtbot/biters"
13
+ spec.homepage = "http://github.com/thoughtbot/bitters"
14
14
  spec.license = "MIT"
15
15
 
16
16
  spec.files = `git ls-files`.split($/)
@@ -1,5 +1,6 @@
1
1
  require 'bitters/version'
2
2
  require 'fileutils'
3
+ require 'pathname'
3
4
  require 'thor'
4
5
 
5
6
  module Bitters
@@ -9,12 +10,13 @@ module Bitters
9
10
  map ['delete'] => :remove
10
11
 
11
12
  desc 'install', 'Install Bitters into your project'
13
+ method_options path: :string
12
14
  def install
13
15
  if bitters_files_already_exist?
14
16
  puts "Bitters files already installed, doing nothing."
15
17
  else
16
18
  install_files
17
- puts "Bitters files installed to /bitters"
19
+ puts "Bitters files installed to #{install_path}/bitters"
18
20
  end
19
21
  end
20
22
 
@@ -47,12 +49,16 @@ module Bitters
47
49
  private
48
50
 
49
51
  def bitters_files_already_exist?
50
- File.directory?("bitters")
52
+ File.directory?(install_path)
53
+ end
54
+
55
+ def install_path
56
+ Pathname.new(options[:path].to_s).join('bitters')
51
57
  end
52
58
 
53
59
  def install_files
54
- FileUtils.mkdir_p("bitters")
55
- FileUtils.cp_r(all_stylesheets, "bitters/")
60
+ FileUtils.mkdir_p(install_path)
61
+ FileUtils.cp_r(all_stylesheets, install_path)
56
62
  end
57
63
 
58
64
  def remove_bitters_directory
@@ -1,3 +1,3 @@
1
1
  module Bitters
2
- VERSION = "0.9.3"
2
+ VERSION = "0.9.4"
3
3
  end
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.3
4
+ version: 0.9.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2014-03-07 00:00:00.000000000 Z
13
+ date: 2014-05-22 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bundler
@@ -106,6 +106,7 @@ files:
106
106
  - README.md
107
107
  - Rakefile
108
108
  - app/assets/stylesheets/_bitters.scss
109
+ - app/assets/stylesheets/_buttons.scss
109
110
  - app/assets/stylesheets/_flashes.scss
110
111
  - app/assets/stylesheets/_forms.scss
111
112
  - app/assets/stylesheets/_grid-settings.scss
@@ -113,16 +114,19 @@ files:
113
114
  - app/assets/stylesheets/_tables.scss
114
115
  - app/assets/stylesheets/_typography.scss
115
116
  - app/assets/stylesheets/_variables.scss
116
- - app/assets/stylesheets/extends/_base.scss
117
117
  - app/assets/stylesheets/extends/_button.scss
118
- - app/assets/stylesheets/mixins/_base.scss
118
+ - app/assets/stylesheets/extends/_clearfix.scss
119
+ - app/assets/stylesheets/extends/_ellipsis.scss
120
+ - app/assets/stylesheets/extends/_extends.scss
121
+ - app/assets/stylesheets/extends/_hide-text.scss
119
122
  - app/assets/stylesheets/mixins/_flash.scss
123
+ - app/assets/stylesheets/mixins/_mixins.scss
120
124
  - bin/bitters
121
125
  - bitters.gemspec
122
126
  - lib/bitters.rb
123
127
  - lib/bitters/generator.rb
124
128
  - lib/bitters/version.rb
125
- homepage: http://github.com/thoughtbot/biters
129
+ homepage: http://github.com/thoughtbot/bitters
126
130
  licenses:
127
131
  - MIT
128
132
  post_install_message:
@@ -137,7 +141,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
137
141
  version: '0'
138
142
  segments:
139
143
  - 0
140
- hash: -2718350553411047732
144
+ hash: -4462426852338942601
141
145
  required_rubygems_version: !ruby/object:Gem::Requirement
142
146
  none: false
143
147
  requirements:
@@ -146,7 +150,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
146
150
  version: '0'
147
151
  segments:
148
152
  - 0
149
- hash: -2718350553411047732
153
+ hash: -4462426852338942601
150
154
  requirements: []
151
155
  rubyforge_project:
152
156
  rubygems_version: 1.8.25
@@ -1 +0,0 @@
1
- @import "button";
@@ -1 +0,0 @@
1
- @import "flash";