compass-core-sass37 1.1.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.
Files changed (147) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.txt +22 -0
  3. data/VERSION +1 -0
  4. data/data/caniuse.json +1 -0
  5. data/data/caniuse_extras/css-placeholder.json +171 -0
  6. data/lib/compass/browser_support.rb +64 -0
  7. data/lib/compass/configuration/adapters.rb +109 -0
  8. data/lib/compass/configuration/data.rb +199 -0
  9. data/lib/compass/configuration/defaults.rb +207 -0
  10. data/lib/compass/configuration/inheritance.rb +307 -0
  11. data/lib/compass/configuration/paths.rb +19 -0
  12. data/lib/compass/configuration/watch.rb +38 -0
  13. data/lib/compass/configuration.rb +175 -0
  14. data/lib/compass/core/caniuse.rb +314 -0
  15. data/lib/compass/core/generated_version.rb +6 -0
  16. data/lib/compass/core/sass_extensions/functions/colors.rb +67 -0
  17. data/lib/compass/core/sass_extensions/functions/configuration.rb +173 -0
  18. data/lib/compass/core/sass_extensions/functions/constants.rb +56 -0
  19. data/lib/compass/core/sass_extensions/functions/cross_browser_support.rb +270 -0
  20. data/lib/compass/core/sass_extensions/functions/display.rb +32 -0
  21. data/lib/compass/core/sass_extensions/functions/enumerate.rb +7 -0
  22. data/lib/compass/core/sass_extensions/functions/env.rb +72 -0
  23. data/lib/compass/core/sass_extensions/functions/files.rb +33 -0
  24. data/lib/compass/core/sass_extensions/functions/font_files.rb +65 -0
  25. data/lib/compass/core/sass_extensions/functions/gradient_support.rb +859 -0
  26. data/lib/compass/core/sass_extensions/functions/image_size.rb +117 -0
  27. data/lib/compass/core/sass_extensions/functions/inline_image.rb +63 -0
  28. data/lib/compass/core/sass_extensions/functions/lists.rb +102 -0
  29. data/lib/compass/core/sass_extensions/functions/math.rb +105 -0
  30. data/lib/compass/core/sass_extensions/functions/selectors.rb +79 -0
  31. data/lib/compass/core/sass_extensions/functions/urls.rb +315 -0
  32. data/lib/compass/core/sass_extensions/functions.rb +41 -0
  33. data/lib/compass/core/sass_extensions/monkey_patches/browser_support.rb +119 -0
  34. data/lib/compass/core/sass_extensions/monkey_patches/traversal.rb +23 -0
  35. data/lib/compass/core/sass_extensions/monkey_patches.rb +3 -0
  36. data/lib/compass/core/sass_extensions.rb +10 -0
  37. data/lib/compass/core/version.rb +13 -0
  38. data/lib/compass/core.rb +78 -0
  39. data/lib/compass/error.rb +5 -0
  40. data/lib/compass/frameworks.rb +181 -0
  41. data/lib/compass/util.rb +19 -0
  42. data/lib/compass-core.rb +1 -0
  43. data/stylesheets/_compass.scss +3 -0
  44. data/stylesheets/_lemonade.scss +38 -0
  45. data/stylesheets/compass/_configuration.scss +54 -0
  46. data/stylesheets/compass/_css3.scss +21 -0
  47. data/stylesheets/compass/_layout.scss +3 -0
  48. data/stylesheets/compass/_reset-legacy.scss +3 -0
  49. data/stylesheets/compass/_reset.scss +3 -0
  50. data/stylesheets/compass/_support.scss +447 -0
  51. data/stylesheets/compass/_typography.scss +4 -0
  52. data/stylesheets/compass/_utilities.scss +9 -0
  53. data/stylesheets/compass/css3/_animation.scss +122 -0
  54. data/stylesheets/compass/css3/_appearance.scss +17 -0
  55. data/stylesheets/compass/css3/_background-clip.scss +35 -0
  56. data/stylesheets/compass/css3/_background-origin.scss +37 -0
  57. data/stylesheets/compass/css3/_background-size.scss +19 -0
  58. data/stylesheets/compass/css3/_border-radius.scss +107 -0
  59. data/stylesheets/compass/css3/_box-shadow.scss +88 -0
  60. data/stylesheets/compass/css3/_box-sizing.scss +21 -0
  61. data/stylesheets/compass/css3/_box.scss +85 -0
  62. data/stylesheets/compass/css3/_columns.scss +212 -0
  63. data/stylesheets/compass/css3/_deprecated-support.scss +272 -0
  64. data/stylesheets/compass/css3/_filter.scss +50 -0
  65. data/stylesheets/compass/css3/_flexbox.scss +156 -0
  66. data/stylesheets/compass/css3/_font-face.scss +48 -0
  67. data/stylesheets/compass/css3/_hyphenation.scss +71 -0
  68. data/stylesheets/compass/css3/_images.scss +152 -0
  69. data/stylesheets/compass/css3/_inline-block.scss +31 -0
  70. data/stylesheets/compass/css3/_opacity.scss +27 -0
  71. data/stylesheets/compass/css3/_pie.scss +1 -0
  72. data/stylesheets/compass/css3/_regions.scss +27 -0
  73. data/stylesheets/compass/css3/_selection.scss +59 -0
  74. data/stylesheets/compass/css3/_shared.scss +5 -0
  75. data/stylesheets/compass/css3/_text-shadow.scss +82 -0
  76. data/stylesheets/compass/css3/_transform.scss +590 -0
  77. data/stylesheets/compass/css3/_transition.scss +190 -0
  78. data/stylesheets/compass/css3/_user-interface.scss +71 -0
  79. data/stylesheets/compass/layout/_grid-background.scss +178 -0
  80. data/stylesheets/compass/layout/_sticky-footer.scss +23 -0
  81. data/stylesheets/compass/layout/_stretching.scss +24 -0
  82. data/stylesheets/compass/reset/_utilities-legacy.scss +135 -0
  83. data/stylesheets/compass/reset/_utilities.scss +142 -0
  84. data/stylesheets/compass/typography/_links.scss +3 -0
  85. data/stylesheets/compass/typography/_lists.scss +4 -0
  86. data/stylesheets/compass/typography/_text.scss +4 -0
  87. data/stylesheets/compass/typography/_units.scss +183 -0
  88. data/stylesheets/compass/typography/_vertical_rhythm.scss +300 -0
  89. data/stylesheets/compass/typography/links/_hover-link.scss +5 -0
  90. data/stylesheets/compass/typography/links/_link-colors.scss +28 -0
  91. data/stylesheets/compass/typography/links/_unstyled-link.scss +7 -0
  92. data/stylesheets/compass/typography/lists/_bullets.scss +34 -0
  93. data/stylesheets/compass/typography/lists/_horizontal-list.scss +63 -0
  94. data/stylesheets/compass/typography/lists/_inline-block-list.scss +50 -0
  95. data/stylesheets/compass/typography/lists/_inline-list.scss +47 -0
  96. data/stylesheets/compass/typography/text/_ellipsis.scss +25 -0
  97. data/stylesheets/compass/typography/text/_force-wrap.scss +12 -0
  98. data/stylesheets/compass/typography/text/_nowrap.scss +2 -0
  99. data/stylesheets/compass/typography/text/_replacement.scss +74 -0
  100. data/stylesheets/compass/utilities/_color.scss +1 -0
  101. data/stylesheets/compass/utilities/_general.scss +6 -0
  102. data/stylesheets/compass/utilities/_links.scss +5 -0
  103. data/stylesheets/compass/utilities/_lists.scss +6 -0
  104. data/stylesheets/compass/utilities/_print.scss +17 -0
  105. data/stylesheets/compass/utilities/_sass.scss +2 -0
  106. data/stylesheets/compass/utilities/_sprites.scss +2 -0
  107. data/stylesheets/compass/utilities/_tables.scss +3 -0
  108. data/stylesheets/compass/utilities/_text.scss +5 -0
  109. data/stylesheets/compass/utilities/color/_brightness.scss +20 -0
  110. data/stylesheets/compass/utilities/color/_contrast.scss +52 -0
  111. data/stylesheets/compass/utilities/general/_clearfix.scss +44 -0
  112. data/stylesheets/compass/utilities/general/_float.scss +38 -0
  113. data/stylesheets/compass/utilities/general/_hacks.scss +65 -0
  114. data/stylesheets/compass/utilities/general/_min.scss +16 -0
  115. data/stylesheets/compass/utilities/general/_reset.scss +2 -0
  116. data/stylesheets/compass/utilities/general/_tabs.scss +1 -0
  117. data/stylesheets/compass/utilities/general/_tag-cloud.scss +18 -0
  118. data/stylesheets/compass/utilities/links/_hover-link.scss +3 -0
  119. data/stylesheets/compass/utilities/links/_link-colors.scss +3 -0
  120. data/stylesheets/compass/utilities/links/_unstyled-link.scss +3 -0
  121. data/stylesheets/compass/utilities/lists/_bullets.scss +3 -0
  122. data/stylesheets/compass/utilities/lists/_horizontal-list.scss +3 -0
  123. data/stylesheets/compass/utilities/lists/_inline-block-list.scss +3 -0
  124. data/stylesheets/compass/utilities/lists/_inline-list.scss +3 -0
  125. data/stylesheets/compass/utilities/sass/_lists.scss +16 -0
  126. data/stylesheets/compass/utilities/sass/_maps.scss +19 -0
  127. data/stylesheets/compass/utilities/sprites/_base.scss +92 -0
  128. data/stylesheets/compass/utilities/sprites/_sprite-img.scss +81 -0
  129. data/stylesheets/compass/utilities/tables/_alternating-rows-and-columns.scss +22 -0
  130. data/stylesheets/compass/utilities/tables/_borders.scss +38 -0
  131. data/stylesheets/compass/utilities/tables/_scaffolding.scss +9 -0
  132. data/stylesheets/compass/utilities/text/_ellipsis.scss +3 -0
  133. data/stylesheets/compass/utilities/text/_nowrap.scss +3 -0
  134. data/stylesheets/compass/utilities/text/_replacement.scss +3 -0
  135. data/templates/ellipsis/ellipsis.sass +9 -0
  136. data/templates/ellipsis/manifest.rb +27 -0
  137. data/templates/ellipsis/xml/ellipsis.xml +14 -0
  138. data/templates/extension/manifest.rb +26 -0
  139. data/templates/extension/stylesheets/main.sass +1 -0
  140. data/templates/extension/templates/project/manifest.rb +2 -0
  141. data/templates/extension/templates/project/screen.sass +2 -0
  142. data/templates/project/USAGE.markdown +32 -0
  143. data/templates/project/ie.sass +6 -0
  144. data/templates/project/manifest.rb +4 -0
  145. data/templates/project/print.sass +6 -0
  146. data/templates/project/screen.sass +7 -0
  147. metadata +257 -0
@@ -0,0 +1,181 @@
1
+ module Compass
2
+ module Frameworks
3
+ extend self
4
+
5
+ ALL = []
6
+
7
+ class Framework
8
+ attr_accessor :name
9
+ attr_accessor :path
10
+ attr_accessor :version
11
+ attr_accessor :templates_directory, :stylesheets_directory
12
+ def initialize(name, *arguments)
13
+ options = arguments.last.is_a?(Hash) ? arguments.pop : {}
14
+ self.path = path = options[:path] || arguments.shift
15
+ @name = name
16
+ @templates_directory = options[:templates_directory]
17
+ @templates_directory ||= File.join(path, 'templates') if path
18
+ @stylesheets_directory = options[:stylesheets_directory]
19
+ @stylesheets_directory ||= File.join(path, 'stylesheets') if path
20
+ @version = options[:version]
21
+ end
22
+
23
+ def template_directories
24
+ if templates_directory
25
+ Dir.glob(File.join(templates_directory, "*")).map{|f| File.basename(f)}
26
+ else
27
+ []
28
+ end
29
+ end
30
+
31
+ def manifest_file(pattern)
32
+ File.join(templates_directory, pattern.to_s, "manifest.rb")
33
+ end
34
+
35
+ def manifest(pattern, options = {})
36
+ options[:pattern_name] ||= pattern
37
+ Compass::Installers::Manifest.new(manifest_file(pattern), options)
38
+ end
39
+ end
40
+
41
+ def detect_registration
42
+ @registered = nil
43
+ yield
44
+ @registered
45
+ ensure
46
+ @registered = nil
47
+ end
48
+
49
+ def register(name, *arguments)
50
+ opts = if arguments.last.is_a?(Hash)
51
+ arguments.last
52
+ else
53
+ o = {}
54
+ arguments << o
55
+ o
56
+ end
57
+ opts[:version] ||= guess_gem_version(caller[0])
58
+ @registered = Framework.new(name, *arguments)
59
+ if idx = ALL.index(self[name])
60
+ ALL[idx] = @registered
61
+ else
62
+ ALL << @registered
63
+ end
64
+ end
65
+
66
+ def [](name)
67
+ ALL.detect{|f| f.name.to_s == name.to_s}
68
+ end
69
+
70
+ def guess_gem_version(line_reference)
71
+ if line_reference =~ %r{/gems/([^/]*-[^/]*)/}
72
+ split_at = $1.rindex("-")
73
+ name = $1[1...split_at]
74
+ version = $1[(split_at + 1)..-1]
75
+ version unless name == "compass"
76
+ end
77
+ end
78
+
79
+ def discover(frameworks_directory)
80
+ if frameworks_directory == :defaults
81
+ warn("The :defaults argument to Compass::Frameworks.discover is no longer necessary")
82
+ return
83
+ end
84
+ frameworks_directory = Dir.new(frameworks_directory) unless frameworks_directory.is_a?(Dir)
85
+ dirs = frameworks_directory.entries.reject{|e| e =~ /^\./}.sort_by{|n| n =~ /^_/ ? n[1..-1] : n}
86
+ dirs.each do |framework|
87
+ register_directory File.join(frameworks_directory.path, framework)
88
+ end
89
+ end
90
+
91
+ def register_directory(directory)
92
+ loaders = [
93
+ File.join(directory, "compass_init.rb"),
94
+ File.join(directory, 'lib', File.basename(directory)+".rb"),
95
+ File.join(directory, File.basename(directory)+".rb")
96
+ ]
97
+ loader = loaders.detect{|l| File.exist?(l)}
98
+ registered_framework = detect_registration do
99
+ require loader if loader
100
+ end
101
+ unless registered_framework
102
+ register File.basename(directory), directory
103
+ end
104
+ end
105
+
106
+ def template_exists?(template)
107
+ framework_name, template = template.split(%r{/}, 2)
108
+ template ||= "project"
109
+ if (framework = self[framework_name]) && framework.templates_directory
110
+ return File.directory?(File.join(framework.templates_directory, template))
111
+ end
112
+ false
113
+ end
114
+
115
+ def template_usage(template)
116
+ framework_name, template = template.split(%r{/}, 2)
117
+ framework = self[framework_name]
118
+ template ||= "project"
119
+ usage_file = File.join(framework.templates_directory, template, "USAGE.markdown")
120
+ if File.exist?(usage_file)
121
+ File.read(usage_file)
122
+ elsif help = framework.manifest(template).help
123
+ help
124
+ else
125
+ <<-END.gsub(/^ {8}/, '')
126
+ No Usage!
127
+ END
128
+ end
129
+ end
130
+
131
+ def pretty_print(skip_patterns = false)
132
+ result = ""
133
+ max = Compass::Frameworks::ALL.inject(0) do |gm, framework|
134
+ fm = framework.template_directories.inject(0) do |lm,pattern|
135
+ [lm, 7 + framework.name.size + pattern.size].max
136
+ end
137
+ [gm, fm].max
138
+ end
139
+ Compass::Frameworks::ALL.each do |framework|
140
+ next if framework.name =~ /^_/
141
+ result << " * #{framework.name}\n"
142
+ unless skip_patterns
143
+ framework.template_directories.each do |pattern|
144
+ result << " - #{framework.name}/#{pattern}".ljust(max)
145
+ if description = framework.manifest(pattern).description
146
+ result << " - #{description}"
147
+ end
148
+ result << "\n"
149
+ end
150
+ end
151
+ end
152
+ result
153
+ end
154
+ end
155
+
156
+ class << self
157
+ def discover_gem_extensions!
158
+ if defined?(Gem)
159
+ Gem.find_files("compass-*").map{|f| File.basename(f, ".rb")}.each do |compass_extension|
160
+ begin
161
+ require compass_extension
162
+ rescue Gem::LoadError, LoadError
163
+ Compass::Util.compass_warn "Unable to load extension: #{compass_extension}"
164
+ end
165
+ end
166
+ end
167
+ end
168
+
169
+ def discover_extensions!
170
+ Compass.shared_extension_paths.each do |extensions_path|
171
+ if File.directory?(extensions_path)
172
+ Compass::Frameworks.discover(extensions_path)
173
+ end
174
+ end
175
+ if File.directory?(configuration.extensions_path)
176
+ Compass::Frameworks.discover(configuration.extensions_path)
177
+ end
178
+ discover_gem_extensions!
179
+ end
180
+ end
181
+ end
@@ -0,0 +1,19 @@
1
+ module Compass::Util
2
+ extend self
3
+
4
+ def compass_warn(*args)
5
+ Sass::Util.sass_warn(*args)
6
+ end
7
+
8
+ def blank?(value)
9
+ case value
10
+ when NilClass, FalseClass
11
+ true
12
+ when String, Array
13
+ value.length.zero?
14
+ else
15
+ false
16
+ end
17
+ end
18
+
19
+ end
@@ -0,0 +1 @@
1
+ require 'compass/core'
@@ -0,0 +1,3 @@
1
+ @import "compass/utilities";
2
+ @import "compass/typography";
3
+ @import "compass/css3";
@@ -0,0 +1,38 @@
1
+ @mixin image-dimensions($file) {
2
+ height: image-height($file);
3
+ width: image-width($file);
4
+ }
5
+
6
+ @mixin sprite-image($file) {
7
+ background: sprite-image($file) $repeat;
8
+ }
9
+
10
+ @mixin sized-sprite-image($file) {
11
+ background: sprite-image($file);
12
+ @include image-dimensions($file);
13
+ }
14
+
15
+ @mixin sprite-folder($folder, $image-dimensions: false) {
16
+ .#{$folder} {
17
+ @if $image-dimensions {
18
+ background: sprite-url($folder);
19
+ }
20
+ @else {
21
+ background: sprite-url($folder) no-repeat;
22
+ }
23
+ }
24
+ @for $i from 0 to sprite-files-in-folder($folder) {
25
+ $file: sprite-file-from-folder($folder, $i);
26
+ .#{$folder}-#{image-basename($file)} {
27
+ @extend .#{$folder};
28
+ background-position: sprite-position(sprite-file-from-folder($folder, $i));
29
+ @if $image-dimensions {
30
+ @include image-dimensions($file);
31
+ }
32
+ }
33
+ }
34
+ }
35
+
36
+ @mixin sized-sprite-folder($folder) {
37
+ @include sprite-folder($folder, true);
38
+ }
@@ -0,0 +1,54 @@
1
+ $project-path: null !default;
2
+ $debug-configuration: false !default;
3
+ $compass-initialized: false !default;
4
+ $compass-configured: false !default;
5
+
6
+ @mixin debug-compass-configuration {
7
+ @if $debug-configuration {
8
+ /* Compass Configuration: */
9
+ @each $setting, $value in compass-configuration() {
10
+ /* #{$setting}: #{inspect($value)} */
11
+ }
12
+ }
13
+ }
14
+
15
+ // This mixin resets the compass configuration
16
+ // and then initializes it with the sass options
17
+ // set in the environment. It is immediately called during import.
18
+ // It's unlikely you'll need to call this mixin yourself.
19
+ @mixin compass-initializer($project-path: $project-path) {
20
+ @if not $compass-initialized and not using-compass-compiler() {
21
+ $default-configuration: reset-configuration();
22
+ $default-configuration: add-sass-configuration($project-path);
23
+ }
24
+ $compass-initialized: true !global;
25
+ @include debug-compass-configuration;
26
+ }
27
+ @include compass-initializer;
28
+
29
+ // `$options`:
30
+ // A map of compass configuration options.
31
+ // E.g. @include compass-configuration((asset-host:
32
+ // Keywords style ar
33
+ // `$reconfigure`:
34
+ // When unset, if compass-configuration is called more than once, a warning will
35
+ // be issued and all calls after the first will be ignored.
36
+ // When set to `false`, all subsequent calls will be ignored without a warning.
37
+ // When set to `true`, the configuration will be added to any existing configuration.
38
+ @mixin compass-configuration($options: (), $reconfigure: null, $arguments...) {
39
+ @if not at-stylesheet-root() {
40
+ // this should be @error once that exists.
41
+ @warn "include compass-configuration from the root level of your stylesheet."
42
+ }
43
+ @if not $compass-configured or $reconfigure {
44
+ $options: map-merge($options, keywords($arguments));
45
+ @if length($arguments) > 0 {
46
+ @warn "compass-configuration accepts keyword arguments or a single map of options. Got: #{inspect($arguments)}."
47
+ }
48
+ $invoke: add-configuration($options);
49
+ @include debug-compass-configuration;
50
+ $compass-configured: true !global;
51
+ } @else if $reconfigure == null {
52
+ @warn "Compass was already configured for this stylesheet."
53
+ }
54
+ }
@@ -0,0 +1,21 @@
1
+ @import "css3/border-radius";
2
+ @import "css3/inline-block";
3
+ @import "css3/opacity";
4
+ @import "css3/box-shadow";
5
+ @import "css3/text-shadow";
6
+ @import "css3/columns";
7
+ @import "css3/box-sizing";
8
+ @import "css3/flexbox";
9
+ @import "css3/images";
10
+ @import "css3/background-clip";
11
+ @import "css3/background-origin";
12
+ @import "css3/background-size";
13
+ @import "css3/font-face";
14
+ @import "css3/transform";
15
+ @import "css3/transition";
16
+ @import "css3/appearance";
17
+ @import "css3/animation";
18
+ @import "css3/regions";
19
+ @import "css3/hyphenation";
20
+ @import "css3/filter";
21
+ @import "css3/user-interface";
@@ -0,0 +1,3 @@
1
+ @import "layout/grid-background";
2
+ @import "layout/sticky-footer";
3
+ @import "layout/stretching";
@@ -0,0 +1,3 @@
1
+ @import "reset/utilities-legacy";
2
+
3
+ @include global-reset;
@@ -0,0 +1,3 @@
1
+ @import "reset/utilities";
2
+
3
+ @include global-reset;