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.
- checksums.yaml +7 -0
- data/LICENSE.txt +22 -0
- data/VERSION +1 -0
- data/data/caniuse.json +1 -0
- data/data/caniuse_extras/css-placeholder.json +171 -0
- data/lib/compass/browser_support.rb +64 -0
- data/lib/compass/configuration/adapters.rb +109 -0
- data/lib/compass/configuration/data.rb +199 -0
- data/lib/compass/configuration/defaults.rb +207 -0
- data/lib/compass/configuration/inheritance.rb +307 -0
- data/lib/compass/configuration/paths.rb +19 -0
- data/lib/compass/configuration/watch.rb +38 -0
- data/lib/compass/configuration.rb +175 -0
- data/lib/compass/core/caniuse.rb +314 -0
- data/lib/compass/core/generated_version.rb +6 -0
- data/lib/compass/core/sass_extensions/functions/colors.rb +67 -0
- data/lib/compass/core/sass_extensions/functions/configuration.rb +173 -0
- data/lib/compass/core/sass_extensions/functions/constants.rb +56 -0
- data/lib/compass/core/sass_extensions/functions/cross_browser_support.rb +270 -0
- data/lib/compass/core/sass_extensions/functions/display.rb +32 -0
- data/lib/compass/core/sass_extensions/functions/enumerate.rb +7 -0
- data/lib/compass/core/sass_extensions/functions/env.rb +72 -0
- data/lib/compass/core/sass_extensions/functions/files.rb +33 -0
- data/lib/compass/core/sass_extensions/functions/font_files.rb +65 -0
- data/lib/compass/core/sass_extensions/functions/gradient_support.rb +859 -0
- data/lib/compass/core/sass_extensions/functions/image_size.rb +117 -0
- data/lib/compass/core/sass_extensions/functions/inline_image.rb +63 -0
- data/lib/compass/core/sass_extensions/functions/lists.rb +102 -0
- data/lib/compass/core/sass_extensions/functions/math.rb +105 -0
- data/lib/compass/core/sass_extensions/functions/selectors.rb +79 -0
- data/lib/compass/core/sass_extensions/functions/urls.rb +315 -0
- data/lib/compass/core/sass_extensions/functions.rb +41 -0
- data/lib/compass/core/sass_extensions/monkey_patches/browser_support.rb +119 -0
- data/lib/compass/core/sass_extensions/monkey_patches/traversal.rb +23 -0
- data/lib/compass/core/sass_extensions/monkey_patches.rb +3 -0
- data/lib/compass/core/sass_extensions.rb +10 -0
- data/lib/compass/core/version.rb +13 -0
- data/lib/compass/core.rb +78 -0
- data/lib/compass/error.rb +5 -0
- data/lib/compass/frameworks.rb +181 -0
- data/lib/compass/util.rb +19 -0
- data/lib/compass-core.rb +1 -0
- data/stylesheets/_compass.scss +3 -0
- data/stylesheets/_lemonade.scss +38 -0
- data/stylesheets/compass/_configuration.scss +54 -0
- data/stylesheets/compass/_css3.scss +21 -0
- data/stylesheets/compass/_layout.scss +3 -0
- data/stylesheets/compass/_reset-legacy.scss +3 -0
- data/stylesheets/compass/_reset.scss +3 -0
- data/stylesheets/compass/_support.scss +447 -0
- data/stylesheets/compass/_typography.scss +4 -0
- data/stylesheets/compass/_utilities.scss +9 -0
- data/stylesheets/compass/css3/_animation.scss +122 -0
- data/stylesheets/compass/css3/_appearance.scss +17 -0
- data/stylesheets/compass/css3/_background-clip.scss +35 -0
- data/stylesheets/compass/css3/_background-origin.scss +37 -0
- data/stylesheets/compass/css3/_background-size.scss +19 -0
- data/stylesheets/compass/css3/_border-radius.scss +107 -0
- data/stylesheets/compass/css3/_box-shadow.scss +88 -0
- data/stylesheets/compass/css3/_box-sizing.scss +21 -0
- data/stylesheets/compass/css3/_box.scss +85 -0
- data/stylesheets/compass/css3/_columns.scss +212 -0
- data/stylesheets/compass/css3/_deprecated-support.scss +272 -0
- data/stylesheets/compass/css3/_filter.scss +50 -0
- data/stylesheets/compass/css3/_flexbox.scss +156 -0
- data/stylesheets/compass/css3/_font-face.scss +48 -0
- data/stylesheets/compass/css3/_hyphenation.scss +71 -0
- data/stylesheets/compass/css3/_images.scss +152 -0
- data/stylesheets/compass/css3/_inline-block.scss +31 -0
- data/stylesheets/compass/css3/_opacity.scss +27 -0
- data/stylesheets/compass/css3/_pie.scss +1 -0
- data/stylesheets/compass/css3/_regions.scss +27 -0
- data/stylesheets/compass/css3/_selection.scss +59 -0
- data/stylesheets/compass/css3/_shared.scss +5 -0
- data/stylesheets/compass/css3/_text-shadow.scss +82 -0
- data/stylesheets/compass/css3/_transform.scss +590 -0
- data/stylesheets/compass/css3/_transition.scss +190 -0
- data/stylesheets/compass/css3/_user-interface.scss +71 -0
- data/stylesheets/compass/layout/_grid-background.scss +178 -0
- data/stylesheets/compass/layout/_sticky-footer.scss +23 -0
- data/stylesheets/compass/layout/_stretching.scss +24 -0
- data/stylesheets/compass/reset/_utilities-legacy.scss +135 -0
- data/stylesheets/compass/reset/_utilities.scss +142 -0
- data/stylesheets/compass/typography/_links.scss +3 -0
- data/stylesheets/compass/typography/_lists.scss +4 -0
- data/stylesheets/compass/typography/_text.scss +4 -0
- data/stylesheets/compass/typography/_units.scss +183 -0
- data/stylesheets/compass/typography/_vertical_rhythm.scss +300 -0
- data/stylesheets/compass/typography/links/_hover-link.scss +5 -0
- data/stylesheets/compass/typography/links/_link-colors.scss +28 -0
- data/stylesheets/compass/typography/links/_unstyled-link.scss +7 -0
- data/stylesheets/compass/typography/lists/_bullets.scss +34 -0
- data/stylesheets/compass/typography/lists/_horizontal-list.scss +63 -0
- data/stylesheets/compass/typography/lists/_inline-block-list.scss +50 -0
- data/stylesheets/compass/typography/lists/_inline-list.scss +47 -0
- data/stylesheets/compass/typography/text/_ellipsis.scss +25 -0
- data/stylesheets/compass/typography/text/_force-wrap.scss +12 -0
- data/stylesheets/compass/typography/text/_nowrap.scss +2 -0
- data/stylesheets/compass/typography/text/_replacement.scss +74 -0
- data/stylesheets/compass/utilities/_color.scss +1 -0
- data/stylesheets/compass/utilities/_general.scss +6 -0
- data/stylesheets/compass/utilities/_links.scss +5 -0
- data/stylesheets/compass/utilities/_lists.scss +6 -0
- data/stylesheets/compass/utilities/_print.scss +17 -0
- data/stylesheets/compass/utilities/_sass.scss +2 -0
- data/stylesheets/compass/utilities/_sprites.scss +2 -0
- data/stylesheets/compass/utilities/_tables.scss +3 -0
- data/stylesheets/compass/utilities/_text.scss +5 -0
- data/stylesheets/compass/utilities/color/_brightness.scss +20 -0
- data/stylesheets/compass/utilities/color/_contrast.scss +52 -0
- data/stylesheets/compass/utilities/general/_clearfix.scss +44 -0
- data/stylesheets/compass/utilities/general/_float.scss +38 -0
- data/stylesheets/compass/utilities/general/_hacks.scss +65 -0
- data/stylesheets/compass/utilities/general/_min.scss +16 -0
- data/stylesheets/compass/utilities/general/_reset.scss +2 -0
- data/stylesheets/compass/utilities/general/_tabs.scss +1 -0
- data/stylesheets/compass/utilities/general/_tag-cloud.scss +18 -0
- data/stylesheets/compass/utilities/links/_hover-link.scss +3 -0
- data/stylesheets/compass/utilities/links/_link-colors.scss +3 -0
- data/stylesheets/compass/utilities/links/_unstyled-link.scss +3 -0
- data/stylesheets/compass/utilities/lists/_bullets.scss +3 -0
- data/stylesheets/compass/utilities/lists/_horizontal-list.scss +3 -0
- data/stylesheets/compass/utilities/lists/_inline-block-list.scss +3 -0
- data/stylesheets/compass/utilities/lists/_inline-list.scss +3 -0
- data/stylesheets/compass/utilities/sass/_lists.scss +16 -0
- data/stylesheets/compass/utilities/sass/_maps.scss +19 -0
- data/stylesheets/compass/utilities/sprites/_base.scss +92 -0
- data/stylesheets/compass/utilities/sprites/_sprite-img.scss +81 -0
- data/stylesheets/compass/utilities/tables/_alternating-rows-and-columns.scss +22 -0
- data/stylesheets/compass/utilities/tables/_borders.scss +38 -0
- data/stylesheets/compass/utilities/tables/_scaffolding.scss +9 -0
- data/stylesheets/compass/utilities/text/_ellipsis.scss +3 -0
- data/stylesheets/compass/utilities/text/_nowrap.scss +3 -0
- data/stylesheets/compass/utilities/text/_replacement.scss +3 -0
- data/templates/ellipsis/ellipsis.sass +9 -0
- data/templates/ellipsis/manifest.rb +27 -0
- data/templates/ellipsis/xml/ellipsis.xml +14 -0
- data/templates/extension/manifest.rb +26 -0
- data/templates/extension/stylesheets/main.sass +1 -0
- data/templates/extension/templates/project/manifest.rb +2 -0
- data/templates/extension/templates/project/screen.sass +2 -0
- data/templates/project/USAGE.markdown +32 -0
- data/templates/project/ie.sass +6 -0
- data/templates/project/manifest.rb +4 -0
- data/templates/project/print.sass +6 -0
- data/templates/project/screen.sass +7 -0
- metadata +257 -0
@@ -0,0 +1,65 @@
|
|
1
|
+
module Compass::Core::SassExtensions::Functions::FontFiles
|
2
|
+
FONT_TYPES = {
|
3
|
+
:woff => 'woff',
|
4
|
+
:woff2 => 'woff2',
|
5
|
+
:otf => 'opentype',
|
6
|
+
:opentype => 'opentype',
|
7
|
+
:ttf => 'truetype',
|
8
|
+
:truetype => 'truetype',
|
9
|
+
:svg => 'svg',
|
10
|
+
:eot => 'embedded-opentype'
|
11
|
+
}
|
12
|
+
|
13
|
+
def font_formats(*args)
|
14
|
+
formats = []
|
15
|
+
with_each_font_file(*args) do |path, type|
|
16
|
+
formats << identifier(type)
|
17
|
+
end
|
18
|
+
return list(formats, :comma)
|
19
|
+
end
|
20
|
+
|
21
|
+
def font_files(*args)
|
22
|
+
return null unless args.any?
|
23
|
+
files = []
|
24
|
+
with_each_font_file(*args) do |path, type|
|
25
|
+
files << list(font_url(path), identifier("format('#{type}')"), :space)
|
26
|
+
end
|
27
|
+
list(files, :comma)
|
28
|
+
end
|
29
|
+
|
30
|
+
protected
|
31
|
+
def with_each_font_file(*args)
|
32
|
+
skip_next = false
|
33
|
+
|
34
|
+
args.each_with_index do |path, index|
|
35
|
+
assert_type path, :String
|
36
|
+
path = unquote(path)
|
37
|
+
# if we were told to skip this iteration, do so...
|
38
|
+
if skip_next
|
39
|
+
skip_next = false
|
40
|
+
next
|
41
|
+
end
|
42
|
+
|
43
|
+
# back-compat support for passing the font type e.g.
|
44
|
+
# font-files('path/to/file.ttf', truetype, 'path/to/file.otf', opentype);
|
45
|
+
type = args[index + 1]
|
46
|
+
type = type.nil? ? :wrong : type.value.to_sym
|
47
|
+
|
48
|
+
# if the type is valid, keep it, and skip the next index (as it was the type)
|
49
|
+
if FONT_TYPES.key? type
|
50
|
+
skip_next = true
|
51
|
+
# otherwise, we need to look at the file extension to derive the type...
|
52
|
+
else
|
53
|
+
# let pass url like font.type?thing#stuff
|
54
|
+
type = path.to_s.split('.').last.gsub(/(\?(.*))?(#(.*))?\"?/, '').to_sym
|
55
|
+
end
|
56
|
+
|
57
|
+
if FONT_TYPES.key? type
|
58
|
+
yield(path, FONT_TYPES[type]) if block_given?
|
59
|
+
else
|
60
|
+
raise Sass::SyntaxError, "Could not determine font type for #{path}"
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
end
|