base.sass 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (29) hide show
  1. checksums.yaml +4 -4
  2. data/{base.sass.rb → lib/base.sass.rb} +1 -1
  3. data/stylesheets/_base.functions.scss +15 -0
  4. data/stylesheets/_base.resets.scss +4 -0
  5. data/{_base.settings.scss → stylesheets/base.sass/_settings.scss} +0 -0
  6. data/{functions → stylesheets/base.sass/functions}/_clearfix.scss +2 -2
  7. data/{functions/_compass.scss → stylesheets/base.sass/functions/_compass-hacker.scss} +0 -5
  8. data/{functions → stylesheets/base.sass/functions}/_ellipsis-overflow.scss +2 -2
  9. data/{functions → stylesheets/base.sass/functions}/_fixed-position.scss +0 -0
  10. data/{functions → stylesheets/base.sass/functions}/_float.scss +0 -0
  11. data/{functions → stylesheets/base.sass/functions}/_font-face.scss +0 -0
  12. data/{functions → stylesheets/base.sass/functions}/_img-retina.scss +0 -0
  13. data/{functions → stylesheets/base.sass/functions}/_map.scss +0 -0
  14. data/{functions → stylesheets/base.sass/functions}/_support.scss +0 -0
  15. data/{resets → stylesheets/base.sass/resets}/_basic.scss +0 -0
  16. data/{resets → stylesheets/base.sass/resets}/_button-and-input.scss +0 -0
  17. data/{resets → stylesheets/base.sass/resets}/_html5-tag.scss +0 -0
  18. data/{resets → stylesheets/base.sass/resets}/_small-label.scss +0 -0
  19. metadata +22 -30
  20. data/_base.components.scss +0 -7
  21. data/_base.functions.scss +0 -9
  22. data/_base.resets.scss +0 -4
  23. data/components/_button.scss +0 -127
  24. data/components/_code.scss +0 -48
  25. data/components/_display.scss +0 -15
  26. data/components/_float.scss +0 -11
  27. data/components/_form-item.scss +0 -35
  28. data/components/_input.scss +0 -29
  29. data/components/_message.scss +0 -44
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6f1527de9738b984d7fbc0c24bedbadf48fb3139
4
- data.tar.gz: ea7c27137a24bb6a6e842f96b48a5c68510b2cf8
3
+ metadata.gz: f88a430a55771dee575d0009152324c8976436f7
4
+ data.tar.gz: 25bf4e85ceda97e0037c33abbb9b9fa491b86367
5
5
  SHA512:
6
- metadata.gz: 2e99f1d7d3e23b1e50cb113d87147fa64faea6a1a6b43333bcac479f294208ab76f7d05fc71924c63a7f6f40ad039d7627a262768a188f053f4c1b879664d4d9
7
- data.tar.gz: 36b18820829474eab502714fe0b016c6a88096c4fe74fe5e3d2b10edf1068bb15564dcb571014f53b2d49922d0c02f00bc4241daefa5e611aa4a4e5a2a2dd594
6
+ metadata.gz: f26e4e20663de1ae78842dd4ec08ca5115ebffb3548672ff8950caa75d93298e1c3aaaf88009e615d89c1d97e2777280ec021684309fd10714e72527a52ac865
7
+ data.tar.gz: f00abdce92c934f82ff745516910281c1be224008c688a6081acd8900722d4d4948cd0e7000e3b3be72ce0aa26eaabd9208c676e26c799df37dc9155824d0c62
@@ -1,4 +1,4 @@
1
- path = File.expand_path(File.dirname(__FILE__))
1
+ path = File.expand_path(File.join(File.dirname(__FILE__), '../stylesheets'))
2
2
 
3
3
  if ENV.has_key?('SASS_PATH')
4
4
  ENV['SASS_PATH'] = ENV['SASS_PATH'] + File::PATH_SEPARATOR + path
@@ -0,0 +1,15 @@
1
+ @import 'base.sass/settings';
2
+
3
+ @import 'compass/css3';
4
+ @import 'compass/css3/selection';
5
+ @import 'compass/reset/utilities'; // Only use reset-font, reset-list-style, reset-table and reset-html5
6
+ @import 'base.sass/functions/compass-hacker';
7
+
8
+ @import 'base.sass/functions/clearfix';
9
+ @import 'base.sass/functions/ellipsis-overflow';
10
+ @import 'base.sass/functions/fixed-position';
11
+ @import 'base.sass/functions/float';
12
+ @import 'base.sass/functions/font-face';
13
+ @import 'base.sass/functions/img-retina';
14
+ @import 'base.sass/functions/map';
15
+ @import 'base.sass/functions/support';
@@ -0,0 +1,4 @@
1
+ @import 'base.sass/resets/basic';
2
+ @import 'base.sass/resets/button-and-input';
3
+ @import 'base.sass/resets/html5-tag';
4
+ @import 'base.sass/resets/small-label';
@@ -1,6 +1,6 @@
1
1
  @mixin clearfix {
2
2
  // Only register once
3
- @if not global-variable-exists(clearfix-exists) {
3
+ @if not global-variable-exists(-clearfix-exists) {
4
4
  @at-root %clearfix {
5
5
  &#{$pseudo-element-colon}before,
6
6
  &#{$pseudo-element-colon}after {
@@ -18,7 +18,7 @@
18
18
  }
19
19
 
20
20
  // Mark
21
- $clearfix-exists: true !global;
21
+ $-clearfix-exists: true !global;
22
22
  }
23
23
 
24
24
  @extend %clearfix;
@@ -1,8 +1,3 @@
1
- @import 'compass/css3';
2
- @import 'compass/css3/selection';
3
- @import 'compass/reset/utilities'; // Only use reset-font, reset-list-style, reset-table and reset-html5
4
- @import 'compass/utilities/sass';
5
-
6
1
  // Override `compass/css3/appearance`
7
2
  @mixin appearance($appearance) {
8
3
  @each $prefix in -webkit, -moz {
@@ -1,6 +1,6 @@
1
1
  @mixin ellipsis-overflow {
2
2
  // Only register once
3
- @if not global-variable-exists(ellipsis-overflow-exists) {
3
+ @if not global-variable-exists(-ellipsis-overflow-exists) {
4
4
  @at-root %ellipsis-overflow {
5
5
  overflow: hidden;
6
6
  text-overflow: ellipsis;
@@ -8,7 +8,7 @@
8
8
  }
9
9
 
10
10
  // Mark
11
- $ellipsis-overflow-exists: true !global;
11
+ $-ellipsis-overflow-exists: true !global;
12
12
  }
13
13
 
14
14
  @extend %ellipsis-overflow;
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: base.sass
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - junjun.zhang <http://MrZhang.me>
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-18 00:00:00.000000000 Z
11
+ date: 2014-04-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sass
@@ -17,7 +17,7 @@ dependencies:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: 3.3.5
20
- type: :development
20
+ type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
@@ -31,7 +31,7 @@ dependencies:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: 1.0.0.alpha
34
- type: :development
34
+ type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
@@ -44,31 +44,23 @@ executables: []
44
44
  extensions: []
45
45
  extra_rdoc_files: []
46
46
  files:
47
- - _base.components.scss
48
- - _base.functions.scss
49
- - _base.resets.scss
50
- - _base.settings.scss
51
- - base.sass.rb
52
- - components/_button.scss
53
- - components/_code.scss
54
- - components/_display.scss
55
- - components/_float.scss
56
- - components/_form-item.scss
57
- - components/_input.scss
58
- - components/_message.scss
59
- - functions/_clearfix.scss
60
- - functions/_compass.scss
61
- - functions/_ellipsis-overflow.scss
62
- - functions/_fixed-position.scss
63
- - functions/_float.scss
64
- - functions/_font-face.scss
65
- - functions/_img-retina.scss
66
- - functions/_map.scss
67
- - functions/_support.scss
68
- - resets/_basic.scss
69
- - resets/_button-and-input.scss
70
- - resets/_html5-tag.scss
71
- - resets/_small-label.scss
47
+ - lib/base.sass.rb
48
+ - stylesheets/_base.functions.scss
49
+ - stylesheets/_base.resets.scss
50
+ - stylesheets/base.sass/_settings.scss
51
+ - stylesheets/base.sass/functions/_clearfix.scss
52
+ - stylesheets/base.sass/functions/_compass-hacker.scss
53
+ - stylesheets/base.sass/functions/_ellipsis-overflow.scss
54
+ - stylesheets/base.sass/functions/_fixed-position.scss
55
+ - stylesheets/base.sass/functions/_float.scss
56
+ - stylesheets/base.sass/functions/_font-face.scss
57
+ - stylesheets/base.sass/functions/_img-retina.scss
58
+ - stylesheets/base.sass/functions/_map.scss
59
+ - stylesheets/base.sass/functions/_support.scss
60
+ - stylesheets/base.sass/resets/_basic.scss
61
+ - stylesheets/base.sass/resets/_button-and-input.scss
62
+ - stylesheets/base.sass/resets/_html5-tag.scss
63
+ - stylesheets/base.sass/resets/_small-label.scss
72
64
  homepage: https://github.com/jsw0528/base.sass
73
65
  licenses:
74
66
  - MIT
@@ -76,7 +68,7 @@ metadata: {}
76
68
  post_install_message:
77
69
  rdoc_options: []
78
70
  require_paths:
79
- - "."
71
+ - lib
80
72
  required_ruby_version: !ruby/object:Gem::Requirement
81
73
  requirements:
82
74
  - - ">="
@@ -1,7 +0,0 @@
1
- @import 'components/display';
2
- @import 'components/float';
3
- @import 'components/button';
4
- @import 'components/input';
5
- @import 'components/form-item';
6
- @import 'components/message';
7
- @import 'components/code';
data/_base.functions.scss DELETED
@@ -1,9 +0,0 @@
1
- @import 'functions/compass';
2
- @import 'functions/clearfix';
3
- @import 'functions/ellipsis-overflow';
4
- @import 'functions/fixed-position';
5
- @import 'functions/float';
6
- @import 'functions/font-face';
7
- @import 'functions/img-retina';
8
- @import 'functions/map';
9
- @import 'functions/support';
data/_base.resets.scss DELETED
@@ -1,4 +0,0 @@
1
- @import 'resets/basic';
2
- @import 'resets/button-and-input';
3
- @import 'resets/html5-tag';
4
- @import 'resets/small-label';
@@ -1,127 +0,0 @@
1
- @function disabled-selectors() {
2
- $selectors: unquote('&[disabled], &[disabled]:hover');
3
- @if support-legacy-browser(ie, 6) {
4
- $selectors: join($selectors, unquote('&.disabled, &.disabled:hover'), comma);
5
- }
6
- @return $selectors;
7
- }
8
-
9
- // Default styles
10
- .btn {
11
- @include inline-block;
12
- padding: 4px 15px;
13
- background: {
14
- color: #eaeaea;
15
- repeat: repeat-x;
16
- }
17
- @include background-image(linear-gradient(#fafafa, #eaeaea));
18
- border: 1px solid #ddd;
19
- border-bottom-color: #c5c5c5;
20
- border-radius: 4px;
21
- box-shadow: 0 1px 3px rgba(#000, 0.05);
22
- color: $text-color;
23
- font-weight: 500;
24
- vertical-align: middle;
25
- white-space: nowrap;
26
- text-shadow: 0 1px rgba(#fff, 0.9);
27
- cursor: pointer;
28
- @include user-select(none);
29
-
30
- &:hover {
31
- background-color: #dadada;
32
- @include background-image(linear-gradient(#eaeaea, #dadada));
33
- border-color: #ccc #ccc #b5b5b5;
34
- color: $text-color;
35
- text-decoration: none;
36
- }
37
-
38
- &:active {
39
- background: {
40
- color: #dadada;
41
- image: none;
42
- }
43
- border-color: #b5b5b5;
44
- box-shadow: 0 3px 5px rgba(#000, 0.15) inset;
45
- }
46
-
47
- #{disabled-selectors()} {
48
- background: {
49
- color: #e5e5e5;
50
- image: none;
51
- }
52
- border-color: #c5c5c5;
53
- box-shadow: none;
54
- color: #666;
55
- text-shadow: 0 1px rgba(#fff, 0.9);
56
- cursor: default;
57
- @include opacity(0.5);
58
- }
59
- }
60
- button.btn {
61
- @if support-legacy-browser(ie, 7) {
62
- *padding: {
63
- top: 1px;
64
- bottom: 2px;
65
- }
66
- }
67
- }
68
-
69
- .btn-primary {
70
- &, #{disabled-selectors()} {
71
- background-color: #60b044;
72
- @include background-image(linear-gradient(#8add6d, #60b044));
73
- color: #fff;
74
- text-shadow: 0 -1px rgba(#000, 0.25);
75
- }
76
-
77
- border-color: #5ca941;
78
-
79
- #{disabled-selectors()} {
80
- border-color: #74bb5a #74bb5a #509338;
81
- }
82
-
83
- &:hover {
84
- background-color: #569e3d;
85
- @include background-image(linear-gradient(#79d858, #569e3d));
86
- border-color: #4a993e;
87
- color: #fff;
88
- }
89
-
90
- &:active {
91
- background: {
92
- color: #569e3d;
93
- image: none;
94
- }
95
- border-color: #418737;
96
- }
97
- }
98
-
99
- // dangerous operation
100
- .btn-danger {
101
- color: #900;
102
-
103
- &:hover {
104
- background-color: #b33630;
105
- @include background-image(linear-gradient(#dc5f59, #b33630));
106
- border-color: #cd504a;
107
- color: #fff;
108
- text-shadow: 0 -1px rgba(#000, 0.3);
109
- }
110
-
111
- &:active {
112
- background: {
113
- color: #b33630;
114
- image: none;
115
- }
116
- border-color: #9f312c;
117
- color: #fff;
118
- }
119
-
120
- #{disabled-selectors()} {
121
- background-color: #e1e1e1;
122
- @include background-image(linear-gradient(#fff, #e1e1e1));
123
- border-color: #c5c5c5;
124
- color: #900;
125
- text-shadow: 0 1px rgba(#fff, 0.9);
126
- }
127
- }
@@ -1,48 +0,0 @@
1
- $font-family-code: Monaco, Menlo, Consolas, Courier New, monospace !default;
2
- $code-colors: (
3
- inline: (
4
- text: #c7254e,
5
- background: #f9f2f4,
6
- border: transparent
7
- ),
8
- block: (
9
- text: inherit,
10
- background: #f5f5f5,
11
- border: #ccc
12
- )
13
- ) !default;
14
-
15
-
16
- code, pre {
17
- font-family: $font-family-code;
18
- }
19
-
20
- code {
21
- margin: 0 3px;
22
- padding: 2px 4px;
23
- background-color: map-find($code-colors, 'inline.background');
24
- border: 1px solid map-find($code-colors, 'inline.border');
25
- border-radius: 4px;
26
- color: map-find($code-colors, 'inline.text');
27
- font-size: 90%;
28
- white-space: nowrap;
29
- }
30
-
31
- pre {
32
- padding: 6px 10px;
33
- overflow: auto;
34
- background-color: map-find($code-colors, 'block.background');
35
- border: 1px solid map-find($code-colors, 'block.border');
36
- border-radius: 4px;
37
- color: map-find($code-colors, 'block.text');
38
-
39
- code {
40
- margin: 0;
41
- padding: 0;
42
- background-color: transparent;
43
- border: 0;
44
- color: inherit;
45
- font-size: inherit;
46
- white-space: pre;
47
- }
48
- }
@@ -1,15 +0,0 @@
1
- .fn-show {
2
- display: block !important;
3
- }
4
-
5
- .fn-hide {
6
- display: none !important;
7
- }
8
-
9
- .fn-invisible {
10
- visibility: hidden !important;
11
- }
12
-
13
- .fn-text-overflow {
14
- @include ellipsis-overflow;
15
- }
@@ -1,11 +0,0 @@
1
- .fn-clear {
2
- @include clearfix;
3
- }
4
-
5
- .fn-left {
6
- @include float(left, true);
7
- }
8
-
9
- .fn-right {
10
- @include float(right, true);
11
- }
@@ -1,35 +0,0 @@
1
- .form-item {
2
- @include clearfix;
3
- padding: 10px;
4
-
5
- .input {
6
- width: 33%;
7
- min-width: 200px;
8
- margin-right: 5px;
9
- }
10
-
11
- .btn[type='submit'] {
12
- font-size: round($font-size-base * 1.25);
13
- }
14
-
15
- .heading-label {
16
- display: block;
17
- margin-bottom: 5px;
18
- cursor: pointer;
19
- }
20
-
21
- .linking-label {
22
- margin: {
23
- left: 5px;
24
- right: 5px;
25
- }
26
- vertical-align: middle;
27
- cursor: pointer;
28
- }
29
-
30
- .required#{$pseudo-element-colon}after {
31
- content: '*';
32
- margin-left: 5px;
33
- color: #d9534f;
34
- }
35
- }
@@ -1,29 +0,0 @@
1
- .input {
2
- padding: 8px 7px 6px;
3
- background-color: #fafafa;
4
- border: 1px solid #c5c5c5;
5
- border-radius: 4px;
6
- box-shadow: 0 1px 2px rgba(#000, 0.075) inset;
7
- outline: 0;
8
- line-height: 1.2;
9
- @include transition(border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out);
10
-
11
- &:focus {
12
- background-color: #fff;
13
- border-color: #51a7e8;
14
- box-shadow: 0 1px 2px rgba(#000, 0.075) inset, 0 0 5px rgba(#51a7e8, 0.5);
15
- }
16
-
17
- &[disabled], &[readonly] {
18
- background-color: #e5e5e5;
19
- border-color: #c5c5c5;
20
- @include opacity(0.5);
21
- cursor: not-allowed;
22
- }
23
- }
24
-
25
- textarea.input {
26
- overflow: auto;
27
- resize: vertical;
28
- line-height: $line-height-base;
29
- }
@@ -1,44 +0,0 @@
1
- $message-colors: (
2
- success: (
3
- text: #468847,
4
- background: #dff0d8,
5
- border: darken(adjust-hue(#dff0d8, -10), 5%)
6
- ),
7
- error: (
8
- text: #b94a48,
9
- background: #f2dede,
10
- border: darken(adjust-hue(#f2dede, -10), 3%)
11
- ),
12
- warn: (
13
- text: #c09853,
14
- background: #fcf8e3,
15
- border: darken(adjust-hue(#fcf8e3, -10), 3%)
16
- ),
17
- info: (
18
- text: #3a87ad,
19
- background: #d9edf7,
20
- border: darken(adjust-hue(#d9edf7, -10), 7%)
21
- )
22
- ) !default;
23
-
24
-
25
- %message {
26
- margin-bottom: 15px;
27
- padding: 8px 13px 6px;
28
- border: 1px solid transparent;
29
- border-radius: 4px;
30
- text-align: left;
31
- }
32
-
33
- @each $type, $colors in $message-colors {
34
- .message-#{$type} {
35
- @extend %message;
36
- background-color: map-get($colors, background);
37
- border-color: map-get($colors, border);
38
- color: map-get($colors, text);
39
-
40
- a {
41
- color: darken(map-get($colors, text), 10%);
42
- }
43
- }
44
- }