titon-toolkit 0.11.2 → 0.12.0

Sign up to get free protection for your applications and to get access to all the features.
data/readme.md CHANGED
@@ -1,4 +1,4 @@
1
- # Toolkit v0.11.2 #
1
+ # Toolkit v0.12.0 #
2
2
 
3
3
  Toolkit is a collection of very powerful user-interface components and utility classes.
4
4
  Each component represents encapsulated HTML, CSS and JS functionality for role specific page elements.
@@ -6,27 +6,48 @@ Each component represents encapsulated HTML, CSS and JS functionality for role s
6
6
  Titon makes use of the latest and greatest technology. This includes CSS3 for animation (fade, slide, etc),
7
7
  Sass for CSS pre-processing, Grunt for task and package management, and Intern for unit testing.
8
8
 
9
+ #### Demo ####
10
+
11
+ A temporary demo can be found here: http://titon.io/toolkit
12
+
13
+ It's literally the examples folder within this repository.
14
+
9
15
  #### Requirements ####
10
16
  * **HTML5**
11
17
  * **CSS3**
12
- * **MooTools 1.4** (for JS components)
13
- * Core
18
+ * **jQuery**
19
+ * (or)
20
+ * **MooTools**
14
21
  * More/Class.Binds
15
22
  * More/Elements.From
16
23
  * More/Element.Shortcuts
17
- * More/Locale
18
- * More/Drag (optional: Modal)
19
- * More/Array.Extras (optional: Flyout)
20
- * More/Element.Position (optional: Tooltip)
21
- * More/Element.Event.Pseudos (optional: Tooltip)
24
+ * More/Element.Measure
25
+ * More/Drag (optional for Modal)
26
+ * More/Element.Event.Pseudos (for Tooltip)
27
+
28
+ #### Browser Support ####
22
29
 
23
- #### Tested Against ####
30
+ **Tested Against**
24
31
  * Chrome 26, 28
25
32
  * Firefox 20, 23
26
33
  * Internet Explorer 10
27
34
  * Opera 12
28
35
  * Safari 5
29
36
 
37
+ **Suggested**
38
+ * Chrome 11+
39
+ * Firefox 4+
40
+ * Internet Explorer 10+
41
+ * Opera 11+
42
+ * Safari 5+
43
+
44
+ **What about IE8 and 9?**
45
+
46
+ Toolkit works in older versions of IE, but...
47
+ IE8 does not support em/rem scaling, media queries, and other CSS3 properties, so default styles and functionality look janky.
48
+ Both IE8 and IE9 do not support CSS transitions or animations, so animation falls back to a simple show/hide.
49
+ Compatibility for these browsers will be added in due time.
50
+
30
51
  ## Javascript Components ##
31
52
  #### Modules ####
32
53
  * `Accordion` - Provides collapsible support to a list of sections
@@ -86,6 +107,7 @@ Titon also provides classes that build upon MooTools itself. These classes do no
86
107
  * `Iconic` icon set provided by P.J. Onori
87
108
 
88
109
  ## Known Issues ##
110
+ * Zepto is currently not supported (too different of an API)
89
111
  * Slide in modal animations do not work correctly in Chrome/IE
90
112
  * Flip modal animations do not work in Opera
91
113
  * Tooltip positioning does not work in Opera
@@ -6,59 +6,119 @@
6
6
 
7
7
  @import "../common";
8
8
 
9
- .grid {
9
+ .grid,
10
+ .row {
10
11
  @include grid-row;
11
12
  }
12
13
 
13
14
  // These should be the same for all sizes
14
- @for $i from 1 through $grid-columns {
15
- $span: grid-span($i);
15
+ .col[class*="span-"] {
16
+ @include grid-column;
17
+ }
18
+
19
+ @for $i from 1 through 12 {
20
+ $span: grid-span(12, $i);
16
21
 
17
22
  .span-#{$i} { width: $span; }
18
23
  .push-#{$i} { left: $span; }
19
24
  .pull-#{$i} { right: $span; }
20
25
  }
21
26
 
22
- // Mobile supports 3 columns
23
- .col[class*="span-"],
24
- .col[class*="mobile-"] {
25
- @include grid-column;
26
- }
27
+ // Determine which grid to use
28
+ @if $responsive-size == "device" or $responsive-size == "both" {
27
29
 
28
- @for $i from 1 through ceil($grid-columns / 4) {
29
- $span: grid-span($i * 4);
30
+ // Mobile supports 3 columns
31
+ @include in-mobile {
32
+ .col[class*="mobile-"] {
33
+ @include grid-column;
34
+ }
30
35
 
31
- .col.mobile-#{$i} { width: $span; }
32
- .col.mobile-push-#{$i} { left: $span; }
33
- .col.mobile-pull-#{$i} { right: $span; }
34
- }
36
+ @for $i from 1 through $grid-columns-mobile {
37
+ $span: grid-span($grid-columns-mobile, $i);
35
38
 
36
- // Tablet supports 6 columns
37
- @include in-tablet {
38
- .col[class*="tablet-"] {
39
- @include grid-column;
39
+ .col.mobile-#{$i} { width: $span; }
40
+ .col.mobile-push-#{$i} { left: $span; }
41
+ .col.mobile-pull-#{$i} { right: $span; }
42
+ }
40
43
  }
41
44
 
42
- @for $i from 1 through ceil($grid-columns / 2) {
43
- $span: grid-span($i * 2);
45
+ // Tablet supports 6 columns
46
+ @include in-tablet {
47
+ .col[class*="tablet-"] {
48
+ @include grid-column;
49
+ }
50
+
51
+ @for $i from 1 through $grid-columns-tablet {
52
+ $span: grid-span($grid-columns-tablet, $i);
53
+
54
+ .col.tablet-#{$i} { width: $span; }
55
+ .col.tablet-push-#{$i} { left: $span; }
56
+ .col.tablet-pull-#{$i} { right: $span; }
57
+ }
58
+ }
59
+
60
+ // Desktop supports 12 columns
61
+ @include in-desktop {
62
+ .col[class*="desktop-"] {
63
+ @include grid-column;
64
+ }
65
+
66
+ @for $i from 1 through $grid-columns-desktop {
67
+ $span: grid-span($grid-columns-desktop, $i);
44
68
 
45
- .col.tablet-#{$i} { width: $span; }
46
- .col.tablet-push-#{$i} { left: $span; }
47
- .col.tablet-pull-#{$i} { right: $span; }
69
+ .col.desktop-#{$i} { width: $span; }
70
+ .col.desktop-push-#{$i} { left: $span; }
71
+ .col.desktop-pull-#{$i} { right: $span; }
72
+ }
48
73
  }
74
+
49
75
  }
50
76
 
51
- // Desktop supports 12 columns
52
- @include in-desktop {
53
- .col[class*="desktop-"] {
54
- @include grid-column;
77
+ @if $responsive-size == "size" or $responsive-size == "both" {
78
+
79
+ // Small supports 6 columns
80
+ @include in-small {
81
+ .col[class*="small-"] {
82
+ @include grid-column;
83
+ }
84
+
85
+ @for $i from 1 through $grid-columns-small {
86
+ $span: grid-span($grid-columns-small, $i);
87
+
88
+ .col.small-#{$i} { width: $span; }
89
+ .col.small-push-#{$i} { left: $span; }
90
+ .col.small-pull-#{$i} { right: $span; }
91
+ }
92
+ }
93
+
94
+ // Medium supports 8 columns
95
+ @include in-medium {
96
+ .col[class*="medium-"] {
97
+ @include grid-column;
98
+ }
99
+
100
+ @for $i from 1 through $grid-columns-medium {
101
+ $span: grid-span($grid-columns-medium, $i);
102
+
103
+ .col.medium-#{$i} { width: $span; }
104
+ .col.medium-push-#{$i} { left: $span; }
105
+ .col.medium-pull-#{$i} { right: $span; }
106
+ }
55
107
  }
56
108
 
57
- @for $i from 1 through $grid-columns {
58
- $span: grid-span($i);
109
+ // Large supports 12 columns
110
+ @include in-large {
111
+ .col[class*="large-"] {
112
+ @include grid-column;
113
+ }
59
114
 
60
- .col.desktop-#{$i} { width: $span; }
61
- .col.desktop-push-#{$i} { left: $span; }
62
- .col.desktop-pull-#{$i} { right: $span; }
115
+ @for $i from 1 through $grid-columns-large {
116
+ $span: grid-span($grid-columns-large, $i);
117
+
118
+ .col.large-#{$i} { width: $span; }
119
+ .col.large-push-#{$i} { left: $span; }
120
+ .col.large-pull-#{$i} { right: $span; }
121
+ }
63
122
  }
123
+
64
124
  }
@@ -14,25 +14,50 @@ img, video, canvas {
14
14
 
15
15
  .show-print { display: none; }
16
16
 
17
- // Desktop states
18
- @include in-desktop {
19
- .show-tablet,
20
- .show-mobile,
21
- .hide-desktop { display: none; }
22
- }
17
+ @if $responsive-size == "device" or $responsive-size == "both" {
18
+ // Desktop states
19
+ @include in-desktop {
20
+ .show-tablet,
21
+ .show-mobile,
22
+ .hide-desktop { display: none; }
23
+ }
24
+
25
+ // Tablet states
26
+ @include in-tablet {
27
+ .show-desktop,
28
+ .show-mobile,
29
+ .hide-tablet { display: none; }
30
+ }
23
31
 
24
- // Tablet states
25
- @include in-tablet {
26
- .show-desktop,
27
- .show-mobile,
28
- .hide-tablet { display: none; }
32
+ // Mobile states
33
+ @include in-mobile {
34
+ .show-desktop,
35
+ .show-tablet,
36
+ .hide-mobile { display: none; }
37
+ }
29
38
  }
30
39
 
31
- // Mobile states
32
- @include in-mobile {
33
- .show-desktop,
34
- .show-tablet,
35
- .hide-mobile { display: none; }
40
+ @if $responsive-size == "size" or $responsive-size == "both" {
41
+ // Large states
42
+ @include in-large {
43
+ .show-medium,
44
+ .show-small,
45
+ .hide-large { display: none; }
46
+ }
47
+
48
+ // Medium states
49
+ @include in-medium {
50
+ .show-large,
51
+ .show-small,
52
+ .hide-medium { display: none; }
53
+ }
54
+
55
+ // Small states
56
+ @include in-small {
57
+ .show-large,
58
+ .show-medium,
59
+ .hide-small { display: none; }
60
+ }
36
61
  }
37
62
 
38
63
  // Orientation states
@@ -6,12 +6,12 @@
6
6
 
7
7
  @import "../common";
8
8
 
9
- h1 { font-size: 2.5rem; }
10
- h2 { font-size: 2.2rem; }
11
- h3 { font-size: 1.8rem; }
12
- h4 { font-size: 1.5rem; }
13
- h5 { font-size: 1.2rem; }
14
- h6 { font-size: 1rem; }
9
+ h1 { font-size: 3rem; }
10
+ h2 { font-size: 2.5rem; }
11
+ h3 { font-size: 2.1rem; }
12
+ h4 { font-size: 1.8rem; }
13
+ h5 { font-size: 1.5rem; }
14
+ h6 { font-size: 1.2rem; }
15
15
 
16
16
  h1, h2, h3, h4, h5, h6 {
17
17
  margin: 0;
@@ -1,10 +1,15 @@
1
1
 
2
- $grid-columns: 12 !default;
3
- $grid-width: (100% / $grid-columns) !default;
2
+ $grid-columns-large: 12 !default;
3
+ $grid-columns-medium: 8 !default;
4
+ $grid-columns-small: 6 !default;
5
+
6
+ $grid-columns-desktop: 12 !default;
7
+ $grid-columns-tablet: 6 !default;
8
+ $grid-columns-mobile: 3 !default;
4
9
 
5
10
  // Calculate a width using a grid cell
6
- @function grid-span($n) {
7
- @return $grid-width * $n;
11
+ @function grid-span($columns, $n) {
12
+ @return (100% / $columns) * $n;
8
13
  }
9
14
 
10
15
  // Styles for the row containing the columns
@@ -1,5 +1,7 @@
1
1
 
2
2
  $responsive-design: "mobile" !default;
3
+ $responsive-size: "both" !default;
4
+
3
5
  $breakpoint-desktop: 1440px !default;
4
6
  $breakpoint-laptop: 1280px !default;
5
7
  $breakpoint-tablet-landscape: 1024px !default;
@@ -7,6 +9,10 @@ $breakpoint-tablet-portrait: 768px !default;
7
9
  $breakpoint-mobile-landscape: 480px !default;
8
10
  $breakpoint-mobile-portrait: 320px !default;
9
11
 
12
+ $breakpoint-small: 768px !default;
13
+ $breakpoint-medium: 1280px !default;
14
+ $breakpoint-large: 1440px !default;
15
+
10
16
  @mixin if-min($min) {
11
17
  @media only screen and (min-width: $min) {
12
18
  @content;
@@ -91,6 +97,24 @@ $breakpoint-mobile-portrait: 320px !default;
91
97
  }
92
98
  }
93
99
 
100
+ @mixin if-large() {
101
+ @include do-responsive($breakpoint-large, $breakpoint-medium) {
102
+ @content;
103
+ }
104
+ }
105
+
106
+ @mixin if-medium() {
107
+ @include do-responsive($breakpoint-medium, $breakpoint-small) {
108
+ @content;
109
+ }
110
+ }
111
+
112
+ @mixin if-small() {
113
+ @include do-responsive($breakpoint-small, null) {
114
+ @content;
115
+ }
116
+ }
117
+
94
118
  // Within 2 ranges
95
119
  @mixin in-desktop {
96
120
  @include if-min($breakpoint-tablet-landscape + 1) {
@@ -108,4 +132,22 @@ $breakpoint-mobile-portrait: 320px !default;
108
132
  @include if-max($breakpoint-mobile-landscape) {
109
133
  @content;
110
134
  }
135
+ }
136
+
137
+ @mixin in-large {
138
+ @include if-min($breakpoint-medium + 1) {
139
+ @content;
140
+ }
141
+ }
142
+
143
+ @mixin in-medium {
144
+ @include if-min-max($breakpoint-small + 1, $breakpoint-medium) {
145
+ @content;
146
+ }
147
+ }
148
+
149
+ @mixin in-small {
150
+ @include if-max($breakpoint-small) {
151
+ @content;
152
+ }
111
153
  }
@@ -54,7 +54,7 @@
54
54
  }
55
55
 
56
56
  @mixin field-style() {
57
- &.has-error {
57
+ &.is-error {
58
58
  .input,
59
59
  .select {
60
60
  border-color: $error;
@@ -68,7 +68,7 @@
68
68
  }
69
69
  }
70
70
 
71
- &.has-warning {
71
+ &.is-warning {
72
72
  .input,
73
73
  .select {
74
74
  border-color: $warning;
@@ -82,7 +82,7 @@
82
82
  }
83
83
  }
84
84
 
85
- &.has-success {
85
+ &.is-success {
86
86
  .input,
87
87
  .select {
88
88
  border-color: $success;
@@ -159,7 +159,7 @@
159
159
 
160
160
  .carousel.fade {
161
161
  .carousel-items {
162
- height: 360px; // needs a base height because slides are absolute
162
+ padding-bottom: 56.25%; /* 16:9 ratio */
163
163
 
164
164
  > li {
165
165
  position: absolute;
@@ -48,6 +48,12 @@ body {
48
48
  background: $background-color;
49
49
  }
50
50
 
51
+ .close {
52
+ width: 20px;
53
+ height: 20px;
54
+ line-height: 22px;
55
+ }
56
+
51
57
  //-------------------- Typography --------------------//
52
58
 
53
59
  .caret-up { border-bottom-color: $foreground-color; }
@@ -415,7 +421,7 @@ $button-shadow: 0 1px 0 white(.5) inset, 0 0 3px #000;
415
421
  .modal {
416
422
  .close {
417
423
  top: -11px;
418
- right: -45px;
424
+ right: -35px;
419
425
  }
420
426
  }
421
427
 
@@ -540,7 +546,7 @@ $button-shadow: 0 1px 0 white(.5) inset, 0 0 3px #000;
540
546
 
541
547
  .close {
542
548
  top: -11px;
543
- right: -45px;
549
+ right: -35px;
544
550
  }
545
551
  }
546
552
 
data/version.md CHANGED
@@ -1 +1 @@
1
- 0.11.2
1
+ 0.12.0
metadata CHANGED
@@ -1,63 +1,58 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: titon-toolkit
3
- version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 0
7
- - 11
8
- - 2
9
- version: 0.11.2
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.12.0
5
+ prerelease:
10
6
  platform: ruby
11
- authors:
7
+ authors:
12
8
  - Titon
13
9
  - Miles Johnson
14
10
  autorequire:
15
11
  bindir: bin
16
12
  cert_chain: []
17
-
18
- date: 2013-09-18 00:00:00 -07:00
19
- default_executable:
20
- dependencies:
21
- - !ruby/object:Gem::Dependency
13
+ date: 2013-09-22 00:00:00.000000000 Z
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
22
16
  name: sass
23
- prerelease: false
24
- requirement: &id001 !ruby/object:Gem::Requirement
25
- requirements:
26
- - - ">="
27
- - !ruby/object:Gem::Version
28
- segments:
29
- - 3
30
- - 2
31
- - 0
17
+ requirement: !ruby/object:Gem::Requirement
18
+ none: false
19
+ requirements:
20
+ - - ! '>='
21
+ - !ruby/object:Gem::Version
32
22
  version: 3.2.0
33
23
  type: :runtime
34
- version_requirements: *id001
35
- - !ruby/object:Gem::Dependency
36
- name: compass
37
24
  prerelease: false
38
- requirement: &id002 !ruby/object:Gem::Requirement
39
- requirements:
40
- - - ">="
41
- - !ruby/object:Gem::Version
42
- segments:
43
- - 0
44
- - 11
45
- version: "0.11"
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ none: false
27
+ requirements:
28
+ - - ! '>='
29
+ - !ruby/object:Gem::Version
30
+ version: 3.2.0
31
+ - !ruby/object:Gem::Dependency
32
+ name: compass
33
+ requirement: !ruby/object:Gem::Requirement
34
+ none: false
35
+ requirements:
36
+ - - ! '>='
37
+ - !ruby/object:Gem::Version
38
+ version: '0.11'
46
39
  type: :runtime
47
- version_requirements: *id002
48
- description: A powerful front-end UI and component toolkit. Provides Sass files for use in projects.
40
+ prerelease: false
41
+ version_requirements: !ruby/object:Gem::Requirement
42
+ none: false
43
+ requirements:
44
+ - - ! '>='
45
+ - !ruby/object:Gem::Version
46
+ version: '0.11'
47
+ description: A powerful front-end UI and component toolkit. Provides Sass files for
48
+ use in projects.
49
49
  email:
50
50
  executables: []
51
-
52
51
  extensions: []
53
-
54
52
  extra_rdoc_files: []
55
-
56
- files:
53
+ files:
57
54
  - lib/titon-toolkit.rb
58
55
  - scss/normalize.scss
59
- - scss/toolkit/_common.scss
60
- - scss/toolkit/_variables.scss
61
56
  - scss/toolkit/effects/visual.scss
62
57
  - scss/toolkit/layout/base.scss
63
58
  - scss/toolkit/layout/code.scss
@@ -95,39 +90,35 @@ files:
95
90
  - scss/toolkit/ui/pagination.scss
96
91
  - scss/toolkit/ui/pin.scss
97
92
  - scss/toolkit/ui/progress.scss
93
+ - scss/toolkit/_common.scss
94
+ - scss/toolkit/_variables.scss
98
95
  - scss/toolkit.scss
99
96
  - license.md
100
97
  - readme.md
101
98
  - version.md
102
- has_rdoc: true
103
99
  homepage: http://titon.io
104
- licenses:
100
+ licenses:
105
101
  - BSD-2
106
102
  post_install_message:
107
103
  rdoc_options: []
108
-
109
- require_paths:
104
+ require_paths:
110
105
  - lib
111
- required_ruby_version: !ruby/object:Gem::Requirement
112
- requirements:
113
- - - ">="
114
- - !ruby/object:Gem::Version
115
- segments:
116
- - 0
117
- version: "0"
118
- required_rubygems_version: !ruby/object:Gem::Requirement
119
- requirements:
120
- - - ">="
121
- - !ruby/object:Gem::Version
122
- segments:
123
- - 0
124
- version: "0"
106
+ required_ruby_version: !ruby/object:Gem::Requirement
107
+ none: false
108
+ requirements:
109
+ - - ! '>='
110
+ - !ruby/object:Gem::Version
111
+ version: '0'
112
+ required_rubygems_version: !ruby/object:Gem::Requirement
113
+ none: false
114
+ requirements:
115
+ - - ! '>='
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
125
118
  requirements: []
126
-
127
119
  rubyforge_project:
128
- rubygems_version: 1.3.6
120
+ rubygems_version: 1.8.23
129
121
  signing_key:
130
122
  specification_version: 3
131
123
  summary: Provides Titon Toolkit Sass files for use in projects.
132
124
  test_files: []
133
-