seasons 0.9.3.beta8 → 0.9.3.beta9

Sign up to get free protection for your applications and to get access to all the features.
data/seasons.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{seasons}
5
- s.version = "0.9.3.beta8"
5
+ s.version = "0.9.3.beta9"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.3.5")
8
8
  s.authors = ["Scott Kellum"]
@@ -21,6 +21,12 @@ Gem::Specification.new do |s|
21
21
  "stylesheets/seasons/tools/_modular-scale.sass",
22
22
  "stylesheets/seasons/tools/_color-schemer.sass",
23
23
  "stylesheets/seasons/tools/_reset.sass",
24
+ "stylesheets/seasons/plugin/_ad.sass",
25
+ "stylesheets/seasons/plugin/_ipad.sass",
26
+ "stylesheets/seasons/plugin/_mobile.sass",
27
+ "stylesheets/seasons/plugin/_no-treesaver.sass",
28
+ "stylesheets/seasons/plugin/_tablet-7-normalize.sass",
29
+ "stylesheets/seasons/plugin/_tablet-7-template.sass",
24
30
  "templates/project/_chrome.scss",
25
31
  "templates/project/_config.sass",
26
32
  "templates/project/_pages.scss",
@@ -38,7 +44,7 @@ Gem::Specification.new do |s|
38
44
  s.homepage = %q{http://www.treesaver.net/}
39
45
  s.require_paths = ["lib"]
40
46
  s.rubyforge_project = %q{seasons}
41
- s.rubygems_version = %q{0.9.3.beta8}
47
+ s.rubygems_version = %q{0.9.3.beta9}
42
48
  s.summary = %q{The Compass variant of the Seasons framework to style Treesaver.}
43
49
  s.add_dependency(%q<compass>, ["~> 0.11"])
44
50
  end
@@ -7,8 +7,8 @@
7
7
  $base-size: 16px !default
8
8
  $size: 1em !default
9
9
  $line-height: 1.2em !default
10
- $module-w: 280px !default
11
- $module-h: 280px !default
10
+ $module-w: 84px !default
11
+ $module-h: 84px !default
12
12
  $gutter: 14px !default
13
13
  // grid margins:
14
14
  $margin: 20px !default
@@ -17,57 +17,74 @@ $bottom: 20px !default
17
17
  $columns: 12 !default
18
18
  $text-column-span: 3 !default
19
19
 
20
+ $consistant-page-width: false !default
20
21
 
21
22
  $row-prefix: r !default
22
23
  $column-prefix: c !default
23
24
  $width-prefix: w !default
24
25
  $height-prefix: h !default
25
26
  $ratio-prefix: r !default
27
+ $scale: 1
26
28
 
27
- // IMAGE + PAGE RATIOS
28
29
  =ratio($width, $height, $cols: $columns)
29
30
  @for $i from 1 through $cols
30
31
  .#{$ratio-prefix+$width}x#{$height}.#{$width-prefix+$i}, .container.#{$width-prefix+$i} [ratio="#{$width}x#{$height}"] img // Grid ratio, figure ratio.
31
- width: grid($i) // Width spans all columns
32
- height: round(grid($i) * ( $height / $width )) // Height is the proportion of the width.
33
-
34
- +ratios // Run the code above. Ratios are defined in _config.sass
35
-
36
- // GRID MEASURMENTS
37
- @for $i from 1 through $columns // loop defines columns. c1, c2, c3 . . .
38
- .#{$column-prefix+$i}
39
- margin-left: grid($i) - $module-w
40
- @for $i from 1 through $columns // loop defines widths. w1, w2, w3 . . .
41
- .#{$width-prefix+$i}
42
- width: grid($i)
43
-
44
- // Vertical grid
45
- $vertical-grid: false !default
46
- $rows: 10 !default
47
- @if $vertical-grid // Generate only if $vertical-grid is true. This code is usually not nessisary.
48
- @for $i from 1 through $rows // loop defines rows. r1, r2, r3 . . .
49
- .#{$row-prefix+$i}
50
- position: absolute
51
- top: (grid($i, $module-h) - $module-h) + $top
52
- @for $i from 1 through $rows // loop defines heights. h1, h2, h3 . . .
53
- .#{$height-prefix+$i}
54
- height: grid($i, $module-h)
55
-
56
- // Lightbox sizes
57
- .lightbox .container
58
- &[class*="single"]
59
- width: grid($text-column-span)
60
- &[class*="double"]
61
- width: grid($text-column-span * 2)
62
- &[class*="triple"]
63
- width: grid($text-column-span * 3)
64
- &[class*="quad"]
65
- width: grid($text-column-span * 4)
66
-
67
- // COLUMN WIDTHS
68
- .column
69
- width: grid($text-column-span)
70
- @include type($size, $line-height)
32
+ width: grid($i) * $scale // Width spans all columns
33
+ height: round(grid($i) * ( $height / $width )) * $scale // Height is the proportion of the width.
34
+
35
+ =build-grid
36
+ // IMAGE + PAGE RATIOS
37
+
38
+ +ratios // Run the code above. Ratios are defined in _config.sass
39
+
40
+ // GRID MEASURMENTS
41
+ @for $i from 1 through $columns // loop defines columns. c1, c2, c3 . . .
42
+ .#{$column-prefix+$i}
43
+ margin-left: (grid($i) - $module-w) * $scale
44
+ @for $i from 1 through $columns // loop defines widths. w1, w2, w3 . . .
45
+ .#{$width-prefix+$i}
46
+ width: grid($i) * $scale
47
+
48
+ // Force consistant page widths
49
+ @if $consistant-page-width
50
+ $i: $columns - $text-column-span
51
+ @while $i > 0
52
+ .#{$width-prefix+$i}.grid:not(.fixed):not(.sizetocontainer)
53
+ max-width: grid($i + $text-column-span) * $scale
54
+ $i: $i - $text-column-span
55
+
56
+ // Vertical grid
57
+ $vertical-grid: false !default
58
+ $rows: 10 !default
59
+ @if $vertical-grid // Generate only if $vertical-grid is true. This code is usually not nessisary.
60
+ @for $i from 1 through $rows // loop defines rows. r1, r2, r3 . . .
61
+ .#{$row-prefix+$i}
62
+ position: absolute
63
+ top: ((grid($i, $module-h) - $module-h) + $top) * $scale
64
+ @for $i from 1 through $rows // loop defines heights. h1, h2, h3 . . .
65
+ .#{$height-prefix+$i}
66
+ height: grid($i, $module-h) * $scale
67
+
68
+ // Lightbox sizes
69
+ .lightbox .container
70
+ &[class*="single"]
71
+ width: grid($text-column-span) * $scale
72
+ &[class*="double"]
73
+ width: grid($text-column-span * 2) * $scale
74
+ &[class*="triple"]
75
+ width: grid($text-column-span * 3) * $scale
76
+ &[class*="quad"]
77
+ width: grid($text-column-span * 4) * $scale
78
+ img
79
+ width: 100%
80
+ height: auto
81
+
82
+ // COLUMN WIDTHS
83
+ .column
84
+ width: grid($text-column-span) * $scale
85
+ @include type($size, $line-height)
86
+
87
+ +build-grid
71
88
 
72
89
  // GRID+FIGURE MEASUREMENTS
73
90
  .grid
@@ -147,11 +164,13 @@ $scroll-support: true !default
147
164
  width: 3px
148
165
 
149
166
  // TYPOGRAPHY RESET
150
- html, body
167
+ html
151
168
  +type($base-size, $line-height)
152
169
  font-family: $font
153
170
  color: $text
154
171
  background-color: $body
172
+
173
+ html, body
155
174
  overflow: hidden
156
175
 
157
176
  // Make sure headlines look good and always fit
@@ -0,0 +1,7 @@
1
+ // Standardizes grid sizes so if a 3rd party is making an ad they know what it's going to look like.
2
+
3
+ @for $i from 1 through 12 // loop defines widths. w1, w2, w3 . . .
4
+ .ad.grid.#{w+$i}
5
+ width: (100px * $i)
6
+
7
+ $seasons-ad-loaded: true
@@ -0,0 +1,44 @@
1
+ // IPAD PIXEL-PERFECT STYLES
2
+ // These styles allow you to create iPad specific grids.
3
+ // To use create a new set of grids with the class "fixed ipad" followed by either "vertical" or "horizontal"
4
+
5
+ // Margins will be over-written.
6
+ // Recommended column and gutter widths are 95px and 16px
7
+
8
+ // default columns per grid
9
+ $ipad-horizontal-columns: 9 !default
10
+ $ipad-vertical-columns: 6 !default
11
+
12
+ // Make sure iPad grids don't show up for desktop users.
13
+ .grid.ipad
14
+ +remove
15
+ margin: 0
16
+ +border-radius(0)
17
+ +box-shadow(none)
18
+ border: none
19
+
20
+ // Force sizing and remove standard desktop grids.
21
+ .os-ipad
22
+ .grid
23
+ +remove
24
+ opacity: 1 !important
25
+ .grid.fixed
26
+ &.ipad.horizontal
27
+ height: 644px
28
+ width: grid($ipad-horizontal-columns)
29
+ min-width: grid($ipad-horizontal-columns)
30
+ padding: 0 ((1024px - (grid($ipad-horizontal-columns))) / 2)
31
+ &.ipad.vertical
32
+ height: 900px
33
+ width: grid($ipad-vertical-columns)
34
+ min-width: grid($ipad-vertical-columns)
35
+ padding: 0 ((768px - (grid($ipad-vertical-columns))) / 2)
36
+
37
+ .os-ipad.fullscreen
38
+ .grid.fixed
39
+ &.ipad.horizontal
40
+ height: 748px
41
+ &.ipad.vertical
42
+ height: 1004px
43
+
44
+ $seasons-ipad-loaded: true
@@ -0,0 +1,85 @@
1
+ // MOBILE STYLES
2
+ // These styles allow you to create smartphone specific grids.
3
+ // To use create a new set of grids with the class "mobile"
4
+ // all width measurements will be overwritten by these styles.
5
+
6
+ // Suggested cover width
7
+ $cover_width: 250px
8
+
9
+ // Remove mobile grids for desktop users
10
+ .mobile.grid
11
+ +remove
12
+ margin: 0
13
+ +border-radius(0)
14
+ +box-shadow(none)
15
+ border: none
16
+
17
+ // All the mobile grid styles here.
18
+ .smallscreen.mobile
19
+ .viewer
20
+ padding: 0
21
+ margin: 0
22
+ left: 0
23
+ right: 0
24
+ top: 0
25
+ bottom: 0
26
+ background: $page
27
+ .grid:not(.fixed)
28
+ +remove
29
+ .mobile.grid
30
+ opacity: 1 !important
31
+ margin: 0
32
+ width: 280px
33
+ min-width: 280px
34
+ padding: 20px
35
+ .column, .container
36
+ width: 280px
37
+ min-width: 280px
38
+
39
+
40
+ // SHRINK IMAGES + PAGES
41
+ =ratio($width, $height, $cols: $columns)
42
+ // Force resize images
43
+ .mobile.grid .container [ratio="#{$width}x#{$height}"] img
44
+ width: 280px
45
+ height: 280px * ( $height / $width )
46
+
47
+ // Pull in the ratios defined in the skin
48
+ +ratios
49
+
50
+ // MOBILE COVERS
51
+ // If you grid is named "cover" it will be resized to be optimized for mobile devices.
52
+ .smallscreen.mobile
53
+ // Large mobile cover
54
+ .cover.fixed.w3col.grid, .cover.fixed.w3col.grid *
55
+ margin: 0
56
+ padding: 0
57
+ width: $cover_width
58
+ height: $cover_width * ( 4 / 3 )
59
+ min-width: $cover_width
60
+ min-height: $cover_width * ( 4 / 3 )
61
+ .img
62
+ top: 0
63
+ // Small mobile cover
64
+ .cover.fixed.w2col.grid, .cover.fixed.w2col.grid *
65
+ margin: 0
66
+ padding: 0
67
+ width: $cover_width/2
68
+ height: $cover_width/2 * ( 4 / 3 )
69
+ min-width: $cover_width/2
70
+ min-height: $cover_width/2 * ( 4 / 3 )
71
+ .img
72
+ top: 0
73
+ .cover.grid
74
+ margin: 0 ( ( $cover_width - 320px ) / 8 )
75
+ .fixed.grid, .sizetocontainer.grid
76
+ max-width: none
77
+ max-height: none
78
+ min-width: none
79
+ min-height: none
80
+ // FALLBACK IMAGES
81
+ .mobile.grid .keeptogether.fallback img
82
+ width: 40px
83
+ height: 40px
84
+
85
+ $seasons-mobile-loaded: true
@@ -0,0 +1,74 @@
1
+ // SUPPORT FOR NON-TREESAVER PAGES
2
+
3
+ // Hide no-treesaver elements unless they are in a placed figure
4
+ html.treesaver
5
+ .no-treesaver
6
+ display: none
7
+ .container, .fallback
8
+ .no-treesaver
9
+ display: block
10
+
11
+ // No-treesaver styles
12
+ html.no-treesaver
13
+ overflow: auto
14
+ overflow-y: scroll
15
+ body
16
+ width: 100%
17
+ max-width: grid(9)
18
+ margin: 0 auto
19
+ overflow: visible
20
+ background: $page
21
+ #header, #content, #footer
22
+ padding: $line-height $margin
23
+ #header
24
+ h1
25
+ +solid($line-height)
26
+ margin-bottom: ms(-2)
27
+ .nav
28
+ ol, ul
29
+ list-style: none
30
+ margin: 0 (-$margin)
31
+ padding: 0 $margin
32
+ li
33
+ display: inline
34
+ position: relative
35
+ // SUCKERFISH MENUS
36
+ ol, ul
37
+ z-index: 1
38
+ display: none
39
+ position: absolute
40
+ top: 100%
41
+ left: 0
42
+ margin: 0
43
+ padding: 0
44
+ li
45
+ width: auto
46
+ display: block
47
+ a
48
+ display: block
49
+ &:hover ol, ul
50
+ display: block
51
+ #content
52
+ div, iframe, object
53
+ display: none
54
+ &.no-treesaver
55
+ overflow: visible
56
+ display: block
57
+ float: right
58
+ padding-left: 1em
59
+ width: 100%
60
+ max-width: grid(6)
61
+ div
62
+ display: block
63
+ img, iframe, video
64
+ width: 100%
65
+ height: auto
66
+ #footer
67
+ clear: both
68
+ padding-bottom: 0
69
+ .nav li
70
+ ol, ul
71
+ top: auto
72
+ bottom: 100%
73
+
74
+ $seasons-no-treesaver-loaded: true
@@ -0,0 +1,18 @@
1
+ // Normalize 7" tablets.
2
+
3
+ // Default is halfway between both resolutions. I find the default 3/2 on the tab to be too much.
4
+ $tab7-virtual-resolution: (6/5) !default
5
+
6
+ @if unit($module-w) != "em"
7
+ @warn "Your grid MUST be based on ems to scale to 7 inch tablets."
8
+ @else
9
+ // Standard 7" 1024x600 tablet
10
+ @media screen and (-webkit-device-pixel-ratio: 1) and (device-width: 1024px) and (max-device-height: 600px) and (orientation: landscape), all and (-webkit-device-pixel-ratio: 1) and (device-width: 600px) and (max-device-height: 1024px) and (orientation: portrait)
11
+ html
12
+ font-size: $base-size * $tab7-virtual-resolution
13
+ // 1024x600 tablet with virtual resolution (Original Galaxy Tab)
14
+ @media screen and (-webkit-device-pixel-ratio: 1.5) and (device-width: 683px) and (max-device-height: 400px) and (orientation: landscape), all and (-webkit-device-pixel-ratio: 1.5) and (device-width: 400px) and (max-device-height: 683px) and (orientation: portrait)
15
+ html
16
+ font-size: $base-size * (2/3) * $tab7-virtual-resolution
17
+
18
+ $seasons-tablet-7-normalize-loaded: true
@@ -0,0 +1,47 @@
1
+ // PIXEL-PERFECT TEMPLATES FOR 7" TABLETS.
2
+ // These styles allow you to create specific grids for 7" tablets.
3
+ // To use create a new set of grids with the class "seven" followed by either "vertical" or "horizontal"
4
+
5
+ // Margins and column widths will be over-written.
6
+
7
+ $seasons-tablet-7-normalize-loaded: false !default
8
+ $tablet-7-margin: $margin !default
9
+
10
+ // Resize images
11
+ =ratio($width, $height, $cols: $columns)
12
+ // Force resize images
13
+ .seven.grid .container [ratio="#{$width}x#{$height}"] img
14
+ width: 600 / ( $base-size * $tab7-virtual-resolution / 1px ) - $tablet-7-margin * 2
15
+ height: ( 600 / ( $base-size * $tab7-virtual-resolution / 1px ) - $tablet-7-margin * 2 ) * ( $height / $width )
16
+
17
+ @if $seasons-tablet-7-normalize-loaded
18
+ // Make sure seven grids don't show up for desktop users.
19
+ .grid.seven
20
+ +remove
21
+ margin: 0
22
+ +border-radius(0)
23
+ +box-shadow(none)
24
+ border: none
25
+
26
+ @media screen and (-webkit-device-pixel-ratio: 1) and (device-width: 1024px) and (max-device-height: 600px) and (orientation: landscape), all and (-webkit-device-pixel-ratio: 1) and (device-width: 600px) and (max-device-height: 1024px) and (orientation: portrait), screen and (-webkit-device-pixel-ratio: 1.5) and (device-width: 683px) and (max-device-height: 400px) and (orientation: landscape), all and (-webkit-device-pixel-ratio: 1.5) and (device-width: 400px) and (max-device-height: 683px) and (orientation: portrait)
27
+ html.touch
28
+ background-color: $page
29
+ // Force sizing and remove standard desktop grids.
30
+ .grid:not(.fixed):not(.sizetocontainer):not(.seven)
31
+ +remove
32
+ .grid
33
+ opacity: 1 !important
34
+ .column, .container
35
+ width: 600 / ( $base-size * $tab7-virtual-resolution / 1px ) - $tablet-7-margin * 2
36
+ .grid.seven
37
+ width: 600 / ( $base-size * $tab7-virtual-resolution / 1px ) - $tablet-7-margin * 2
38
+ min-width: 600 / ( $base-size * $tab7-virtual-resolution / 1px ) - $tablet-7-margin * 2
39
+ margin: 0
40
+ padding: 0 $margin
41
+
42
+ // Pull in the ratios defined in the skin
43
+ +ratios
44
+ @else
45
+ @warn "Make sure tablet-7-normalize is loaded before loading tablet-7-templates."
46
+
47
+ $seasons-tablet-7-template-loaded: true
@@ -40,6 +40,19 @@
40
40
  line-height: 1em;
41
41
  font-family: Helvetica, sans-serif;
42
42
  }
43
+
44
+ html.treesaver #ad-id {
45
+ /* Styles while inside Treesaver */
46
+ }
47
+
48
+ html.no-treesaver #ad-id {
49
+ /* Styles when directly linked to (not treesaver) */
50
+ }
51
+
52
+ .grid.w3 #ad-id {
53
+ /* */
54
+ }
55
+
43
56
  </style>
44
57
  <h1>AD<span style="display: block;">space</span></h1>
45
58
  </div>
@@ -30,6 +30,8 @@ $reset: true // set to false if you don’t want the bundled reset
30
30
 
31
31
  // PLUGINS:
32
32
  @import seasons/plugin/ad
33
- //@import seasons/plugin/ios-perfect
34
33
  //@import seasons/plugin/mobile
34
+ //@import seasons/plugin/ipad
35
+ @import seasons/plugin/tablet-7-normalize
36
+ //@import seasons/plugin/tablet-7-template
35
37
  //@import seasons/plugin/no-treesaver
metadata CHANGED
@@ -6,8 +6,8 @@ version: !ruby/object:Gem::Version
6
6
  - 0
7
7
  - 9
8
8
  - 3
9
- - beta8
10
- version: 0.9.3.beta8
9
+ - beta9
10
+ version: 0.9.3.beta9
11
11
  platform: ruby
12
12
  authors:
13
13
  - Scott Kellum
@@ -51,6 +51,12 @@ files:
51
51
  - stylesheets/seasons/tools/_modular-scale.sass
52
52
  - stylesheets/seasons/tools/_color-schemer.sass
53
53
  - stylesheets/seasons/tools/_reset.sass
54
+ - stylesheets/seasons/plugin/_ad.sass
55
+ - stylesheets/seasons/plugin/_ipad.sass
56
+ - stylesheets/seasons/plugin/_mobile.sass
57
+ - stylesheets/seasons/plugin/_no-treesaver.sass
58
+ - stylesheets/seasons/plugin/_tablet-7-normalize.sass
59
+ - stylesheets/seasons/plugin/_tablet-7-template.sass
54
60
  - templates/project/_chrome.scss
55
61
  - templates/project/_config.sass
56
62
  - templates/project/_pages.scss