stylewithclass 1.0.1

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('stylewithclass', :path => extension_path)
@@ -0,0 +1,27 @@
1
+ //
2
+ // Bootstrap
3
+ //
4
+
5
+ // Imports
6
+ @import "stylewithclasses/settings";
7
+ @import "stylewithclasses/margins";
8
+ @import "stylewithclasses/paddings";
9
+ @import "stylewithclasses/fonts";
10
+ @import "stylewithclasses/misc";
11
+
12
+
13
+
14
+
15
+
16
+
17
+
18
+
19
+
20
+
21
+
22
+
23
+
24
+
25
+
26
+
27
+
@@ -0,0 +1,35 @@
1
+ //
2
+ // Fonts
3
+ //
4
+ // * Relative font sizes
5
+ // * Absolute font sizes
6
+ //
7
+
8
+ // Font settings
9
+ $min-fs: 8 !default;
10
+ $max-fs: 32 !default;
11
+
12
+ // Relative font sizes
13
+ @for $i from $min-fs through $max-fs {
14
+ .fs-r-#{$i} {
15
+ font-size: ($i / 16)em;
16
+ }
17
+ }
18
+
19
+ // Absolut font sizes
20
+ @for $i from $min-fs through $max-fs {
21
+ .fs-a-#{$i} {
22
+ font-size: $i * 1px;
23
+ }
24
+ }
25
+
26
+ // Text aligns
27
+ .txt-al-lt {
28
+ text-align: left;
29
+ }
30
+ .txt-al-c {
31
+ text-align: center;
32
+ }
33
+ .txt-al-rt {
34
+ text-align: right;
35
+ }
@@ -0,0 +1,48 @@
1
+ //
2
+ // Margins
3
+ //
4
+
5
+ // Directions
6
+ $directions: lt rt tp bm ver hor all;
7
+
8
+ // Min and max for dimensions for margins and paddings
9
+ $min-pm: 1 !default;
10
+ $max-pm: 50 !default;
11
+ $step-pm: 1 !default;
12
+
13
+ // Margins
14
+ @each $dir in $directions {
15
+
16
+ // Set minimum
17
+ $i: $min-pm;
18
+
19
+ @while $i < $max-pm {
20
+ @if $dir == all {
21
+ .m-#{$i*1} {
22
+ margin: $i * 1px;
23
+ }
24
+ }
25
+ @else {
26
+ .m-#{$dir}-#{$i*1} {
27
+ @if $dir == lt {
28
+ margin-left: $i * 1px;
29
+ } @else if $dir == rt {
30
+ margin-right: $i * 1px;
31
+ } @else if $dir == tp {
32
+ margin-top: $i * 1px;
33
+ } @else if $dir == bm {
34
+ margin-bottom: $i * 1px;
35
+ } @else if $dir == ver {
36
+ margin-bottom: $i * 1px;
37
+ margin-top: $i * 1px;
38
+ } @else if $dir == hor {
39
+ margin-left: $i * 1px;
40
+ margin-right: $i * 1px;
41
+ }
42
+ }
43
+ }
44
+
45
+ // Increase with step
46
+ $i: $i + $step-pm;
47
+ }
48
+ }
@@ -0,0 +1,46 @@
1
+ //
2
+ // Miscellaneous
3
+ //
4
+ // * Positions
5
+ // * Floats
6
+ // * Clears
7
+ // * Overflow hidden
8
+ //
9
+
10
+ // Positions
11
+ .p-a {
12
+ position: absolute;
13
+ }
14
+ .p-r {
15
+ position: relative;
16
+ }
17
+ .p-f {
18
+ position: fixed;
19
+ }
20
+ .p-s {
21
+ position: sticky; // New HTML-5 feature
22
+ }
23
+
24
+ // Floats
25
+ .f-lt {
26
+ float: left;
27
+ }
28
+ .f-rt {
29
+ float: right;
30
+ }
31
+
32
+ // Clears
33
+ .cl-b {
34
+ clear: both;
35
+ }
36
+ .cl-lt {
37
+ clear: left;
38
+ }
39
+ .cl-rt {
40
+ clear: right;
41
+ }
42
+
43
+ // Overflow hidden for wrapping elements in a wrapper
44
+ .of-hid {
45
+ overflow: hidden;
46
+ }
@@ -0,0 +1,48 @@
1
+ //
2
+ // Paddings
3
+ //
4
+
5
+ // Directions
6
+ $directions: lt rt tp bm ver hor all;
7
+
8
+ // Min and max for dimensions for margins and paddings
9
+ $min-pm: 1 !default;
10
+ $max-pm: 50 !default;
11
+ $step-pm: 1 !default;
12
+
13
+ // Paddings
14
+ @each $dir in $directions {
15
+
16
+ // Set minimum
17
+ $i: $min-pm;
18
+
19
+ @while $i < $max-pm {
20
+ @if $dir == all {
21
+ .p-#{$i*1} {
22
+ padding: $i * 1px;
23
+ }
24
+ }
25
+ @else {
26
+ .p-#{$dir}-#{$i*1} {
27
+ @if $dir == lt {
28
+ padding-left: $i * 1px;
29
+ } @else if $dir == rt {
30
+ padding-right: $i * 1px;
31
+ } @else if $dir == tp {
32
+ padding-top: $i * 1px;
33
+ } @else if $dir == bm {
34
+ padding-bottom: $i * 1px;
35
+ } @else if $dir == ver {
36
+ padding-bottom: $i * 1px;
37
+ padding-top: $i * 1px;
38
+ } @else if $dir == hor {
39
+ padding-left: $i * 1px;
40
+ padding-right: $i * 1px;
41
+ }
42
+ }
43
+ }
44
+
45
+ // Increase with step
46
+ $i: $i + $step-pm;
47
+ }
48
+ }
@@ -0,0 +1,13 @@
1
+ //
2
+ // Settings
3
+ //
4
+
5
+ // Min and max paddings and margins
6
+ $min-pm: 1 !default;
7
+ $max-pm: 50 !default;
8
+ $step-pm: 1 !default;
9
+
10
+ // Min and max for font sizes
11
+ $min-fs: 8 !default;
12
+ $max-fs: 16 !default;
13
+
metadata ADDED
@@ -0,0 +1,81 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: stylewithclass
3
+ version: !ruby/object:Gem::Version
4
+ prerelease: false
5
+ segments:
6
+ - 1
7
+ - 0
8
+ - 1
9
+ version: 1.0.1
10
+ platform: ruby
11
+ authors:
12
+ - Tingan Ho
13
+ autorequire:
14
+ bindir: bin
15
+ cert_chain: []
16
+
17
+ date: 2012-09-15 00:00:00 +02:00
18
+ default_executable:
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
21
+ name: compass
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - ">="
26
+ - !ruby/object:Gem::Version
27
+ segments:
28
+ - 0
29
+ - 11
30
+ version: "0.11"
31
+ type: :runtime
32
+ version_requirements: *id001
33
+ description: StyleWithClass lets you style your web pages using predefined CSS classes that are commonly used. Such as paddings, margins, position, clear, floats etc.
34
+ email: tingan@clockies.com
35
+ executables: []
36
+
37
+ extensions: []
38
+
39
+ extra_rdoc_files: []
40
+
41
+ files:
42
+ - README.md
43
+ - lib/stylewithclass.rb
44
+ - stylesheets/_stylewithclass.scss
45
+ - stylesheets/stylewithclass/_fonts.scss
46
+ - stylesheets/stylewithclass/_margins.scss
47
+ - stylesheets/stylewithclass/_misc.scss
48
+ - stylesheets/stylewithclass/_paddings.scss
49
+ - stylesheets/stylewithclass/_settings.scss
50
+ has_rdoc: true
51
+ homepage: http://github.com/tinganho/stylewithclass
52
+ licenses: []
53
+
54
+ post_install_message:
55
+ rdoc_options: []
56
+
57
+ require_paths:
58
+ - lib
59
+ required_ruby_version: !ruby/object:Gem::Requirement
60
+ requirements:
61
+ - - ">="
62
+ - !ruby/object:Gem::Version
63
+ segments:
64
+ - 0
65
+ version: "0"
66
+ required_rubygems_version: !ruby/object:Gem::Requirement
67
+ requirements:
68
+ - - ">="
69
+ - !ruby/object:Gem::Version
70
+ segments:
71
+ - 0
72
+ version: "0"
73
+ requirements: []
74
+
75
+ rubyforge_project: stylewithclass
76
+ rubygems_version: 1.3.6
77
+ signing_key:
78
+ specification_version: 3
79
+ summary: Style your web page using css classes
80
+ test_files: []
81
+