jetpack-rails 0.8.0 → 0.8.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d448bb8894e77214fc9db1ba8ef6b0d1f0f25587
4
- data.tar.gz: 1d78df2487542a02be9b9013ff28877fa726a52c
3
+ metadata.gz: 48f89f796064f221bca72e7469891c7bab19d5c2
4
+ data.tar.gz: 41ee889821635528de114dcaa34854819ab4f264
5
5
  SHA512:
6
- metadata.gz: 2668041c5f6f47d2a051c94a19d6589cb1367c3938ac111908ab97272f86c4b4e0d2bd509ed21c619f937fa01beed536d6b6ea924b9cd85af6793a1a7189cfbf
7
- data.tar.gz: 34ae606be27595a19f5e9dc26dbb698950eb6ced263aea03ac0ed20fb449380983ea5e602c17eb9110bba3af5a28522e54c8aa7bb2bb5a7f4cff70ff6f39a684
6
+ metadata.gz: bc16f8e69b2d00c5cbc58ab892214881617850b2fdce69eedeed728014601c4ac7a30588fe232877d278bc814bdf01307de09558191613f7dcf30e33e3c6812e
7
+ data.tar.gz: 480906d5ad9e7db8b8fa47ae3cb612349476c6df6182b0e111573aab185e8cabfd970dfbed1a1647a2a0f1d42784e118273c843aef22583cc423cf73d8746f74
data/CHANGELOG CHANGED
@@ -10,6 +10,15 @@ TODO: V1.0
10
10
 
11
11
 
12
12
  Changelog:
13
+ 0.8.1:
14
+ - Completely revised the tables library to be based on stack of mixins
15
+ - Changed default $light2 to a ligher color.
16
+ - Added $medium-line style.
17
+ - Added $dark-line style (it was present but had a typo and was unused in 0.8.0)
18
+ - Note on the line styles: these are not heavily used, I'm experimenting with
19
+ the usefulness of them right now. They may be removed before 1.0, but I think
20
+ they're kind of a good idea.
21
+
13
22
  0.8.0:
14
23
  - Significant overhaul to styles:
15
24
  The goal of Jetpack is to be a bootstrap that helps without hurting,
@@ -33,6 +42,7 @@ Changelog:
33
42
  - Changed interface module to all mixins
34
43
  - Added "Defaults" module for grabbing the old selectors
35
44
  - Changed div.alert_message to div.message in defaults
45
+ - Added $light-line style
36
46
 
37
47
  0.7.0:
38
48
  - Added `nav_link_to` helper for creating navigation links.
@@ -1,3 +1,3 @@
1
1
  module Jetpack
2
- VERSION = "0.8.0"
2
+ VERSION = "0.8.1"
3
3
  end
@@ -25,19 +25,26 @@
25
25
 
26
26
  Have fun, happy coding!
27
27
  -------------------------------------------------- */
28
- // STYLE INCLUDES
28
+
29
+ // BULK INCLUDES
29
30
  @include text;
30
31
  @include headings;
31
32
  @include lists;
32
33
  @include preformatting;
33
34
  @include tabs-pills;
34
35
  @include pagination;
35
- @include tables;
36
36
 
37
37
  // JS DEFAULT STYLES
38
38
  @include js-styles;
39
39
 
40
40
  // UBIQUITOUS DEFAULTS
41
+
42
+ // INTERFACE ELEMENTS
41
43
  span.label { @include label; }
42
44
  a.button, span.button { @include button; }
43
45
  div.message { @include message; }
46
+
47
+ // TABLE STYLES
48
+ table.simple { @include table-style-simple; }
49
+ table.shaded { @include table-style-shaded; }
50
+ table.striped { @include table-style-striped; }
@@ -1,7 +1,7 @@
1
1
  // TODO - Add full comments here
2
2
  // COLOR DEFINITIONS
3
3
  $light1: #EAEBEC;
4
- $light2: #9A9FA0;
4
+ $light2: #C9CACB;
5
5
 
6
6
  $dark1: #3C3E40;
7
7
  $dark2: #262728;
@@ -26,7 +26,8 @@ $black: #000000;
26
26
 
27
27
  // LINE STYLES
28
28
  $light-line: 1px solid $light1;
29
- $dark-link: 1px solid $dark1;
29
+ $medium-line: 1px solid $light2;
30
+ $dark-line: 1px solid $dark1;
30
31
 
31
32
  // TYPOGRAPHY DEFINITIONS
32
33
  $sans: "Helvetica Neue", "Helvetica", "Arial", sans-serif;
@@ -1,33 +1,123 @@
1
- /* Tables +
2
- * Largely taken from Twitter Bootstrap v1.3,
3
- * with customizations and adaptations to make it more "sassy".
1
+ /* Jetpack Tables
2
+ * Initially inspired by the style of the tables in Twitter Bootstrap v1.3.
3
+ * This module provides some convenient mixins for common table types. Most
4
+ * important is the "simple" style, which is very easy to layer your own styles
5
+ * on top of. The Whole Table Styles are a good example of how to piece together
6
+ * your own style groups from standardized components, which will make your
7
+ * design more consistent (and save you a lot of keystrokes over time).
4
8
  * ---------------------------------------------------------------------------------------- */
5
9
 
6
- // TODO: V0.9: Redo this
7
- @mixin tables {
8
- table {
9
- width: 100%; margin-bottom: $baseline; padding: 0; border: 1px solid $light1;
10
- border-collapse: separate; // Done so we can round those corners!
11
- *border-collapse: collapse; /* IE7, collapse table to remove spacing */
12
- @include border-radius(4px);
13
- th, td { padding: 10px 10px 9px; line-height: $baseline; text-align: left; }
14
- th { padding-top: 9px; font-weight: bold; vertical-align: middle; border-bottom: 1px solid $light1; }
15
- td { vertical-align: top; }
16
- th + th, td + td { border-left: 1px solid $light1; }
17
- tr + tr td { border-top: 1px solid $light1; }
18
- tbody tr:first-child td:first-child { @include border-radius(4px 0 0 0); }
19
- tbody tr:first-child td:last-child { @include border-radius(0 4px 0 0); }
20
- tbody tr:last-child td:first-child { @include border-radius(0 0 0 4px); }
21
- tbody tr:last-child td:last-child { @include border-radius(0 0 4px 0); }
10
+ // WHOLE TABLE STYLES
11
+ @mixin table-style-simple {
12
+ @include table-style-base;
13
+ td { @include table-td-style-base; }
14
+ th { @include table-th-style-base; }
15
+ thead { @include table-thead-style-simple; }
16
+ tbody { @include table-tbody-style-simple; }
17
+ caption { @include caption-style-simple; }
18
+ }
19
+
20
+ @mixin table-style-shaded( $c: $light1 ) {
21
+ @include table-style-base( $c );
22
+ td { @include table-td-style-base; }
23
+ th { @include table-th-style-shaded( $c ); }
24
+ thead { @include table-thead-style-shaded( $c ); }
25
+ tbody { @include table-tbody-style-shaded( $c ); }
26
+ caption { @include caption-style-simple; }
27
+ }
28
+
29
+ @mixin table-style-striped( $c: $light1 ) {
30
+ @include table-style-base( $c );
31
+ td { @include table-td-style-base; }
32
+ th { @include table-th-style-base; }
33
+ thead { @include table-thead-style-simple( $c ); }
34
+ tbody { @include table-tbody-style-striped( $c ); }
35
+ caption { @include caption-style-simple; }
36
+ @include table-style-striped-no-header-style( $c );
37
+ }
38
+
39
+ @mixin table-style-base( $c: $light1 ) {
40
+ $style: 1px solid $c;
41
+ width: 100%; margin-bottom: $baseline; padding: 0; border: $style;
42
+ border-collapse: separate; *border-collapse: collapse; //FOR IE 7
43
+ @include border-radius(4px);
44
+ }
45
+
46
+ // CELL STYLES
47
+ @mixin table-td-style-base {
48
+ padding: 10px; line-height: $baseline; text-align: left;
49
+ }
50
+
51
+ @mixin table-th-style-base {
52
+ @include table-td-style-base;
53
+ vertical-align: middle; font-weight: 700;
54
+ }
55
+
56
+ @mixin table-th-style-shaded( $c: $light1 ) {
57
+ @include table-th-style-base;
58
+ background: $c;
59
+ }
60
+
61
+ // THEAD STYLES
62
+ @mixin table-thead-style-simple( $c: $light1 ) {
63
+ $style: 1px solid $c;
64
+ th { border-bottom: $style; border-left: $style; }
65
+ th:first-child { border-left: none; }
66
+ }
67
+
68
+ @mixin table-thead-style-shaded( $c: $light1 ) {
69
+ $style: 1px solid darken($c, 5%);
70
+ th { border-bottom: $style; border-left: $style; }
71
+ th:first-child { border-left: none; }
72
+ }
73
+
74
+ // TBODY STYLES
75
+ @mixin table-tbody-style-base( $c: $light1 ) {
76
+ $style: 1px solid $c;
77
+ td { border-left: $style; border-top: $style; }
78
+ th:first-child, td:first-child { border-left: none; }
79
+ tr:last-child td:first-child { @include border-radius(0 0 0 4px); }
80
+ tr:last-child td:last-child { @include border-radius(0 0 4px 0); }
81
+ }
82
+
83
+ @mixin table-tbody-style-simple( $c: $light1 ) {
84
+ @include table-tbody-style-base( $c );
85
+ $style: 1px solid $c;
86
+ th { border-top: $style; }
87
+ tr:first-child {
88
+ td, th { border-top: none; }
89
+ }
90
+ }
91
+
92
+ @mixin table-tbody-style-shaded( $c: $light1 ) {
93
+ @include table-tbody-style-base( $c );
94
+ $darker: 1px solid darken($c, 5%);
95
+ th { border-top: $darker; border-left: $darker; }
96
+ th + td { border-left: $darker; }
97
+ tr:first-child {
98
+ td, th { border-top: none; }
22
99
  }
100
+ }
23
101
 
102
+ @mixin table-tbody-style-striped( $c: $light1 ) {
103
+ @include table-tbody-style-simple( $c );
104
+ tr:nth-child(odd) {
105
+ th, td { background: lighten($c, 5%); }
106
+ }
107
+ }
24
108
 
25
- // ZEBRA-STRIPING
26
- // Default zebra-stripe styles (alternating gray and transparent backgrounds)
27
- table.striped {
28
- tbody {
29
- tr:nth-child(odd) td { background-color: $light1; }
30
- tr:hover td { background-color: darken( $light1, 5% ); }
109
+ @mixin table-style-striped-no-header-style( $c: $light1 ) {
110
+ caption + tbody {
111
+ tr:nth-child(odd) {
112
+ th, td { background: none; }
113
+ }
114
+ tr:nth-child(even) {
115
+ th, td { background: lighten($c, 5%); }
31
116
  }
32
117
  }
33
118
  }
119
+
120
+ // CAPTIONS
121
+ @mixin caption-style-simple {
122
+ font-weight: 700; font-size: $base_size - 1px;
123
+ }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jetpack-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Burleson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-08-01 00:00:00.000000000 Z
11
+ date: 2013-08-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sass-rails