compass-moext 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.md ADDED
File without changes
@@ -0,0 +1,3 @@
1
+ require "compass"
2
+ extension_path = File.expand_path(File.join(File.dirname(__FILE__), ".."))
3
+ Compass::Frameworks.register("compass-moext", :path => extension_path)
@@ -0,0 +1,6 @@
1
+ // This is your framework's main stylesheet. Use it to import all default modules.
2
+ @import 'moext/helpers/units';
3
+ @import 'moext/helpers/string';
4
+ @import 'moext/base';
5
+ @import 'moext/utils';
6
+ @import 'moext/grid';
@@ -0,0 +1,63 @@
1
+ $app-ns: "" !default;
2
+ $app-ns-prefix: ns-prefix($app-ns) !default;
3
+
4
+ //: Typography
5
+ $fonts: (
6
+ "heading": '"Franklin Gothic Medium", Tahoma, "Helvetica Neue", Arial, sans-serif',
7
+ "content": 'cambria, georgia, "Times New Roman", Times, serif',
8
+ "code": 'consolas, "lucida console", "courier new", monospace',
9
+ "size": 18px,
10
+ "line-height": 1.3889
11
+ ) !default;
12
+
13
+ $colors: (
14
+ "bg-main": #fff,
15
+ "text-main": #000,
16
+ "link": #00f,
17
+ "link-hover": #00c,
18
+ "link-visited": #608,
19
+ "accent-1": #66f
20
+ ) !default;
21
+
22
+ $colors: map-merge($colors, (
23
+ "muted-1": lighten(map-get($colors, accent-1), 10%),
24
+ "neutral-1": #808080,
25
+ "darken-1": darken(map-get($colors, accent-1), 10%),
26
+ "darken-2": darken(map-get($colors, accent-1), 20%)
27
+ )
28
+ ) !default;
29
+
30
+ $dimensions: (
31
+ "box-spacing": 10px,
32
+ ) !default;
33
+
34
+ $breakpoints: (
35
+ "large": 970px,
36
+ "medium": 800px,
37
+ "small": 460px
38
+ ) !default;
39
+
40
+ //: Utility class names
41
+ $layout: (
42
+ "block": "l-b",
43
+ "inline": "l-i",
44
+ "inline-block": "l-ib",
45
+ "clear-fix": "l-cfix",
46
+ "clear": "l-cb",
47
+ "clear-left": "l-cl",
48
+ "clear-right": "l-cr",
49
+ "float-none": "l-fn",
50
+ "float-left": "l-fl",
51
+ "float-right": "l-fr",
52
+ "hide": "l-hide",
53
+ "list-flat": "l-none",
54
+ "container": "l-wrapper",
55
+ "content": "l-content"
56
+ ) !default;
57
+
58
+ $grid: (
59
+ "ns": "grid",
60
+ "columns": 12,
61
+ "outer-margin": 10px,
62
+ "column-gutter": 10px
63
+ ) !default;
@@ -0,0 +1,11 @@
1
+ @for $i from 1 through map-get($grid, columns) {
2
+ .#{$app-ns-prefix + map-get($grid, ns)}-#{$i} {
3
+ width: to_percent(colwidth($i, 0), map-get($breakpoints, large) - map-get($grid, outer-margin) * 2);
4
+ }
5
+ }
6
+
7
+ @media screen and (max-width: map-get($breakpoints, small)) {
8
+ [class *= "#{$app-ns-prefix + map-get($grid, ns)}-"] {
9
+ width: 100%;
10
+ }
11
+ }
@@ -0,0 +1,56 @@
1
+ /**
2
+ * Print styles
3
+ */
4
+ @media print {
5
+ body {
6
+ background: white !important;
7
+ color: black !important;
8
+ font: 10pt / 1.5 "Times New Roman", Times, serif;
9
+ margin: 0;
10
+ padding: 0;
11
+ }
12
+ img {
13
+ border: 0;
14
+ display: block;
15
+ }
16
+ /* base heading styles */
17
+ h1, h2, h3, h4, h5, h6 {
18
+ color: black !important;
19
+ font-weight: 700;
20
+ margin: 0;
21
+ }
22
+ h1 {
23
+ font-size: 20pt;
24
+ }
25
+ h2 {
26
+ font-size: 18pt;
27
+ }
28
+ h3 {
29
+ font-size: 16pt;
30
+ }
31
+ h4 {
32
+ font-size: 14pt;
33
+ }
34
+ h5, h6 {
35
+ letter-spacing: .5pt;
36
+ }
37
+ h1 a, h2 a, h3 a, h4 a, h5 a, h6 a {
38
+ color: black;
39
+ text-decoration: none;
40
+ }
41
+ pre {
42
+ height: auto;
43
+ }
44
+ blockquote {
45
+ border-left: 1pt solid #808080;
46
+ padding-left: 3pt;
47
+ }
48
+ a {
49
+ color: blue;
50
+ text-decoration: underline;
51
+ }
52
+ a[href]:after {
53
+ content: " (" attr(href) ") ";
54
+ font-size: 90%;
55
+ }
56
+ }
@@ -0,0 +1,93 @@
1
+ /**
2
+ * Utility Classes
3
+ */
4
+ // Begin Placeholder classes
5
+ %no-space {
6
+ margin: 0;
7
+ padding: 0;
8
+ }
9
+
10
+ %#{map-get($layout, content)} {
11
+ margin: 0 auto;
12
+ text-align: left;
13
+ }
14
+
15
+ %#{map-get($layout, hide)} {
16
+ display: none;
17
+ visibility: hidden;
18
+ }
19
+
20
+ %#{map-get($layout, list-flat)} {
21
+ list-style: none;
22
+ }
23
+
24
+ %#{map-get($layout, clear-fix)} {
25
+ content: ".";
26
+ display: block;
27
+ height: 0;
28
+ clear: both;
29
+ visibility: hidden;
30
+ }
31
+
32
+ %#{map-get($layout, container)} {
33
+ text-align: center;
34
+ }
35
+
36
+ // END Placeholder classes
37
+
38
+ .#{$app-ns-prefix + map-get($layout, clear-left)} {
39
+ clear: left;
40
+ }
41
+
42
+ .#{$app-ns-prefix + map-get($layout, clear-right)} {
43
+ clear: right;
44
+ }
45
+
46
+ .#{$app-ns-prefix + map-get($layout, clear)} {
47
+ clear: both;
48
+ }
49
+
50
+ .#{$app-ns-prefix + map-get($layout, float-left)} {
51
+ float: left;
52
+ }
53
+
54
+ .#{$app-ns-prefix + map-get($layout, float-right)} {
55
+ float: right;
56
+ }
57
+
58
+ .#{$app-ns-prefix + map-get($layout, float-none)} {
59
+ float: none;
60
+ }
61
+
62
+ .#{$app-ns-prefix + map-get($layout, hide)} {
63
+ @extend %#{map-get($layout, hide)};
64
+ }
65
+
66
+ .#{$app-ns-prefix + map-get($layout, inline)} {
67
+ display: inline;
68
+ }
69
+
70
+ .#{$app-ns-prefix + map-get($layout, inline-block)} {
71
+ display: inline-block;
72
+ }
73
+
74
+ .#{$app-ns-prefix + map-get($layout, block)} {
75
+ display: block;
76
+ }
77
+
78
+ .#{$app-ns-prefix + map-get($layout, list-flat)} {
79
+ @extend %#{map-get($layout, list-flat)};
80
+ @extend %no-space;
81
+ }
82
+
83
+ .#{$app-ns-prefix + map-get($layout, clear-fix)}:after {
84
+ @extend %#{map-get($layout, clear-fix)};
85
+ }
86
+
87
+ .#{$app-ns-prefix + map-get($layout, container)} {
88
+ @extend %#{map-get($layout, container)};
89
+ }
90
+
91
+ .#{$app-ns-prefix + map-get($layout, content)} {
92
+ @extend %#{map-get($layout, content)};
93
+ }
@@ -0,0 +1,8 @@
1
+ @function ns-prefix($ns: $ns) {
2
+ @if str-length($ns) != 0 {
3
+ @return $ns + "-";
4
+ }
5
+ @else {
6
+ @return "";
7
+ }
8
+ }
@@ -0,0 +1,42 @@
1
+ //: Functions
2
+ // Canvas - ((Total Units -1) x Gutter) ├╖ Total Units
3
+ @function colwidth($num, $padding: 0) {
4
+ @if $num <= map-get($grid, columns) {
5
+ $canvas: map-get($breakpoints, large) - map-get($grid, "outer-margin") * 2;
6
+ $total-units: map-get($grid, columns);
7
+ $gutter: map-get($grid, column-gutter);
8
+ @return ($canvas - ($total-units - 1) * $gutter) / $total-units * $num + ($num - 1) * $gutter - $padding * 2;
9
+ }
10
+ @else {
11
+ @return map-get($breakpoints, large);
12
+ }
13
+ }
14
+
15
+ @function to_ems($target, $context: $base-font-size) {
16
+ @return unit_mixin($target, $context, "em");
17
+ }
18
+
19
+ @function to_percent($target, $context: $base-font-size) {
20
+ @return unit_mixin($target, $context, "percent");
21
+ }
22
+
23
+ // Helper function to calculate units relative to the target (desired) size
24
+ // and the context of the containing element
25
+ @function unit_mixin($target, $context: $base-font-size, $units: "em") {
26
+ @if $target == 0 {
27
+ @return 0;
28
+ }
29
+ @else if $units == "percent" {
30
+ @return percentage($target / $context);
31
+ }
32
+ @else {
33
+ @if unit($target) == unit($context) {
34
+ @return $target / $context + 0#{$units};
35
+ }
36
+ }
37
+ }
38
+
39
+ // Removes the units from a value
40
+ @function strip_units($number) {
41
+ @return $number / ($number * 0 + 1);
42
+ }
@@ -0,0 +1 @@
1
+ $app-ns: "";
@@ -0,0 +1,54 @@
1
+ /* http://meyerweb.com/eric/tools/css/reset/
2
+ v2.0 | 20110126
3
+ License: none (public domain)
4
+ */
5
+
6
+ html, body, div, span, applet, object, iframe,
7
+ h1, h2, h3, h4, h5, h6, p, blockquote, pre,
8
+ a, abbr, acronym, address, big, cite, code,
9
+ del, dfn, em, img, ins, kbd, q, s, samp,
10
+ small, strike, strong, sub, sup, tt, var,
11
+ b, u, i, center,
12
+ dl, dt, dd, ol, ul, li,
13
+ fieldset, form, label, legend,
14
+ table, caption, tbody, tfoot, thead, tr, th, td,
15
+ article, aside, canvas, details, embed,
16
+ figure, figcaption, footer, header, hgroup,
17
+ menu, nav, output, ruby, section, summary,
18
+ time, mark, audio, video {
19
+ margin: 0;
20
+ padding: 0;
21
+ border: 0;
22
+ font-size: 100%;
23
+ font: inherit;
24
+ vertical-align: baseline;
25
+ }
26
+
27
+ /* HTML5 display-role reset for older browsers */
28
+ article, aside, details, figcaption, figure,
29
+ footer, header, hgroup, menu, nav, section {
30
+ display: block;
31
+ }
32
+
33
+ body {
34
+ line-height: 1;
35
+ }
36
+
37
+ ol, ul {
38
+ list-style: none;
39
+ }
40
+
41
+ blockquote, q {
42
+ quotes: none;
43
+ }
44
+
45
+ blockquote:before, blockquote:after,
46
+ q:before, q:after {
47
+ content: '';
48
+ content: none;
49
+ }
50
+
51
+ table {
52
+ border-collapse: collapse;
53
+ border-spacing: 0;
54
+ }
@@ -0,0 +1,174 @@
1
+ h1 {
2
+ font: 35px/1.1429 map-get($fonts, heading);
3
+ }
4
+
5
+ h2 {
6
+ font: 30px/1.16667 map-get($fonts, heading);
7
+ }
8
+
9
+ h3 {
10
+ font: 25px/1.2 map-get($fonts, heading);
11
+ }
12
+
13
+ h4 {
14
+ font: 20px/1.25 map-get($fonts, heading);
15
+ }
16
+
17
+ h5 {
18
+ font: 18px/1.3889 map-get($fonts, heading);
19
+ }
20
+
21
+ h6 {
22
+ font: 16px/1.125 map-get($fonts, heading);
23
+ }
24
+
25
+ ul, ol, dl, p {
26
+ font-size: map-get($fonts, size);
27
+ line-height: map-get($fonts, line-height);
28
+ margin-top: 0;
29
+ margin-bottom: 1.5em;
30
+ }
31
+
32
+ dd, dt, li, label {
33
+ font-size: map-get($fonts, size);
34
+ line-height: map-get($fonts, line-height);
35
+ }
36
+
37
+ a {
38
+ color: map-get($colors, link);
39
+ text-decoration: none;
40
+ &:hover {
41
+ color: map-get($colors, link-hover);
42
+ text-decoration: underline;
43
+ }
44
+ &:visited {
45
+ color: map-get($colors, link-visited);
46
+ }
47
+ }
48
+
49
+ address, div {
50
+ font-size: map-get($fonts, size);
51
+ line-height: map-get($fonts, line-height);
52
+ }
53
+
54
+ abbr {
55
+ border-bottom: 1px dotted map-get($colors, neutral-1);
56
+ cursor: help;
57
+ letter-spacing: 1px;
58
+ }
59
+
60
+ b, strong, th {
61
+ font-weight: 700;
62
+ }
63
+
64
+ i, em {
65
+ font-style: italic;
66
+ }
67
+
68
+ sub, sup, small {
69
+ font-size: .65em;
70
+ }
71
+
72
+ sup {
73
+ line-height: 0;
74
+ vertical-align: super;
75
+ }
76
+
77
+ sub {
78
+ line-height: 0;
79
+ vertical-align: sub;
80
+ }
81
+
82
+ code, pre {
83
+ font-family: map-get($fonts, code);
84
+ font-size: map-get($fonts, size);
85
+ }
86
+
87
+ blockquote {
88
+ background: map-get($colors, muted-2);
89
+ border-left: 3px solid map-get($colors, muted-1);
90
+ padding: map-get($dimensions, box-spacing);
91
+ }
92
+
93
+ /**
94
+ * Table
95
+ */
96
+ table {
97
+ font-size: map-get($fonts, size);
98
+ line-height: map-get($fonts, line-height);
99
+ margin-bottom: 1.5em;
100
+ width: 100%;
101
+ }
102
+
103
+ tr {
104
+ border-bottom: 1px solid map-get($colors, muted-1);
105
+ }
106
+
107
+ td, th {
108
+ padding: map-get($dimensions, box-spacing);
109
+ vertical-align: top;
110
+ }
111
+
112
+ caption {
113
+ font-weight: 700;
114
+ padding: map-get($dimensions, box-spacing);
115
+ text-align: center;
116
+ }
117
+
118
+ thead th {
119
+ border-bottom: 3px solid map-get($colors, accent-1);
120
+ }
121
+
122
+ tbody {
123
+ th {
124
+ background: map-get($colors, muted-1);
125
+ }
126
+ tr:nth-child(odd) {
127
+ background: map-get($colors, muted-2);
128
+ }
129
+ }
130
+
131
+ tfoot td {
132
+ text-align: center;
133
+ }
134
+
135
+ /**
136
+ * Lists
137
+ */
138
+ ol {
139
+ list-style: decimal outside;
140
+ padding-left: 30px;
141
+ }
142
+
143
+ ul {
144
+ list-style: disc outside;
145
+ padding-left: 30px;
146
+ }
147
+
148
+ /**
149
+ * Forms
150
+ */
151
+ form {
152
+ padding: map-get($dimensions, box-spacing) 0;
153
+ }
154
+
155
+ fieldset {
156
+ border: 1px solid map-get($colors, muted-1);
157
+ padding: map-get($dimensions, box-spacing);
158
+ margin-bottom: map-get($fonts, size);
159
+ }
160
+
161
+ legend {
162
+ font-size: map-get($fonts, size);
163
+ padding: map-get($dimensions, box-spacing);
164
+ }
165
+
166
+ button, .btn, a.btn, input[type="submit"], input[type="reset"] {
167
+ cursor: pointer;
168
+ font-size: map-get($fonts, size);
169
+ font-family: map-get($fonts, content);
170
+ padding: map-get($dimensions, box-spacing);
171
+ &:hover {
172
+ text-decoration: none;
173
+ }
174
+ }
@@ -0,0 +1,16 @@
1
+ // Import base settings
2
+ @import "base";
3
+
4
+ ##{$app-ns} {
5
+ @import "reset";
6
+ }
7
+
8
+ // Provide access to Compass and Momentum features
9
+ @import "compass/css3";
10
+ @import "compass";
11
+ @import "moext";
12
+
13
+ ##{$app-ns} {
14
+ @import "styles";
15
+ @import "moext/print";
16
+ }
File without changes
@@ -0,0 +1,27 @@
1
+ # Require any additional compass plugins here.
2
+
3
+ # Set this to the root of your project when deployed:
4
+ http_path = "/"
5
+ css_dir = "stylesheets"
6
+ sass_dir = "sass"
7
+ images_dir = "images"
8
+ javascripts_dir = "javascripts"
9
+
10
+ # You can select your preferred output style here (can be overridden via the command line):
11
+ # output_style = :expanded or :nested or :compact or :compressed
12
+ output_style = :expanded
13
+
14
+ # To enable relative paths to assets via compass helper functions. Uncomment:
15
+ # relative_assets = true
16
+
17
+ # To disable debugging comments that display the original location of your selectors. Uncomment:
18
+ line_comments = false
19
+
20
+ # If you prefer the indented syntax, you might want to regenerate this
21
+ # project again passing --syntax sass, or you can uncomment this:
22
+ # preferred_syntax = :sass
23
+ # and then run:
24
+ # sass-convert -R --from scss --to sass sass scss && rm -rf sass && mv scss sass
25
+
26
+ # Create sourcemaps
27
+ sourcemap = true
@@ -0,0 +1,13 @@
1
+ description "Momentum Compass Extension - a microlibrary for responsibly scoped modules"
2
+
3
+ # Make sure you list all the project template files here in the manifest.
4
+ stylesheet "_base.scss", :media => "all"
5
+ stylesheet "_reset.scss", :media => "all"
6
+ stylesheet "_styles.scss", :media => "all"
7
+ stylesheet "all.scss", :media => "all"
8
+ javascript "app.js"
9
+
10
+ welcome_message %Q{
11
+ Update the application namespace variable, $app-ns in _base.scss
12
+ to get started.
13
+ }
metadata ADDED
@@ -0,0 +1,76 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: compass-moext
3
+ version: !ruby/object:Gem::Version
4
+ version: 3.0.0
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Ethan Gardner
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2014-10-28 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: compass
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: 1.0.1
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: 1.0.1
30
+ description: Provides basic grid functions and structure for variable reuse
31
+ email: edgincvg@gmail.com
32
+ executables: []
33
+ extensions: []
34
+ extra_rdoc_files: []
35
+ files:
36
+ - README.md
37
+ - lib/compass-moext.rb
38
+ - stylesheets/moext/helpers/_string.scss
39
+ - stylesheets/moext/helpers/_units.scss
40
+ - stylesheets/moext/_base.scss
41
+ - stylesheets/moext/_grid.scss
42
+ - stylesheets/moext/_print.scss
43
+ - stylesheets/moext/_utils.scss
44
+ - stylesheets/_moext.scss
45
+ - templates/project/all.scss
46
+ - templates/project/app.js
47
+ - templates/project/config.rb
48
+ - templates/project/manifest.rb
49
+ - templates/project/_base.scss
50
+ - templates/project/_reset.scss
51
+ - templates/project/_styles.scss
52
+ homepage: https://github.com/ethangardner/compass-moext
53
+ licenses: []
54
+ post_install_message:
55
+ rdoc_options: []
56
+ require_paths:
57
+ - lib
58
+ required_ruby_version: !ruby/object:Gem::Requirement
59
+ none: false
60
+ requirements:
61
+ - - ! '>='
62
+ - !ruby/object:Gem::Version
63
+ version: '0'
64
+ required_rubygems_version: !ruby/object:Gem::Requirement
65
+ none: false
66
+ requirements:
67
+ - - ! '>='
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
70
+ requirements: []
71
+ rubyforge_project:
72
+ rubygems_version: 1.8.28
73
+ signing_key:
74
+ specification_version: 3
75
+ summary: A micro library for Compass and SASS for building responsibly scoped applications
76
+ test_files: []