singularitygs 1.2.3 → 1.3.0

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: 94d6cf733cb1de2daf57b08f2a2c481e5dd71dbb
4
- data.tar.gz: 89011adff1f2336178a9ef118b0383068c38217d
3
+ metadata.gz: b8ed425cf36235e58ab1ee29978fc5b1e97e4beb
4
+ data.tar.gz: d2755f5438f669c9e5fabb82c90e787d8720be46
5
5
  SHA512:
6
- metadata.gz: 6be35d623f501414a0803e032d641795f8e29826cbff8ba4c355b6152f37b4c3c036c072259f518e128562c70e863931c9f1e2e09ebd1e1981ec6e8f07f04ec2
7
- data.tar.gz: 46da573bb66d730f9f194988a5937c4e66703d426fbbc500d7dff205dfb8daf04f017a8c908f0d2a1113b66457bab371515e05d2ca09019da141dfb481694a45
6
+ metadata.gz: e633e19db9e123599842b1101de98e1c516d043a950cdb7017db0f947eb2b09fdb9a747f254365e7cc71fd55fe108214107278a930d4c678ea19af0980c13585
7
+ data.tar.gz: 1a60264828d8383d777693e23a606fa452e7d2cef1f68ec6f138e60597fcb19d3bd72ffa8fd8725d0c0af734dbced0dd1f121a56777c6b8865007adcb9488822
data/lib/singularitygs.rb CHANGED
@@ -1,17 +1,17 @@
1
- singularitygs_sass_path = File.expand_path('../stylesheets', __FILE__)
2
- singularitygs_path = "#{File.dirname(__FILE__)}/.."
1
+ base_directory = File.expand_path(File.join(File.dirname(__FILE__), '..'))
2
+ singularitygs_sass_path = File.join(base_directory, 'stylesheets')
3
3
 
4
4
  if (defined? Compass)
5
5
  require 'breakpoint'
6
6
  Compass::Frameworks.register(
7
7
  "singularitygs",
8
- :path => singularitygs_path
8
+ :path => base_directory
9
9
  )
10
10
  else
11
11
  ENV["SASS_PATH"] = [ENV["SASS_PATH"], singularitygs_sass_path].compact.join(File::PATH_SEPARATOR)
12
12
  end
13
13
 
14
14
  module SingularityGS
15
- VERSION = "1.2.3"
16
- DATE = "2014-07-24"
15
+ VERSION = "1.3.0"
16
+ DATE = "2014-08-11"
17
17
  end
@@ -105,7 +105,7 @@
105
105
  @mixin isolation-span($Span, $Location, $clear: false, $grid: false, $gutter: false, $gutter-style: false, $from: false) {
106
106
  $Options: ();
107
107
  @if $clear {
108
- $Options: map-merge($Options, ('clear': $clear));
108
+ $Options: map-merge($Options, ('clear': unquote($clear)));
109
109
  }
110
110
  @if $from {
111
111
  $Options: map-merge($Options, ('from': $from));
@@ -174,6 +174,9 @@
174
174
  $Gradient: ();
175
175
 
176
176
  $Gutter-Width: gutter-span($Gutter, $Grid, $Style);
177
+ @if unit($Gutter-Width) != '%' and unit($Gutter-Width) != '' {
178
+ $Gutter-Width: 0%;
179
+ }
177
180
 
178
181
  @if $Style == 'fixed' {
179
182
  $Gutter-Width: 0%;
@@ -191,7 +194,7 @@
191
194
  }
192
195
 
193
196
  $Loop-Color: $Column-Color;
194
- @if (index($Style, 'fixed') or $Gutter == 0) and ($i % 2 == 0 ) {
197
+ @if (index($Style, 'fixed') or $Gutter-Width == 0%) and ($i % 2 == 0 ) {
195
198
  $Loop-Color: $Inverse-Column-Color;
196
199
  }
197
200
 
@@ -29,7 +29,6 @@
29
29
  @return $user-object;
30
30
  }
31
31
 
32
- $Deprecate-Warning: singularity-deprecation-warning();
33
32
  $Length: length($haystack);
34
33
  $Mobile-First: sgs-get('mobile first');
35
34
 
@@ -54,4 +54,46 @@
54
54
  @include sgs-change('gutters', $layout-private-gutter-holder);
55
55
  @include sgs-change('output', $layout-private-output-holder);
56
56
  @include sgs-change('gutter styles', $layout-private-gutter-style-holder);
57
+ }
58
+
59
+ //////////////////////////////
60
+ // Layout At
61
+ // Wrapper mixin for a combined Breakpoint/Layout call
62
+ //////////////////////////////
63
+ @mixin layout-at($layout, $breakpoint) {
64
+ @include breakpoint($breakpoint) {
65
+ // If a single value is passed in, assume it's a grid
66
+ @if type-of($layout) != map {
67
+ @include layout($layout) {
68
+ @content;
69
+ }
70
+ }
71
+ // If it is a map, we've got key/values to work with
72
+ @else {
73
+ $grid: false;
74
+ $gutter: false;
75
+ $output-style: false;
76
+ $gutter-style: false;
77
+
78
+ @if map-has-key($layout, 'grid') {
79
+ $grid: map-get($layout, 'grid');
80
+ }
81
+
82
+ @if map-has-key($layout, 'gutter') {
83
+ $gutter: map-get($layout, 'gutter');
84
+ }
85
+
86
+ @if map-has-key($layout, 'output style') {
87
+ $output-style: map-get($layout, 'output style');
88
+ }
89
+
90
+ @if map-has-key($layout, 'gutter style') {
91
+ $gutter-style: map-get($layout, 'gutter style');
92
+ }
93
+
94
+ @include layout($grid, $gutter, $output-style, $gutter-style) {
95
+ @content;
96
+ }
97
+ }
98
+ }
57
99
  }
@@ -1,45 +1,3 @@
1
- //////////////////////////////
2
- // Deprecation Warnings for new Setting System
3
- //////////////////////////////
4
- @function singularity-deprecation-warning() {
5
- $Singularity-Global-Vars: 'grids', 'gutters', 'gutter-styles', 'mobile-first', 'output', 'direction', 'include-border-box', 'include-clearfix';
6
-
7
- @each $var in $Singularity-Global-Vars {
8
- @if global-variable-exists($var) {
9
- $Singularity-Warning-Output: "DEPRECATION: In order to remove global variable naming conflicts, Singularity's settings have been moved into the single `$singularity` variable.";
10
-
11
- @if $var == 'grids' or $var == 'gutters' or $var == 'gutter-styles' {
12
- $Singularity-Singleton-Var: str_slice($var, 1, -2);
13
- $Singularity-Warning-Output: $Singularity-Warning-Output + " Please replace all `$#{$var}` definitions, and all `add-#{$Singularity-Singleton-Var}()` calls to `@include add-#{$Singularity-Singleton-Var}()`";
14
- }
15
- @else {
16
- // String Replace
17
- $Singularity-Replace-Index: -1;
18
- $Singularity-Replace-Holder: '';
19
- $Singularity-Replace-Spaced: $var;
20
- @while $Singularity-Replace-Index != 0 {
21
- $Singularity-Replace-Index: str-index($Singularity-Replace-Spaced, '-');
22
- @if $Singularity-Replace-Index != 0 {
23
- $Singularity-Replace-Holder: str-slice($Singularity-Replace-Spaced, 1, $Singularity-Replace-Index - 1) + ' ';
24
- $Singularity-Replace-Spaced: str-slice($Singularity-Replace-Spaced, $Singularity-Replace-Index + 1);
25
- $Singularity-Replace-Spaced: $Singularity-Replace-Holder + $Singularity-Replace-Spaced;
26
- $Singularity-Replace-Index: str-index($Singularity-Replace-Spaced, '-');
27
- }
28
- }
29
- $Singularity-Warning-Output: $Singularity-Warning-Output + " Please replace all `$#{$var}` definitions with `@include sgs-change('#{$Singularity-Replace-Spaced}', $value)`";
30
- }
31
-
32
- $Singularity-Warning-Output: $Singularity-Warning-Output + " In the next version of Singularity, this warning will be removed";
33
-
34
- @warn $Singularity-Warning-Output;
35
- }
36
- }
37
-
38
- @return false;
39
- }
40
-
41
- $DEPRECATE:singularity-deprecation-warning();
42
-
43
1
  //////////////////////////////
44
2
  // Has Setting
45
3
  //////////////////////////////
@@ -82,17 +40,17 @@ $DEPRECATE:singularity-deprecation-warning();
82
40
  //////////////////////////////
83
41
  // Remove Setting
84
42
  //////////////////////////////
85
- @function sgs-reset($setting) {
86
- $Return: ();
87
-
88
- @each $Key, $Value in $singularity {
89
- $Return: if($setting == $Key, $Return, map-merge($Return, ($Key: $Value)));
43
+ @function sgs-reset($settings...) {
44
+ @if length($settings) == 1 {
45
+ $settings: nth($settings, 1);
90
46
  }
91
47
 
92
- $singularity: $Return !global;
48
+ @each $setting in $settings {
49
+ $singularity: map-remove($singularity, $setting) !global;
50
+ }
93
51
  @return true;
94
52
  }
95
53
 
96
- @mixin sgs-reset($setting) {
97
- $sgs-reset: sgs-reset($setting);
54
+ @mixin sgs-reset($settings...) {
55
+ $sgs-reset: sgs-reset($settings);
98
56
  }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: singularitygs
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.3
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scott Kellum
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-07-24 00:00:00.000000000 Z
12
+ date: 2014-08-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sass
@@ -17,14 +17,14 @@ dependencies:
17
17
  requirements:
18
18
  - - ~>
19
19
  - !ruby/object:Gem::Version
20
- version: 3.3.0
20
+ version: '3.3'
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
25
  - - ~>
26
26
  - !ruby/object:Gem::Version
27
- version: 3.3.0
27
+ version: '3.3'
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: breakpoint
30
30
  requirement: !ruby/object:Gem::Requirement
@@ -83,22 +83,6 @@ files:
83
83
  - stylesheets/singularitygs/math/_context.scss
84
84
  - stylesheets/singularitygs/math/_grid.scss
85
85
  - stylesheets/singularitygs/math/_gutters.scss
86
- - templates/box-sizing/behaviors/box-sizing/boxsizing.htc
87
- - templates/box-sizing/behaviors/box-sizing/boxsizing.php
88
- - templates/box-sizing/manifest.rb
89
- - templates/demos/demo-float.scss
90
- - templates/demos/demo-isolation.scss
91
- - templates/demos/float.html.erb
92
- - templates/demos/isolation.html.erb
93
- - templates/demos/manifest.rb
94
- - templates/grid-toggle/grid.js
95
- - templates/grid-toggle/grid.min.js
96
- - templates/grid-toggle/manifest.rb
97
- - templates/project/grid.js
98
- - templates/project/grid.min.js
99
- - templates/project/manifest.rb
100
- - templates/project/partials/_base.scss
101
- - templates/project/style.scss
102
86
  homepage: http://singularity.gs
103
87
  licenses:
104
88
  - MIT
@@ -1,399 +0,0 @@
1
- /**
2
- * box-sizing Polyfill
3
- *
4
- * A polyfill for box-sizing: border-box for IE6 & IE7.
5
- *
6
- * JScript
7
- *
8
- * This program is free software: you can redistribute it and/or modify
9
- * it under the terms of the GNU Lesser General Public License as published
10
- * by the Free Software Foundation, either version 3 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
- * GNU Lesser General Public License for more details.
17
- *
18
- * See <http://www.gnu.org/licenses/lgpl-3.0.txt>
19
- *
20
- * @category JScript
21
- * @package box-sizing-polyfill
22
- * @author Christian Schepp Schaefer <schaepp@gmx.de> <http://twitter.com/derSchepp>
23
- * @copyright 2012 Christian Schepp Schaefer
24
- * @license http://www.gnu.org/copyleft/lesser.html The GNU LESSER GENERAL PUBLIC LICENSE, Version 3.0
25
- * @link http://github.com/Schepp/box-sizing-polyfill
26
- *
27
- * PREFACE:
28
- *
29
- * This box-sizing polyfill is based on previous work done by Erik Arvidsson,
30
- * which he published in 2002 on http://webfx.eae.net/dhtml/boxsizing/boxsizing.html.
31
- *
32
- * USAGE:
33
- *
34
- * Add the behavior/HTC after every `box-sizing: border-box;` that you assign:
35
- *
36
- * box-sizing: border-box;
37
- * *behavior: url(/scripts/boxsizing.htc);`
38
- *
39
- * Prefix the `behavior` property with a star, like seen above, so it will only be seen by
40
- * IE6 & IE7, not by IE8+ who already implement box-sizing.
41
- *
42
- * The URL to the HTC file must be relative to your HTML(!) document, not relative to your CSS.
43
- * That's why I'd advise you to use absolute paths like in the example.
44
- *
45
- */
46
- <component lightWeight="true">
47
- <attach event="onpropertychange" onevent="checkPropertyChange()" />
48
- <attach event="ondetach" onevent="restore()" />
49
- <attach event="onresize" for="window" onevent="update()" />
50
- <script type="text/javascript">
51
- //<![CDATA[
52
-
53
- var viewportwidth = (typeof window.innerWidth != 'undefined' ? window.innerWidth : element.document.documentElement.clientWidth);
54
-
55
- // Shortcut for the document object
56
- var doc = element.document;
57
-
58
- // Buffer for multiple resize events
59
- var resizetimeout = null;
60
-
61
- // Don't apply box-sizing to certain elements
62
- var apply = false;
63
- switch(element.nodeName){
64
- case '#comment':
65
- case 'HTML':
66
- case 'HEAD':
67
- case 'TITLE':
68
- case 'SCRIPT':
69
- case 'STYLE':
70
- case 'LINK':
71
- case 'META':
72
- break;
73
-
74
- default:
75
- apply = true;
76
- break;
77
- }
78
-
79
- /*
80
- * update gets called during resize events, then waits until there are no further resize events, and finally triggers a recalculation
81
- */
82
- function update(){
83
- if(resizetimeout !== null){
84
- window.clearTimeout(resizetimeout);
85
- }
86
- resizetimeout = window.setTimeout(function(){
87
- restore();
88
- init();
89
- resizetimeout = null;
90
- },100);
91
- }
92
-
93
- /*
94
- * restore gets called when the behavior is being detached (see event binding at the top),
95
- * resets everything like it was before applying the behavior
96
- */
97
- function restore(){
98
- if(apply){
99
- element.runtimeStyle.removeAttribute("width");
100
- element.runtimeStyle.removeAttribute("height");
101
- }
102
- }
103
-
104
- /*
105
- * init gets called once at the start and then never again,
106
- * triggers box-sizing calculations and updates width and height
107
- */
108
- function init(){
109
- if(apply){
110
- updateBorderBoxWidth();
111
- updateBorderBoxHeight();
112
- }
113
- }
114
-
115
- /*
116
- * checkPropertyChange gets called as soon as an element property changes
117
- * (see event binding at the top), it then checks if any property influencing its
118
- * dimensions was changed and if yes recalculates width and height
119
- */
120
- function checkPropertyChange(){
121
- if(apply){
122
- var pn = event.propertyName;
123
- if(pn === "style.boxSizing" && element.style.boxSizing === ""){
124
- element.style.removeAttribute("boxSizing");
125
- element.runtimeStyle.removeAttribute("boxSizing");
126
- element.runtimeStyle.removeAttribute("width");
127
- element.runtimeStyle.removeAttribute("height");
128
- }
129
- switch (pn){
130
- case "style.width":
131
- case "style.borderLeftWidth":
132
- case "style.borderLeftStyle":
133
- case "style.borderRightWidth":
134
- case "style.borderRightStyle":
135
- case "style.paddingLeft":
136
- case "style.paddingRight":
137
- updateBorderBoxWidth();
138
- break;
139
-
140
- case "style.height":
141
- case "style.borderTopWidth":
142
- case "style.borderTopStyle":
143
- case "style.borderBottomWidth":
144
- case "style.borderBottomStyle":
145
- case "style.paddingTop":
146
- case "style.paddingBottom":
147
- updateBorderBoxHeight();
148
- break;
149
-
150
- case "className":
151
- case "style.boxSizing":
152
- updateBorderBoxWidth();
153
- updateBorderBoxHeight();
154
- break;
155
- }
156
- }
157
- }
158
-
159
- /*
160
- * Helper function, taken from Dean Edward's IE7 framework,
161
- * added by Schepp on 12.06.2010.
162
- * http://code.google.com/p/ie7-js/
163
- *
164
- * Allows us to convert from relative to pixel-values.
165
- */
166
- function getPixelValue(value){
167
- var PIXEL = /^\d+(px)?$/i;
168
- if (PIXEL.test(value)) return parseInt(value);
169
- var style = element.style.left;
170
- var runtimeStyle = element.runtimeStyle.left;
171
- element.runtimeStyle.left = element.currentStyle.left;
172
- element.style.left = value || 0;
173
- value = parseInt(element.style.pixelLeft);
174
- element.style.left = style;
175
- element.runtimeStyle.left = runtimeStyle;
176
-
177
- return value;
178
- }
179
-
180
- function getPixelWidth(object, value){
181
- // For Pixel Values
182
- var PIXEL = /^\d+(px)?$/i;
183
- if (PIXEL.test(value)) return parseInt(value);
184
-
185
- // For Percentage Values
186
- var PERCENT = /^[\d\.]+%$/i;
187
- if (PERCENT.test(value)){
188
- try{
189
- parentWidth = getPixelWidth(object.parentElement,(object.parentElement.currentStyle.width != "auto" ? object.parentElement.currentStyle.width : "100%"));
190
- value = (parseFloat(value) / 100) * parentWidth;
191
- }
192
- catch(e){
193
- value = (parseFloat(value) / 100) * element.document.documentElement.clientWidth;
194
- }
195
- return parseInt(value);
196
- }
197
-
198
- // For EM Values
199
- var style = object.style.left;
200
- var runtimeStyle = object.runtimeStyle.left;
201
- object.runtimeStyle.left = object.currentStyle.left;
202
- object.style.left = value || 0;
203
- value = parseInt(object.style.pixelLeft);
204
- object.style.left = style;
205
- object.runtimeStyle.left = runtimeStyle;
206
-
207
- return value;
208
- }
209
-
210
- function getPixelHeight(object, value){
211
- // For Pixel Values
212
- var PIXEL = /^\d+(px)?$/i;
213
- if (PIXEL.test(value)) return parseInt(value);
214
-
215
- // For Percentage Values
216
- var PERCENT = /^[\d\.]+%$/i;
217
- if (PERCENT.test(value)){
218
- try{
219
- if(object.parentElement.currentStyle.height != "auto"){
220
- switch(object.parentElement.nodeName){
221
- default:
222
- parentHeight = getPixelHeight(object.parentElement,object.parentElement.currentStyle.height);
223
- if(parentHeight !== "auto"){
224
- value = (parseFloat(value) / 100) * parentHeight;
225
- }
226
- else {
227
- value = "auto";
228
- }
229
- break;
230
-
231
- case 'HTML':
232
- parentHeight = element.document.documentElement.clientHeight;
233
- if(parentHeight !== "auto"){
234
- value = (parseFloat(value) / 100) * parentHeight;
235
- }
236
- else {
237
- value = "auto";
238
- }
239
- break;
240
- }
241
- if(value !== "auto") value = parseInt(value);
242
- }
243
- else {
244
- value = "auto";
245
- }
246
- }
247
- catch(e){
248
- value = "auto";
249
- }
250
- return value;
251
- }
252
-
253
- // For EM Values
254
- var style = object.style.left;
255
- var runtimeStyle = object.runtimeStyle.left;
256
- object.runtimeStyle.left = object.currentStyle.left;
257
- object.style.left = value || 0;
258
- value = parseInt(object.style.pixelLeft);
259
- object.style.left = style;
260
- object.runtimeStyle.left = runtimeStyle;
261
-
262
- return value;
263
- }
264
-
265
-
266
- /*
267
- * getBorderWidth & friends
268
- * Border width getters
269
- */
270
- function getBorderWidth(sSide){
271
- if(element.currentStyle["border" + sSide + "Style"] == "none"){
272
- return 0;
273
- }
274
- var n = getPixelValue(element.currentStyle["border" + sSide + "Width"]);
275
- return n || 0;
276
- }
277
- function getBorderLeftWidth() { return getBorderWidth("Left"); }
278
- function getBorderRightWidth() { return getBorderWidth("Right"); }
279
- function getBorderTopWidth() { return getBorderWidth("Top"); }
280
- function getBorderBottomWidth() { return getBorderWidth("Bottom"); }
281
-
282
-
283
- /*
284
- * getPadding & friends
285
- * Padding width getters
286
- */
287
- function getPadding(sSide) {
288
- var n = getPixelValue(element.currentStyle["padding" + sSide]);
289
- return n || 0;
290
- }
291
- function getPaddingLeft() { return getPadding("Left"); }
292
- function getPaddingRight() { return getPadding("Right"); }
293
- function getPaddingTop() { return getPadding("Top"); }
294
- function getPaddingBottom() { return getPadding("Bottom"); }
295
-
296
-
297
-
298
- /*
299
- * getBoxSizing
300
- * Get the box-sizing value for the current element
301
- */
302
- function getBoxSizing(){
303
- var s = element.style;
304
- var cs = element.currentStyle
305
- if(typeof s.boxSizing != "undefined" && s.boxSizing != ""){
306
- return s.boxSizing;
307
- }
308
- if(typeof s["box-sizing"] != "undefined" && s["box-sizing"] != ""){
309
- return s["box-sizing"];
310
- }
311
- if(typeof cs.boxSizing != "undefined" && cs.boxSizing != ""){
312
- return cs.boxSizing;
313
- }
314
- if(typeof cs["box-sizing"] != "undefined" && cs["box-sizing"] != ""){
315
- return cs["box-sizing"];
316
- }
317
- return getDocumentBoxSizing();
318
- }
319
-
320
-
321
- /*
322
- * getDocumentBoxSizing
323
- * Get the default document box sizing (check for quirks mode)
324
- */
325
- function getDocumentBoxSizing(){
326
- if(doc.compatMode === null || doc.compatMode === "BackCompat"){
327
- return "border-box";
328
- }
329
- return "content-box"
330
- }
331
-
332
-
333
- /*
334
- * setBorderBoxWidth & friends
335
- * Width and height setters
336
- */
337
- function setBorderBoxWidth(n){
338
- element.runtimeStyle.width = Math.max(0, n - getBorderLeftWidth() -
339
- getPaddingLeft() - getPaddingRight() - getBorderRightWidth()) + "px";
340
- }
341
- function setBorderBoxHeight(n){
342
- element.runtimeStyle.height = Math.max(0, n - getBorderTopWidth() -
343
- getPaddingTop() - getPaddingBottom() - getBorderBottomWidth()) + "px";
344
- }
345
- function setContentBoxWidth(n){
346
- element.runtimeStyle.width = Math.max(0, n + getBorderLeftWidth() +
347
- getPaddingLeft() + getPaddingRight() + getBorderRightWidth()) + "px";
348
- }
349
- function setContentBoxHeight(n){
350
- element.runtimeStyle.height = Math.max(0, n + getBorderTopWidth() +
351
- getPaddingTop() + getPaddingBottom() + getBorderBottomWidth()) + "px";
352
- }
353
-
354
-
355
- /*
356
- * updateBorderBoxWidth & updateBorderBoxHeight
357
- *
358
- */
359
- function updateBorderBoxWidth() {
360
- if(getDocumentBoxSizing() == getBoxSizing()){
361
- return;
362
- }
363
- var csw = element.currentStyle.width;
364
- if(csw != "auto"){
365
- csw = getPixelWidth(element,csw);
366
- if(getBoxSizing() == "border-box"){
367
- setBorderBoxWidth(parseInt(csw));
368
- }
369
- else{
370
- setContentBoxWidth(parseInt(csw));
371
- }
372
- }
373
- }
374
-
375
- function updateBorderBoxHeight() {
376
- if(getDocumentBoxSizing() == getBoxSizing()){
377
- return;
378
- }
379
- var csh = element.currentStyle.height;
380
- if(csh != "auto"){
381
- csh = getPixelHeight(element,csh);
382
- if(csh !== "auto"){
383
- if(getBoxSizing() == "border-box"){
384
- setBorderBoxHeight(parseInt(csh));
385
- }
386
- else{
387
- setContentBoxHeight(parseInt(csh));
388
- }
389
- }
390
- }
391
- }
392
-
393
-
394
- // Run the calculations
395
- init();
396
-
397
- //]]>
398
- </script>
399
- </component>
@@ -1,23 +0,0 @@
1
- <?php
2
- /*
3
- This file is a wrapper, for use in PHP environments, which serves boxsizing.htc using the
4
- correct content-type, so that IE will recognize it as a behavior. Simply specify the
5
- behavior property to fetch this .php file instead of the .htc directly:
6
-
7
- //
8
- // Reset box sizing
9
- //
10
- * {
11
- margin: 0;
12
- @include box-sizing(border-box);
13
- *behavior: url(/sites/all/libraries/boxsizing/boxsizing.php);
14
- }
15
-
16
- This is only necessary when the web server is not configured to serve .htc files with
17
- the text/x-component content-type, and cannot easily be configured to do so (as is the
18
- case with some shared hosting providers).
19
- */
20
-
21
- header( 'Content-type: text/x-component' );
22
- include( 'boxsizing.htc' );
23
- ?>
@@ -1,4 +0,0 @@
1
- description "Box Sizing Polyfill Install"
2
-
3
- file 'behaviors/box-sizing/boxsizing.htc'
4
- file 'behaviors/box-sizing/boxsizing.php'
@@ -1,159 +0,0 @@
1
- @import "singularitygs";
2
-
3
- $break: 700px;
4
- $break2: 900px;
5
- $break3: 1200px;
6
-
7
- $grids: add-grid(2);
8
- $grids: add-grid(2 8 2 1 at $break);
9
- $grids: add-grid(12 at $break2);
10
- $grids: add-grid(1 3 5 7 9 at $break3);
11
- $gutters: add-gutter(1/3);
12
- // $gutters: add-gutter(.25 at $break);
13
- $output: 'float';
14
-
15
- body {
16
- margin: 0;
17
- padding: 0;
18
- @include background-grid;
19
- }
20
-
21
- div {
22
- height: 50px;
23
- }
24
-
25
- #foo {
26
- background: red;
27
- height: 30px;
28
- @include grid-span(1, 2);
29
-
30
- @include breakpoint($break) {
31
- @include grid-span(1, 4);
32
- clear: none;
33
- }
34
-
35
- @include breakpoint($break2) {
36
- @include grid-span(2, 11);
37
- }
38
-
39
- @include breakpoint($break3) {
40
- @include grid-span(1, 3);
41
- @include push(2, 1);
42
- }
43
- }
44
-
45
- #bar {
46
- background: green;
47
- height: 20px;
48
- @include grid-span(1, 1);
49
- clear: left;
50
-
51
- @include breakpoint($break) {
52
- @include grid-span(2, 2);
53
- @include push(1, 1);
54
- clear: none;
55
- }
56
-
57
- @include breakpoint($break2) {
58
- @include grid-span(8, 3);
59
- clear: none;
60
- }
61
-
62
- @include breakpoint($break3) {
63
- @include grid-span(1, 1);
64
- @include pull(3, 1);
65
- }
66
-
67
- }
68
-
69
- #baz {
70
- background: purple;
71
- @include grid-span(1, 1);
72
-
73
- @include breakpoint($break) {
74
- // This piece's position is very wonky in Float, and as such we need to do some custom silliness to place it. It winds up looking similar to Isolation positioning, but in revers. Fortunately, because we have functions like column-span, gutter-span, and grid-span, we're able to build this fairly easily and have the heavy lifting of the math done for us.
75
- width: column-span(1, 1);
76
- float: right;
77
- margin-left: -100%;
78
- margin-right: grid-span(2, 2) + gutter-span();
79
- clear: none;
80
- }
81
-
82
- @include breakpoint($break2) {
83
- margin-right: 0;
84
- @include grid-span(2, 1);
85
- @include pull(10, 1);
86
- clear: none;
87
- }
88
-
89
- @include breakpoint($break3) {
90
- @include grid-span(1, 5);
91
- }
92
- }
93
-
94
- #qux {
95
- background: yellow;
96
- @include grid-span(1, 1);
97
- clear: both;
98
-
99
- @include breakpoint($break) {
100
- @include grid-span(3, 2);
101
- // clear: left;
102
- }
103
-
104
- @include breakpoint($break2) {
105
- @include grid-span(3, 4);
106
- clear: both;
107
- @include push(3, 1);
108
- }
109
-
110
- @include breakpoint($break3) {
111
- @include grid-span(1, 2);
112
- clear: none;
113
- @include pull(2, 2);
114
- }
115
- }
116
-
117
- #waldo {
118
- background: blue;
119
- height: 70px;
120
-
121
- @include grid-span(1, 2);
122
-
123
- @include breakpoint($break) {
124
- @include grid-span(1, 1);
125
- clear: left;
126
- }
127
-
128
- @include breakpoint($break2) {
129
- @include grid-span(3, 1);
130
- @include pull(6, 1);
131
- }
132
-
133
- @include breakpoint($break3) {
134
- @include grid-span(1, 4);
135
- clear: none;
136
- margin-right: -100%;
137
- margin-left: 0;
138
- }
139
- }
140
-
141
- #garfield {
142
- background: orange;
143
-
144
- @include grid-span(2, 1);
145
-
146
- @include breakpoint($break) {
147
- @include float-span(4, 1);
148
- }
149
-
150
- @include breakpoint($break2) {
151
- @include grid-span(5, 8);
152
- }
153
-
154
- @include breakpoint($break3) {
155
- @include grid-span(2, 3);
156
- clear: both;
157
- @include push(2, 1);
158
- }
159
- }
@@ -1,132 +0,0 @@
1
- @import "singularitygs";
2
-
3
- $break: 700px;
4
- $break2: 900px;
5
- $break3: 1200px;
6
-
7
- $grids: add-grid(2);
8
- $grids: add-grid(2 8 2 1 at $break);
9
- $grids: add-grid(12 at $break2);
10
- $grids: add-grid(1 3 5 7 9 at $break3);
11
- $gutters: add-gutter(1/3);
12
- // $gutters: add-gutter(.25 at $break);
13
- // $output: 'float';
14
-
15
- body {
16
- margin: 0;
17
- padding: 0;
18
- @include background-grid;
19
- }
20
-
21
- div {
22
- height: 50px;
23
- }
24
-
25
- #foo {
26
- background: red;
27
- height: 30px;
28
- @include grid-span(1, 2);
29
-
30
- @include breakpoint($break) {
31
- @include grid-span(1, 4);
32
- }
33
-
34
- @include breakpoint($break2) {
35
- @include grid-span(2, 11);
36
- }
37
-
38
- @include breakpoint($break3) {
39
- @include grid-span(1, 3);
40
- }
41
- }
42
-
43
- #bar {
44
- background: green;
45
- height: 20px;
46
- @include grid-span(1, 1);
47
-
48
- @include breakpoint($break) {
49
- @include grid-span(2, 2);
50
- }
51
-
52
- @include breakpoint($break2) {
53
- @include grid-span(8, 3)
54
- }
55
-
56
- @include breakpoint($break3) {
57
- @include grid-span(1, 1);
58
- }
59
-
60
- }
61
-
62
- #baz {
63
- background: purple;
64
- @include grid-span(1, 1, $options: 'both');
65
-
66
- @include breakpoint($break) {
67
- @include grid-span(1, 1);
68
- }
69
-
70
- @include breakpoint($break2) {
71
- @include grid-span(2, 1);
72
- }
73
-
74
- @include breakpoint($break3) {
75
- @include grid-span(1, 5);
76
- }
77
- }
78
-
79
- #qux {
80
- background: yellow;
81
-
82
- @include grid-span(1, 1, $options: 'left');
83
-
84
- @include breakpoint($break) {
85
- @include grid-span(3, 2, $options: 'left');
86
- }
87
-
88
- @include breakpoint($break2) {
89
- @include grid-span(3, 4, $options: 'both');
90
- }
91
-
92
- @include breakpoint($break3) {
93
- @include grid-span(1, 2);
94
- }
95
- }
96
-
97
- #waldo {
98
- background: blue;
99
- height: 70px;
100
-
101
- @include grid-span(1, 2, $options: 'right');
102
-
103
- @include breakpoint($break) {
104
- @include grid-span(1, 1, $options: 'left');
105
- }
106
-
107
- @include breakpoint($break2) {
108
- @include grid-span(3, 1, $options: 'right');
109
- }
110
-
111
- @include breakpoint($break3) {
112
- @include grid-span(1, 4);
113
- }
114
- }
115
-
116
- #garfield {
117
- background: orange;
118
-
119
- @include grid-span(2, 1, $options: 'left');
120
-
121
- @include breakpoint($break) {
122
- @include isolation-span(4, 1, 'both');
123
- }
124
-
125
- @include breakpoint($break2) {
126
- @include grid-span(5, 8);
127
- }
128
-
129
- @include breakpoint($break3) {
130
- @include grid-span(2, 3, $options: 'both');
131
- }
132
- }
@@ -1,18 +0,0 @@
1
- <% project_name = File.basename(Compass.configuration.project_path) %><% project_js = Compass.configuration.javascripts_dir %><% project_css = Compass.configuration.css_dir %>
2
- <html>
3
- <head>
4
- <title>Singularity HTML Demo</title>
5
- <link rel="stylesheet" href="<%= project_css %>/demo-float.css">
6
- </head>
7
- <body>
8
- <div id="page">
9
- <div id="foo"></div>
10
- <div id="bar"></div>
11
- <div id="baz"></div>
12
- <div id="qux"></div>
13
- <div id="waldo"></div>
14
- <div id="garfield"></div>
15
- </div>
16
-
17
- </body>
18
- </html>
@@ -1,18 +0,0 @@
1
- <% project_name = File.basename(Compass.configuration.project_path) %><% project_js = Compass.configuration.javascripts_dir %><% project_css = Compass.configuration.css_dir %>
2
- <html>
3
- <head>
4
- <title>Singularity HTML Demo</title>
5
- <link rel="stylesheet" href="<%= project_css %>/demo-isolation.css">
6
- </head>
7
- <body>
8
- <div id="page">
9
- <div id="foo"></div>
10
- <div id="bar"></div>
11
- <div id="baz"></div>
12
- <div id="qux"></div>
13
- <div id="waldo"></div>
14
- <div id="garfield"></div>
15
- </div>
16
-
17
- </body>
18
- </html>
@@ -1,17 +0,0 @@
1
- description "Singularity Demos"
2
-
3
- discover :stylesheets
4
- file 'isolation.html.erb', :to => 'isolation.html', :erb => true
5
- file 'float.html.erb', :to => 'float.html', :erb => true
6
-
7
- help %Q{
8
- For help with Singularity, please ask a question on Stack Overflow (http://stackoverflow.com/questions/ask) tagged with "singularitygs".
9
-
10
- To file an issue with Singularity, please use our GitHub Issue Queue (https://github.com/Team-Sass/Singularity/issues).
11
- }
12
-
13
- welcome_message %Q{
14
- Welcome to the Singularity Demo!
15
-
16
- These two sites, with their accompanying Sass, should give you a working example as to how Singularity works with its two out-of-the-box output styles.
17
- }
@@ -1,16 +0,0 @@
1
- (function() {
2
- window.onload = function() {
3
- var body = document.body;
4
- body.onkeypress = function(e) {
5
- if (e.keyCode == 103 || e.charCode == 103) {
6
- var dev = body.getAttribute('data-development-grid');
7
- if (dev === null || dev == 'hide') {
8
- body.setAttribute('data-development-grid', 'show');
9
- }
10
- else {
11
- body.setAttribute('data-development-grid', 'hide');
12
- }
13
- }
14
- }
15
- }
16
- })();
@@ -1,2 +0,0 @@
1
- /*Grid Toggle*/
2
- window.onload=function(){var b=document.body;b.onkeypress=function(a){if(103==a.keyCode||103==a.charCode)a=b.getAttribute("data-development-grid"),null===a||"hide"==a?b.setAttribute("data-development-grid","show"):b.setAttribute("data-development-grid","hide")}};
@@ -1,22 +0,0 @@
1
- description "Singularity Grid Toggle"
2
-
3
- discover :javascripts
4
-
5
- help %Q{
6
- For help with Singularity, please ask a question on Stack Overflow (http://stackoverflow.com/questions/ask) tagged with "singularitygs".
7
-
8
- To file an issue with Singularity, please use our GitHub Issue Queue (https://github.com/Team-Sass/Singularity/issues).
9
- }
10
-
11
- welcome_message %Q{
12
- Welcome to Singularity! Grids Without Limits.
13
-
14
- See our Getting Started guide at http://singularity.gs to get started and for full documentation.
15
-
16
- If you need support for IE6/7, you should install the Border Box polyfill. Simply type `compass install singularitygs/box-sizing` in your command line from the root of your project folder (where config.rb is).
17
-
18
-
19
- For help with Singularity, please ask a question on Stack Overflow (http://stackoverflow.com/questions/ask) tagged with "singularitygs".
20
-
21
- To file an issue with Singularity, please use our GitHub Issue Queue (https://github.com/Team-Sass/Singularity/issues).
22
- }
@@ -1,16 +0,0 @@
1
- (function() {
2
- window.onload = function() {
3
- var body = document.body;
4
- body.onkeypress = function(e) {
5
- if (e.keyCode == 103 || e.charCode == 103) {
6
- var dev = body.getAttribute('data-development-grid');
7
- if (dev === null || dev == 'hide') {
8
- body.setAttribute('data-development-grid', 'show');
9
- }
10
- else {
11
- body.setAttribute('data-development-grid', 'hide');
12
- }
13
- }
14
- }
15
- }
16
- })();
@@ -1,2 +0,0 @@
1
- /*Grid Toggle*/
2
- window.onload=function(){var b=document.body;b.onkeypress=function(a){if(103==a.keyCode||103==a.charCode)a=b.getAttribute("data-development-grid"),null===a||"hide"==a?b.setAttribute("data-development-grid","show"):b.setAttribute("data-development-grid","hide")}};
@@ -1,23 +0,0 @@
1
- description "Singularity Install"
2
-
3
- discover :stylesheets
4
- discover :javascripts
5
-
6
- help %Q{
7
- For help with Singularity, please ask a question on Stack Overflow (http://stackoverflow.com/questions/ask) tagged with "singularitygs".
8
-
9
- To file an issue with Singularity, please use our GitHub Issue Queue (https://github.com/Team-Sass/Singularity/issues).
10
- }
11
-
12
- welcome_message %Q{
13
- Welcome to Singularity! Grids Without Limits.
14
-
15
- See our Getting Started guide at http://singularity.gs to get started and for full documentation.
16
-
17
- If you need support for IE6/7, you should install the Border Box polyfill. Simply type `compass install singularitygs/box-sizing` in your command line from the root of your project folder (where config.rb is).
18
-
19
-
20
- For help with Singularity, please ask a question on Stack Overflow (http://stackoverflow.com/questions/ask) tagged with "singularitygs".
21
-
22
- To file an issue with Singularity, please use our GitHub Issue Queue (https://github.com/Team-Sass/Singularity/issues).
23
- }
@@ -1,4 +0,0 @@
1
- //////////////////////////////
2
- // Imports
3
- //////////////////////////////
4
- @import "singularitygs";
@@ -1,15 +0,0 @@
1
- //////////////////////////////
2
- // Set legacy support
3
- //
4
- // If you need support for IE6 or IE7, you should install the Box Sizing polyfill.
5
- // In your project's folder from the command line, type the following:
6
- // compass install singularitygs/box-sizing
7
- //////////////////////////////
8
- $legacy-support-for-ie6: false;
9
- $legacy-support-for-ie7: false;
10
- $legacy-support-for-mozilla: false;
11
-
12
- //////////////////////////////
13
- // Import Base
14
- //////////////////////////////
15
- @import "partials/base";