compass-less-plugin 0.3.1 → 0.7

Sign up to get free protection for your applications and to get access to all the features.
data/README.mkdn CHANGED
@@ -13,69 +13,47 @@ Installation
13
13
  gem install compass-less-plugin
14
14
 
15
15
 
16
- Create a Compass Project using Less Framework
16
+ Create a Compass Project Using Less Framework
17
17
  =============================================
18
18
 
19
19
  compass create -r lessframework my_project --using less
20
20
 
21
- Afterwards, edit the generated `styles.scss` file.
21
+ The above command will generate a `styles.scss` file and a `partials` directory containing
22
+ files pre-populated with media queries for each grid layout:
22
23
 
24
+ * `partials/_8` - The default; for tablets at 768 px, netbooks, and old browsers
25
+ * `partials/_3` - For all iPhones, iPod Touches, and other 320 px mobile devices
26
+ * `partials/_5` - For 480 px mobile devices, narrow browsers, and landscape iPhones
27
+ * `partials/_13` - For laptops, desktops, and hdtvs at 1280 px and beyond.
28
+ * `partials/_iphone4` - Overrides for iPhone 4 and other high device-pixel-ratio devices
23
29
 
24
- Customizing Typography
25
- ======================
26
-
27
- Less Framework contains typography settings optimized for line heights of `1.5`
28
- and `1.3`. While this plugin defaults to `1.5`, `1.3` may be used by changing the value
29
- of the `$less-line-height` variable before importing the `text` module:
30
-
31
- $less-line-height: 1.3;
32
- @import "lessframework/text";
33
-
34
- Values other than `1.5` or `1.3` will be ignored, resulting in the default being used.
35
30
 
31
+ Populating the Grid
32
+ ====================
36
33
 
37
- Creating a Grid
38
- ===============
39
-
40
- When `styles.scss` is generated, it will be pre-populated with the inline media queries
41
- necessary to create a responsive website. If you wish to define grids in a different
42
- manner, use the `grid(n)` mixin:
34
+ To calculate column widths, use the `column(n, [last])` mixin:
43
35
 
44
- body {
45
- @include grid(8);
36
+ #content {
37
+ @include column(5);
46
38
  }
47
39
 
48
- The above example creates an 8-column grid with 60 px margins.
49
-
50
- The number of columns, `n`, can be:
51
-
52
- * `3` - For all iPhones, iPod Touches, and other 320 px mobile devices
53
- * `5` - For 480 px mobile devices, narrow browsers, and landscape iPhones
54
- * `8` - For tablets at 768 px, netbooks, and old browsers
55
- * `13` - For laptops, desktops, and hdtvs at 1280 px and beyond.
40
+ This will create a 396 px column with a 24 px gutter to the right.
56
41
 
57
- To prevent Mobile Safari from bumping up font sizes when in landscape mode, use the
58
- `mobile-safari` mixin:
42
+ To avoid creating the right gutter (e.g. an element is the last column in a row),
43
+ set the `last` parameter to `true`:
59
44
 
60
- @media only screen and (max-width: 479px) {
61
-
62
- body {
63
- @include grid(3);
64
- @include mobile-safari;
65
- }
45
+ #sidebar {
46
+ @include column(3, true);
66
47
  }
67
48
 
68
49
 
69
- Populating the Grid
70
- ====================
71
-
72
- To calculate the width of columns within the grid, use the `column(n, [last])` mixin:
73
-
74
- #content {
75
- @include column(5); /* Creates a 396 px column with a 24 px gutter on the right. */
76
- }
50
+ Customizing Typography
51
+ ======================
77
52
 
78
- #sidebar {
79
- @include column(3, true); /* Creates a 228 px column without the right gutter. */
80
- }
53
+ Less Framework contains typography settings optimized for line heights of `1.5`
54
+ and `1.3`. While this plugin includes the `1.5` line height optimizations by default,
55
+ this can easily be switched by importing `lessframework/text/13` instead of
56
+ `lessframework/text/15` in `styles.scss`.
81
57
 
58
+ **Note to users of versions earlier than 0.7:** Please update the `lessframework/text`
59
+ import to be one of the aforementioned new text modules when upgrading.
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "compass-less-plugin"
6
- s.version = "0.3.1"
6
+ s.version = "0.7"
7
7
  s.platform = Gem::Platform::RUBY
8
8
  s.authors = ["William Wells"]
9
9
  s.email = ["projects@hanwells.me"]
@@ -1,6 +1,3 @@
1
- $less-column-width: 60px !default;
2
- $less-gutter-width: 24px !default;
3
-
4
1
  @mixin grid($columns) {
5
2
  @include column($columns, true);
6
3
 
@@ -1,21 +1,3 @@
1
- html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6,
2
- p, blockquote, pre, a, abbr, address, cite, code, del, dfn, em,
3
- img, ins, kbd, q, samp, small, strong, sub, sup, var, b, i,
4
- dl, dt, dd, ol, ul, li, fieldset, form, label, legend,
5
- table, caption, tbody, tfoot, thead, tr, th, td,
6
- article, aside, canvas, details, figure, figcaption, hgroup,
7
- menu, footer, header, nav, section, summary, time, mark, audio, video {
8
- margin: 0;
9
- padding: 0;
10
- border: 0;
11
- }
12
-
13
- article, aside, canvas, figure, figure img, figcaption, hgroup,
14
- footer, header, nav, section, audio, video {
15
- display: block;
16
- }
17
-
18
- a img { border: 0; }
19
-
20
- figure { position: relative; }
21
- figure img { width: 100%; }
1
+ @import "reset/utilities";
2
+
3
+ @include less-reset;
@@ -0,0 +1,30 @@
1
+ @mixin less-reset {
2
+ html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6,
3
+ p, blockquote, pre, a, abbr, address, cite, code, del, dfn, em,
4
+ img, ins, kbd, q, samp, small, strong, sub, sup, var, b, i,
5
+ dl, dt, dd, ol, ul, li, fieldset, form, label, legend,
6
+ table, caption, tbody, tfoot, thead, tr, th, td,
7
+ article, aside, canvas, details, figure, figcaption, hgroup,
8
+ menu, footer, header, nav, section, summary, time, mark, audio, video {
9
+ margin: 0;
10
+ padding: 0;
11
+ border: 0;
12
+ }
13
+
14
+ article, aside, canvas, figure, figure img, figcaption, hgroup,
15
+ footer, header, nav, section, audio, video {
16
+ display: block;
17
+ }
18
+
19
+ a img { border: 0; }
20
+
21
+ figure { position: relative; }
22
+ figure img { width: 100%; }
23
+ }
24
+
25
+ @mixin less-reset-selection {
26
+ ::selection { background: rgb(255,255,0); }
27
+ ::-moz-selection { background: rgb(255,255,0); }
28
+ img::selection { background: transparent; }
29
+ img::-moz-selection { background: transparent; }
30
+ }
@@ -0,0 +1,38 @@
1
+ $less-font-family: Palatino, Constantia, "Palatino Linotype", serif;
2
+
3
+ @mixin gigantic {
4
+ font-size: 123px;
5
+ line-height: 132px;
6
+ letter-spacing: -2px;
7
+ }
8
+
9
+ @mixin huge {
10
+ font-size: 76px;
11
+ line-height: 84px;
12
+ letter-spacing: -2px;
13
+ }
14
+
15
+ @mixin large {
16
+ font-size: 46px;
17
+ line-height: 48px;
18
+ letter-spacing: -1px;
19
+ }
20
+
21
+ @mixin big {
22
+ font-size: 29px;
23
+ line-height: 36px;
24
+ }
25
+
26
+ @mixin normal {
27
+ font-size: 18px;
28
+ line-height: 24px;
29
+ }
30
+
31
+ @mixin small {
32
+ font-size: 13px;
33
+ line-height: 18px;
34
+ }
35
+
36
+ body {
37
+ font: 18px/24px $less-font-family;
38
+ }
@@ -0,0 +1,37 @@
1
+ $less-font-family: Helvetica, Arial, sans-serif;
2
+
3
+ @mixin gigantic {
4
+ font-size: 110px;
5
+ line-height: 120px;
6
+ letter-spacing: -2px;
7
+ }
8
+
9
+ @mixin huge {
10
+ font-size: 68px;
11
+ line-height: 72px;
12
+ letter-spacing: -1px;
13
+ }
14
+
15
+ @mixin large {
16
+ font-size: 42px;
17
+ line-height: 48px;
18
+ }
19
+
20
+ @mixin big {
21
+ font-size: 26px;
22
+ line-height: 36px;
23
+ }
24
+
25
+ @mixin normal {
26
+ font-size: 16px;
27
+ line-height: 24px;
28
+ }
29
+
30
+ @mixin small {
31
+ font-size: 13px;
32
+ line-height: 18px;
33
+ }
34
+
35
+ body {
36
+ font: 16px/24px $less-font-family;
37
+ }
@@ -1,15 +1,21 @@
1
- stylesheet "styles.sass", :media => "all"
2
-
3
- description "Less Framework"
4
-
5
- help %Q{
6
- Please see the Less Framework website for documentation:
7
-
8
- http://lessframework.com/
9
- }
10
-
11
- welcome_message %Q{
12
- Please see the Less Framework website for documentation:
13
-
14
- http://lessframework.com/
15
- }
1
+ stylesheet "styles.sass", :media => "all"
2
+ stylesheet "partials/_base.sass"
3
+ stylesheet "partials/_3.sass"
4
+ stylesheet "partials/_5.sass"
5
+ stylesheet "partials/_8.sass"
6
+ stylesheet "partials/_13.sass"
7
+ stylesheet "partials/_iphone4.scss"
8
+
9
+ description "Less Framework"
10
+
11
+ help %Q{
12
+ Please see the Less Framework website for documentation:
13
+
14
+ http://lessframework.com/
15
+ }
16
+
17
+ welcome_message %Q{
18
+ Please see the Less Framework website for documentation:
19
+
20
+ http://lessframework.com/
21
+ }
@@ -0,0 +1,6 @@
1
+ /* 13-column layout
2
+ * For laptops, desktops, and hdtvs at 1280 px and beyond. */
3
+
4
+ @media only screen and (min-width: 1212px)
5
+ body
6
+ @include grid(13)
@@ -0,0 +1,7 @@
1
+ /* 3-column layout
2
+ * For all iPhones, iPod Touches, and other 320 px mobiles. */
3
+
4
+ @media only screen and (max-width: 479px)
5
+ body
6
+ @include grid(3)
7
+ @include mobile-safari
@@ -0,0 +1,7 @@
1
+ /* 5-column layout
2
+ * For 480 px mobiles, narrow browsers, and landscape iPhones. */
3
+
4
+ @media only screen and (max-width: 767px) and (min-width: 480px)
5
+ body
6
+ @include grid(5)
7
+ @include mobile-safari
@@ -0,0 +1,5 @@
1
+ /* Default 8-column layout
2
+ * For tablets at 768 px, netbooks, and old browsers. */
3
+
4
+ body
5
+ @include grid(8)
@@ -0,0 +1,6 @@
1
+ $less-column-width: 60px !default
2
+ $less-gutter-width: 24px !default
3
+
4
+ $less-line-height: 1.5 !default
5
+
6
+ @import lessframework/grid
@@ -0,0 +1,5 @@
1
+ /* Overrides for iPhone 4
2
+ * and other high device-pixel-ratio devices */
3
+
4
+ @media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min-device-pixel-ratio: 2) {
5
+ }
@@ -2,67 +2,27 @@
2
2
  * by Joni Korpi
3
3
  * http://lessframework.com */
4
4
 
5
+ @import partials/base
5
6
  @import lessframework/reset
6
- @import lessframework/grid
7
- @import lessframework/text
7
+ @import lessframework/text/15
8
8
 
9
9
  h1
10
- @include huge-font
10
+ @include huge
11
11
 
12
12
  h2
13
- @include large-font
13
+ @include large
14
14
 
15
15
  h3
16
- @include big-font
16
+ @include big
17
17
 
18
- ::selection
19
- background: rgb(255,255,0)
20
-
21
- ::-moz-selection
22
- background: rgb(255,255,0)
23
-
24
- img::selection
25
- background: transparent
26
-
27
- img::-moz-selection
28
- background: transparent
29
-
30
-
31
- /* Default 8-column layout
32
- For tablets at 768 px, netbooks, and old browsers. */
33
18
 
34
19
  body
35
- @include grid(8)
36
- @include font-stack
37
- @include normal-font
38
20
  background: rgb(232,232,232)
39
21
  -webkit-tap-highlight-color: rgb(255,255,0)
40
22
 
41
23
 
42
- /* 13-column layout
43
- For laptops, desktops, and hdtvs at 1280 px and beyond. */
44
-
45
- @media only screen and (min-width: 1212px)
46
-
47
- body
48
- @include grid(13)
49
-
50
-
51
- /* 5-column layout
52
- For 480 px mobiles, narrow browsers, and landscape iPhones. */
53
-
54
- @media only screen and (max-width: 767px) and (min-width: 480px)
55
-
56
- body
57
- @include grid(5)
58
- @include mobile-safari
59
-
60
-
61
- /* 3-column layout
62
- For all iPhones, iPod Touches, and other 320 px mobiles. */
63
-
64
- @media only screen and (max-width: 479px)
65
-
66
- body
67
- @include grid(3)
68
- @include mobile-safari
24
+ @import partials/8
25
+ @import partials/13
26
+ @import partials/5
27
+ @import partials/3
28
+ @import partials/iphone4
metadata CHANGED
@@ -1,13 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: compass-less-plugin
3
3
  version: !ruby/object:Gem::Version
4
- hash: 17
4
+ hash: 5
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
- - 3
9
- - 1
10
- version: 0.3.1
8
+ - 7
9
+ version: "0.7"
11
10
  platform: ruby
12
11
  authors:
13
12
  - William Wells
@@ -51,8 +50,16 @@ files:
51
50
  - lib/lessframework.rb
52
51
  - stylesheets/lessframework/_grid.scss
53
52
  - stylesheets/lessframework/_reset.scss
54
- - stylesheets/lessframework/_text.scss
53
+ - stylesheets/lessframework/reset/_utilities.scss
54
+ - stylesheets/lessframework/text/_13.scss
55
+ - stylesheets/lessframework/text/_15.scss
55
56
  - templates/project/manifest.rb
57
+ - templates/project/partials/_13.sass
58
+ - templates/project/partials/_3.sass
59
+ - templates/project/partials/_5.sass
60
+ - templates/project/partials/_8.sass
61
+ - templates/project/partials/_base.sass
62
+ - templates/project/partials/_iphone4.scss
56
63
  - templates/project/styles.sass
57
64
  has_rdoc: true
58
65
  homepage: http://github.com/willhw/compass-less-plugin
@@ -1,66 +0,0 @@
1
- $less-line-height: 1.5 !default;
2
-
3
- @mixin font-stack {
4
- @if $less-line-height == 1.3 {
5
- font-family: Palatino, Constantia, "Palatino Linotype", serif;
6
- } @else {
7
- font-family: Helvetica, Arial, sans-serif;
8
- }
9
- }
10
-
11
- @mixin gigantic-font {
12
- @if $less-line-height == 1.3 {
13
- font-size: 123px;
14
- line-height: 132px;
15
- } @else {
16
- font-size: 110px;
17
- line-height: 120px;
18
- }
19
-
20
- letter-spacing: -2px;
21
- }
22
-
23
- @mixin huge-font {
24
- @if $less-line-height == 1.3 {
25
- font-size: 76px;
26
- line-height: 84px;
27
- letter-spacing: -2px;
28
- } @else {
29
- font-size: 68px;
30
- line-height: 72px;
31
- letter-spacing: -1px;
32
- }
33
- }
34
-
35
- @mixin large-font {
36
- @if $less-line-height == 1.3 {
37
- font-size: 46px;
38
- letter-spacing: -1px;
39
- } @else {
40
- font-size: 42px;
41
- }
42
- line-height: 48px;
43
- }
44
-
45
- @mixin big-font {
46
- @if $less-line-height == 1.3 {
47
- font-size: 29px;
48
- } @else {
49
- font-size: 26px;
50
- }
51
- line-height: 36px;
52
- }
53
-
54
- @mixin normal-font {
55
- @if $less-line-height == 1.3 {
56
- font-size: 18px;
57
- } @else {
58
- font-size: 16px;
59
- }
60
- line-height: 24px;
61
- }
62
-
63
- @mixin small-font {
64
- font-size: 13px;
65
- line-height: 18px;
66
- }