archetype 0.0.1.pre.1 → 0.0.1.pre.3.00dfd9a
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CHANGELOG.md +88 -0
- data/LICENSE +16 -0
- data/README.md +87 -1
- data/VERSION.yml +6 -0
- data/lib/README.rdoc +4 -0
- data/lib/archetype.rb +45 -0
- data/lib/archetype/functions.rb +9 -0
- data/lib/archetype/functions/hash.rb +149 -0
- data/lib/archetype/functions/helpers.rb +125 -0
- data/lib/archetype/functions/styleguide_memoizer.rb +61 -0
- data/lib/archetype/sass_extensions.rb +6 -0
- data/lib/archetype/sass_extensions/functions.rb +14 -0
- data/lib/archetype/sass_extensions/functions/environment.rb +14 -0
- data/lib/archetype/sass_extensions/functions/lists.rb +284 -0
- data/lib/archetype/sass_extensions/functions/locale.rb +77 -0
- data/lib/archetype/sass_extensions/functions/numbers.rb +19 -0
- data/lib/archetype/sass_extensions/functions/styleguide.rb +406 -0
- data/lib/archetype/sass_extensions/functions/ui.rb +59 -0
- data/lib/archetype/sass_extensions/functions/version.rb +95 -0
- data/lib/archetype/version.rb +75 -0
- data/stylesheets/_archetype.scss +2 -0
- data/stylesheets/archetype/_base.scss +46 -0
- data/stylesheets/archetype/_config.scss +366 -0
- data/stylesheets/archetype/_grid.scss +3 -0
- data/stylesheets/archetype/_hacks.scss +72 -0
- data/stylesheets/archetype/_init.scss +23 -0
- data/stylesheets/archetype/_styleguide.scss +6 -0
- data/stylesheets/archetype/_ui.scss +326 -0
- data/stylesheets/archetype/_util.scss +12 -0
- data/stylesheets/archetype/base/_h5bp.scss +307 -0
- data/stylesheets/archetype/base/_hybrid.scss +25 -0
- data/stylesheets/archetype/base/_normalize.scss +595 -0
- data/stylesheets/archetype/base/_reset.scss +72 -0
- data/stylesheets/archetype/grid/_config.scss +14 -0
- data/stylesheets/archetype/grid/_grid.scss +391 -0
- data/stylesheets/archetype/styleguide/_components.scss +25 -0
- data/stylesheets/archetype/styleguide/_helpers.scss +215 -0
- data/stylesheets/archetype/styleguide/_primitives.scss +10 -0
- data/stylesheets/archetype/styleguide/_styleguide.scss +41 -0
- data/stylesheets/archetype/styleguide/components/_alerts.scss +59 -0
- data/stylesheets/archetype/styleguide/components/_annotations.scss +27 -0
- data/stylesheets/archetype/styleguide/components/_bristol.scss +15 -0
- data/stylesheets/archetype/styleguide/components/_button_groups.scss +47 -0
- data/stylesheets/archetype/styleguide/components/_button_toolbars.scss +17 -0
- data/stylesheets/archetype/styleguide/components/_buttons.scss +338 -0
- data/stylesheets/archetype/styleguide/components/_canvas.scss +15 -0
- data/stylesheets/archetype/styleguide/components/_carets.scss +336 -0
- data/stylesheets/archetype/styleguide/components/_closes.scss +63 -0
- data/stylesheets/archetype/styleguide/components/_container.scss +27 -0
- data/stylesheets/archetype/styleguide/components/_copy.scss +85 -0
- data/stylesheets/archetype/styleguide/components/_flyouts.scss +52 -0
- data/stylesheets/archetype/styleguide/components/_headings.scss +33 -0
- data/stylesheets/archetype/styleguide/components/_headlines.scss +63 -0
- data/stylesheets/archetype/styleguide/components/_hovercards.scss +27 -0
- data/stylesheets/archetype/styleguide/components/_icons.scss +17 -0
- data/stylesheets/archetype/styleguide/components/_identities.scss +34 -0
- data/stylesheets/archetype/styleguide/components/_links.scss +66 -0
- data/stylesheets/archetype/styleguide/components/_loaders.scss +154 -0
- data/stylesheets/archetype/styleguide/components/_menu_items.scss +31 -0
- data/stylesheets/archetype/styleguide/components/_module.scss +15 -0
- data/stylesheets/archetype/styleguide/components/_pullquotes.scss +29 -0
- data/stylesheets/archetype/styleguide/components/_punchcut.scss +18 -0
- data/stylesheets/archetype/styleguide/components/_tooltips.scss +28 -0
- data/stylesheets/archetype/styleguide/primitives/_animations.scss +17 -0
- data/stylesheets/archetype/styleguide/primitives/_dimensions.scss +50 -0
- data/stylesheets/archetype/styleguide/primitives/_glyphs.scss +11 -0
- data/stylesheets/archetype/styleguide/primitives/_misc.scss +8 -0
- data/stylesheets/archetype/styleguide/primitives/_palettes.scss +94 -0
- data/stylesheets/archetype/styleguide/primitives/_shadows.scss +23 -0
- data/stylesheets/archetype/styleguide/primitives/_sprites.scss +46 -0
- data/stylesheets/archetype/styleguide/primitives/_textures.scss +10 -0
- data/stylesheets/archetype/styleguide/primitives/_typography.scss +56 -0
- data/stylesheets/archetype/util/_debug.scss +40 -0
- data/stylesheets/archetype/util/_lists.scss +57 -0
- data/stylesheets/archetype/util/_misc.scss +108 -0
- data/stylesheets/archetype/util/_rtl.scss +279 -0
- data/stylesheets/archetype/util/_spacing.scss +78 -0
- data/stylesheets/archetype/util/_styles.scss +466 -0
- data/stylesheets/archetype/util/_targeting.scss +210 -0
- data/stylesheets/archetype/util/_units.scss +18 -0
- data/templates/example/index.html +40 -0
- data/templates/example/manifest.rb +13 -0
- data/templates/example/screen.scss +99 -0
- data/templates/example/vendor/archetype/animations/loaders/large/large.png +0 -0
- data/templates/example/vendor/archetype/animations/loaders/large/large_dark.png +0 -0
- data/templates/example/vendor/archetype/animations/loaders/large/large_dark_static.png +0 -0
- data/templates/example/vendor/archetype/animations/loaders/large/large_static.png +0 -0
- data/templates/example/vendor/archetype/animations/loaders/medium/medium.png +0 -0
- data/templates/example/vendor/archetype/animations/loaders/medium/medium_dark.png +0 -0
- data/templates/example/vendor/archetype/animations/loaders/medium/medium_dark_static.png +0 -0
- data/templates/example/vendor/archetype/animations/loaders/medium/medium_static.png +0 -0
- data/templates/example/vendor/archetype/animations/loaders/small/small.png +0 -0
- data/templates/example/vendor/archetype/animations/loaders/small/small_dark.png +0 -0
- data/templates/example/vendor/archetype/animations/loaders/small/small_dark_static.png +0 -0
- data/templates/example/vendor/archetype/animations/loaders/small/small_static.png +0 -0
- data/templates/example/vendor/archetype/fontawesome-webfont.eot +0 -0
- data/templates/example/vendor/archetype/fontawesome-webfont.svg +255 -0
- data/templates/example/vendor/archetype/fontawesome-webfont.ttf +0 -0
- data/templates/example/vendor/archetype/fontawesome-webfont.woff +0 -0
- data/templates/project/manifest.rb +9 -0
- data/templates/project/screen.scss +1 -0
- data/templates/project/vendor/archetype/animations/loaders/large/large.png +0 -0
- data/templates/project/vendor/archetype/animations/loaders/large/large_dark.png +0 -0
- data/templates/project/vendor/archetype/animations/loaders/large/large_dark_static.png +0 -0
- data/templates/project/vendor/archetype/animations/loaders/large/large_static.png +0 -0
- data/templates/project/vendor/archetype/animations/loaders/medium/medium.png +0 -0
- data/templates/project/vendor/archetype/animations/loaders/medium/medium_dark.png +0 -0
- data/templates/project/vendor/archetype/animations/loaders/medium/medium_dark_static.png +0 -0
- data/templates/project/vendor/archetype/animations/loaders/medium/medium_static.png +0 -0
- data/templates/project/vendor/archetype/animations/loaders/small/small.png +0 -0
- data/templates/project/vendor/archetype/animations/loaders/small/small_dark.png +0 -0
- data/templates/project/vendor/archetype/animations/loaders/small/small_dark_static.png +0 -0
- data/templates/project/vendor/archetype/animations/loaders/small/small_static.png +0 -0
- data/templates/project/vendor/archetype/fontawesome-webfont.eot +0 -0
- data/templates/project/vendor/archetype/fontawesome-webfont.svg +255 -0
- data/templates/project/vendor/archetype/fontawesome-webfont.ttf +0 -0
- data/templates/project/vendor/archetype/fontawesome-webfont.woff +0 -0
- data/test/fixtures/stylesheets/archetype/assets/fonts/fontawesome-webfont.eot +0 -0
- data/test/fixtures/stylesheets/archetype/assets/fonts/fontawesome-webfont.svg +255 -0
- data/test/fixtures/stylesheets/archetype/assets/fonts/fontawesome-webfont.ttf +0 -0
- data/test/fixtures/stylesheets/archetype/assets/fonts/fontawesome-webfont.woff +0 -0
- data/test/fixtures/stylesheets/archetype/assets/images/vendor/archetype/animations/loaders/large/large.png +0 -0
- data/test/fixtures/stylesheets/archetype/assets/images/vendor/archetype/animations/loaders/large/large_dark.png +0 -0
- data/test/fixtures/stylesheets/archetype/assets/images/vendor/archetype/animations/loaders/large/large_dark_static.png +0 -0
- data/test/fixtures/stylesheets/archetype/assets/images/vendor/archetype/animations/loaders/large/large_static.png +0 -0
- data/test/fixtures/stylesheets/archetype/assets/images/vendor/archetype/animations/loaders/medium/medium.png +0 -0
- data/test/fixtures/stylesheets/archetype/assets/images/vendor/archetype/animations/loaders/medium/medium_dark.png +0 -0
- data/test/fixtures/stylesheets/archetype/assets/images/vendor/archetype/animations/loaders/medium/medium_dark_static.png +0 -0
- data/test/fixtures/stylesheets/archetype/assets/images/vendor/archetype/animations/loaders/medium/medium_static.png +0 -0
- data/test/fixtures/stylesheets/archetype/assets/images/vendor/archetype/animations/loaders/small/small.png +0 -0
- data/test/fixtures/stylesheets/archetype/assets/images/vendor/archetype/animations/loaders/small/small_dark.png +0 -0
- data/test/fixtures/stylesheets/archetype/assets/images/vendor/archetype/animations/loaders/small/small_dark_static.png +0 -0
- data/test/fixtures/stylesheets/archetype/assets/images/vendor/archetype/animations/loaders/small/small_static.png +0 -0
- data/test/fixtures/stylesheets/archetype/assets/images/vendor/archetype/sprites/hovercard_tip.png +0 -0
- data/test/fixtures/stylesheets/archetype/config.rb +19 -0
- data/test/fixtures/stylesheets/archetype/expected/b.css +14 -0
- data/test/fixtures/stylesheets/archetype/expected/base.css +349 -0
- data/test/fixtures/stylesheets/archetype/expected/hacks/ie_pseudo.css +11 -0
- data/test/fixtures/stylesheets/archetype/expected/locale.css +23 -0
- data/test/fixtures/stylesheets/archetype/expected/styleguide/buttons.css +2091 -0
- data/test/fixtures/stylesheets/archetype/expected/styleguide/fallback_styles.css +9 -0
- data/test/fixtures/stylesheets/archetype/expected/styleguide/nested_styleguides.css +24 -0
- data/test/fixtures/stylesheets/archetype/expected/styleguide/selective_state.css +174 -0
- data/test/fixtures/stylesheets/archetype/expected/ui/glyph_icon.css +37 -0
- data/test/fixtures/stylesheets/archetype/expected/ui/hide_element.css +8 -0
- data/test/fixtures/stylesheets/archetype/expected/ui/stroke.css +17 -0
- data/test/fixtures/stylesheets/archetype/expected/ui/triangle.css +35 -0
- data/test/fixtures/stylesheets/archetype/expected/utilities/associative.css +9 -0
- data/test/fixtures/stylesheets/archetype/expected/utilities/if-set.css +9 -0
- data/test/fixtures/stylesheets/archetype/expected/utilities/spacing/horizontal-spacing.css +29 -0
- data/test/fixtures/stylesheets/archetype/expected/utilities/spacing/vertical-spacing.css +29 -0
- data/test/fixtures/stylesheets/archetype/expected/utilities/styles/filter.css +11 -0
- data/test/fixtures/stylesheets/archetype/expected/utilities/styles/font-family.css +16 -0
- data/test/fixtures/stylesheets/archetype/expected/utilities/styles/z-index.css +15 -0
- data/test/fixtures/stylesheets/archetype/expected/utilities/targeting/target-browser.css +100 -0
- data/test/fixtures/stylesheets/archetype/expected/utilities/targeting/target-os.css +55 -0
- data/test/fixtures/stylesheets/archetype/source/b.scss +9 -0
- data/test/fixtures/stylesheets/archetype/source/base.scss +3 -0
- data/test/fixtures/stylesheets/archetype/source/hacks/ie_pseudo.scss +13 -0
- data/test/fixtures/stylesheets/archetype/source/locale.scss +43 -0
- data/test/fixtures/stylesheets/archetype/source/styleguide/buttons.scss +18 -0
- data/test/fixtures/stylesheets/archetype/source/styleguide/fallback_styles.scss +22 -0
- data/test/fixtures/stylesheets/archetype/source/styleguide/nested_styleguides.scss +40 -0
- data/test/fixtures/stylesheets/archetype/source/styleguide/selective_state.scss +22 -0
- data/test/fixtures/stylesheets/archetype/source/ui/glyph_icon.scss +13 -0
- data/test/fixtures/stylesheets/archetype/source/ui/hide_element.scss +5 -0
- data/test/fixtures/stylesheets/archetype/source/ui/stroke.scss +13 -0
- data/test/fixtures/stylesheets/archetype/source/ui/triangle.scss +13 -0
- data/test/fixtures/stylesheets/archetype/source/utilities/associative.scss +24 -0
- data/test/fixtures/stylesheets/archetype/source/utilities/if-set.scss +16 -0
- data/test/fixtures/stylesheets/archetype/source/utilities/spacing/horizontal-spacing.scss +27 -0
- data/test/fixtures/stylesheets/archetype/source/utilities/spacing/vertical-spacing.scss +27 -0
- data/test/fixtures/stylesheets/archetype/source/utilities/styles/filter.scss +9 -0
- data/test/fixtures/stylesheets/archetype/source/utilities/styles/font-family.scss +9 -0
- data/test/fixtures/stylesheets/archetype/source/utilities/styles/z-index.scss +18 -0
- data/test/fixtures/stylesheets/archetype/source/utilities/targeting/target-browser.scss +70 -0
- data/test/fixtures/stylesheets/archetype/source/utilities/targeting/target-os.scss +42 -0
- data/test/helpers/diff.rb +49 -0
- data/test/helpers/io.rb +36 -0
- data/test/helpers/test_case.rb +62 -0
- data/test/integrations/archetype_test.rb +126 -0
- data/test/test_helper.rb +26 -0
- data/test/units/sass_extensions_test.rb +207 -0
- metadata +303 -15
@@ -0,0 +1,95 @@
|
|
1
|
+
require 'archetype/functions/helpers'
|
2
|
+
require 'archetype/version'
|
3
|
+
require 'compass/version'
|
4
|
+
require 'sass/version'
|
5
|
+
|
6
|
+
#
|
7
|
+
# This module provides an interface for testing against various framework version
|
8
|
+
#
|
9
|
+
module Archetype::SassExtensions::Version
|
10
|
+
# :stopdoc:
|
11
|
+
COMPARATOR_PATTERN = /([neglt]+|[><=!]+)/
|
12
|
+
VERSION_PATTERN = /\d+(\.\d+)*(\.[x|\*])?/
|
13
|
+
# :startdoc:
|
14
|
+
|
15
|
+
#
|
16
|
+
# get the current version or test against a framework version
|
17
|
+
#
|
18
|
+
# *Parameters*:
|
19
|
+
# - <tt>$test</tt> {String} the test to evalutate
|
20
|
+
# *Returns*:
|
21
|
+
# - {String|Boolean} if no test or test is just a lookup of a framework, it returns the version of that framework, otherwise it returns the result of the test
|
22
|
+
#
|
23
|
+
def archetype_version(test = nil)
|
24
|
+
test = test.nil? ? 'archetype' : helpers.to_str(test, ' ', :quotes).downcase
|
25
|
+
lib = ''
|
26
|
+
if test.include?('compass')
|
27
|
+
lib = Compass::VERSION
|
28
|
+
elsif test.include?('sass')
|
29
|
+
lib = Sass::VERSION
|
30
|
+
else
|
31
|
+
lib = Archetype::VERSION
|
32
|
+
end
|
33
|
+
# strip off any non-official versioning (e.g. pre/alpha/rc)
|
34
|
+
lib = lib.match(VERSION_PATTERN)[0]
|
35
|
+
result = compare_version(lib, test.match(VERSION_PATTERN), test.match(COMPARATOR_PATTERN))
|
36
|
+
return Sass::Script::String.new(lib) if result.nil?
|
37
|
+
return Sass::Script::Bool.new(result)
|
38
|
+
end
|
39
|
+
|
40
|
+
private
|
41
|
+
def helpers
|
42
|
+
@helpers ||= Archetype::Functions::Helpers
|
43
|
+
end
|
44
|
+
|
45
|
+
#
|
46
|
+
# compare a version of a framework
|
47
|
+
#
|
48
|
+
# *Parameters*:
|
49
|
+
# - <tt>$lib</tt> {String} the library (framework) to compare
|
50
|
+
# - <tt>$version</tt> {String} the version to compare against
|
51
|
+
# - <tt>$comparator</tt> {String} the type of comparison to perform
|
52
|
+
# *Returns*:
|
53
|
+
# - {Boolean} compare the current framework version against the provided version
|
54
|
+
#
|
55
|
+
def compare_version(lib, version, comparator)
|
56
|
+
return nil if version.nil?
|
57
|
+
result = nil
|
58
|
+
lib = lib.split('.')
|
59
|
+
version = version[0].gsub(/\*/, 'x').split('.')
|
60
|
+
# check for wild cards
|
61
|
+
wild = version.index('x')
|
62
|
+
# check the comparison
|
63
|
+
comparator = (comparator || [])[0] || 'eq'
|
64
|
+
eq = comparator =~ /(e|=)/
|
65
|
+
lt = comparator =~ /(l|<)/
|
66
|
+
gt = comparator =~ /(g|>)/
|
67
|
+
# if it was wild, substitute it
|
68
|
+
version[wild] = lib[wild].to_i + (eq ? 0 : gt ? -1 : 1) if not wild.nil?
|
69
|
+
diff = version_value(lib) - version_value(version)
|
70
|
+
# check for the version difference
|
71
|
+
result = diff > 0 if gt
|
72
|
+
result = diff < 0 if lt
|
73
|
+
result = diff == 0 if eq and not result
|
74
|
+
# if the comparator had an `n` in it, it's a negation
|
75
|
+
result = (not result) if comparator =~ /(n|!)/
|
76
|
+
return result
|
77
|
+
end
|
78
|
+
|
79
|
+
#
|
80
|
+
# convert a SemVer string into a numeric value, representing it's weight (lateness)
|
81
|
+
#
|
82
|
+
# *Parameters*:
|
83
|
+
# - <tt>$version</tt> {String} the version string
|
84
|
+
# *Returns*:
|
85
|
+
# - {Number} a weighted number representing the the version
|
86
|
+
#
|
87
|
+
def version_value(version)
|
88
|
+
sum = 0
|
89
|
+
version.each_with_index do |v, i|
|
90
|
+
break if v.nil?
|
91
|
+
sum += (1000 ** (3 - i)) * v.to_i
|
92
|
+
end
|
93
|
+
return sum
|
94
|
+
end
|
95
|
+
end
|
@@ -0,0 +1,75 @@
|
|
1
|
+
module Archetype
|
2
|
+
module Version
|
3
|
+
#
|
4
|
+
# Returns a string representing the version.
|
5
|
+
#
|
6
|
+
# The :major, :minor, and :teeny keys have their respective numbers.
|
7
|
+
# The :string key contains a human-readable string representation of the version.
|
8
|
+
# The :rev key will have the current revision hash.
|
9
|
+
#
|
10
|
+
# Method borrowed from Compass. All credit goes to Chris Eppstein and other contributors
|
11
|
+
# https://github.com/chriseppstein/compass/blob/stable/lib/compass/version.rb
|
12
|
+
# \(This method swiped from Haml and then modified, some credit goes to Nathan Weizenbaum\)
|
13
|
+
#
|
14
|
+
# *Returns*:
|
15
|
+
# - {String} the version of Archetype
|
16
|
+
#
|
17
|
+
def version
|
18
|
+
if defined?(@version)
|
19
|
+
@version
|
20
|
+
else
|
21
|
+
read_version
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
protected
|
26
|
+
def scope(file) # :nodoc:
|
27
|
+
File.join(File.dirname(__FILE__), '..', '..', file)
|
28
|
+
end
|
29
|
+
|
30
|
+
def read_version
|
31
|
+
require 'yaml'
|
32
|
+
begin
|
33
|
+
@version = YAML::load(File.read(scope('VERSION.yml')))
|
34
|
+
@version[:teeny] = @version[:patch]
|
35
|
+
@version[:string] = "#{@version[:major]}.#{@version[:minor]}"
|
36
|
+
@version[:string] << ".#{@version[:patch]}" if @version[:patch]
|
37
|
+
@version[:string] << ".#{@version[:build]}" if @version[:build]
|
38
|
+
@version[:string] << ".#{@version[:state]}" if @version[:state]
|
39
|
+
@version[:string] << ".#{@version[:iteration]}" if @version[:iteration]
|
40
|
+
if !ENV['OFFICIAL'] && r = revision
|
41
|
+
@version[:string] << ".#{r[0..6]}"
|
42
|
+
@version[:rev] = r
|
43
|
+
end
|
44
|
+
return @version
|
45
|
+
rescue
|
46
|
+
# this is a hack, but I'm not fully understanding how to fix this correctly
|
47
|
+
# see issue #4
|
48
|
+
# if it failed, try again, for now
|
49
|
+
return read_version
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
def revision
|
54
|
+
revision_from_git
|
55
|
+
end
|
56
|
+
|
57
|
+
def revision_from_git
|
58
|
+
if File.exists?(scope('.git/HEAD'))
|
59
|
+
Dir.chdir scope(".") do
|
60
|
+
`git rev-parse HEAD`
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
extend Archetype::Version
|
67
|
+
def self.const_missing(const)
|
68
|
+
# This avoid reading from disk unless the VERSION is requested.
|
69
|
+
if const == :VERSION
|
70
|
+
version[:string]
|
71
|
+
else
|
72
|
+
super
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
@import "hacks";
|
2
|
+
@import "base/normalize";
|
3
|
+
@import "base/reset";
|
4
|
+
@import "base/hybrid";
|
5
|
+
|
6
|
+
// protect against multiple resets
|
7
|
+
$RESET_INIT: false !default;
|
8
|
+
|
9
|
+
// @category base
|
10
|
+
|
11
|
+
// sets the base styles for the page (e.g. reset or normalize)
|
12
|
+
// @mixin base
|
13
|
+
// @param $exclude {List} the list of styles to exclude @see _normalize.scss and _reset.scss
|
14
|
+
// @param $method {String} reset method [reset|normalize|hybrid]
|
15
|
+
// @param $force {Bool} force reset to invoke; by default base() can only be invoked once, to re-invoke must pass in $force: true
|
16
|
+
@mixin base($exclude: $CONFIG_RESET_EXCLUDES, $method: $CONFIG_RESET_METHOD, $force: false) {
|
17
|
+
@if not $RESET_INIT or $force {
|
18
|
+
$RESET_INIT: true;
|
19
|
+
// normalize
|
20
|
+
@if $method == normalize {
|
21
|
+
@include base-normalize($exclude: $exclude);
|
22
|
+
}
|
23
|
+
// hyrbid reset (reset + some normalize)
|
24
|
+
@else if $method == hybrid {
|
25
|
+
@include base-hybrid($exclude: $exclude);
|
26
|
+
}
|
27
|
+
// default to reset
|
28
|
+
@else {
|
29
|
+
@include base-reset($exclude: $exclude);
|
30
|
+
}
|
31
|
+
}
|
32
|
+
@if $CONFIG_GLYPHS_AUTO and do-once("archetype/base#glyph") {
|
33
|
+
@include base-glyph();
|
34
|
+
}
|
35
|
+
}
|
36
|
+
|
37
|
+
@mixin base-glyph() {
|
38
|
+
// the font-face mixin will likely change in a future version, keep an eye on this
|
39
|
+
// https://github.com/chriseppstein/compass/issues/867
|
40
|
+
@include font-face($CONFIG_GLYPHS_NAME, $CONFIG_GLYPHS_FILES, $CONFIG_GLYPHS_EOT, $CONFIG_GLYPHS_WEIGHT, $CONFIG_GLYPHS_STYLE);
|
41
|
+
}
|
42
|
+
|
43
|
+
// auto invoke base reset
|
44
|
+
@if $CONFIG_RESET_AUTO and do-once('archetype/base') {
|
45
|
+
@include base($CONFIG_RESET_EXCLUDES);
|
46
|
+
}
|
@@ -0,0 +1,366 @@
|
|
1
|
+
// environment
|
2
|
+
$CONFIG_DEBUG_ENVS: (dev development); // environments to allow debug in
|
3
|
+
$CONFIG_DEBUG: (index($CONFIG_DEBUG_ENVS, archetype-env()) != false) !default; // global debugging mode (enabled by default in $CONFIG_DEBUG_ENVS)
|
4
|
+
|
5
|
+
// theme
|
6
|
+
$CONFIG_THEME: archetype !default; // the theme name
|
7
|
+
|
8
|
+
// units
|
9
|
+
$CONFIG_UNIT_FORCE_INT: true !default; // force units to be whole integers. if set to strict, $abuse flags won't work [false|true|strict]
|
10
|
+
|
11
|
+
// spacing
|
12
|
+
$CONFIG_SPACING: 5px !default; // spacing factor
|
13
|
+
$CONFIG_HORIZONTAL_SPACING: $CONFIG_SPACING !default; // horizontal spacing
|
14
|
+
$CONFIG_VERTICAL_SPACING: $CONFIG_SPACING !default; // veritcal spacing
|
15
|
+
$CONFIG_SPACING_METHOD: padding !default; // method for providing spacing [padding|margin]
|
16
|
+
|
17
|
+
// resets
|
18
|
+
$CONFIG_RESET_METHOD: hybrid !default; // reset method [reset|normalize|hybrid]
|
19
|
+
$CONFIG_RESET_AUTO: false !default; // if true, importing `archetype` will invoke the reset
|
20
|
+
$CONFIG_RESET_EXCLUDES: () !default; // list of things to exclude from the reset
|
21
|
+
|
22
|
+
// states used when printing out styles
|
23
|
+
$CONFIG_STATE_PREFIX: '' !default; // prefix state classnames @see to-style()
|
24
|
+
$CONFIG_STATE_NO_PREFIX: () !default; // states to never apply prefix to
|
25
|
+
// a mapping for state names to selectors
|
26
|
+
$CORE_STATE_MAPPINGS: (
|
27
|
+
'hover' '&.#{$CONFIG_STATE_PREFIX}hover, &:hover, &.#{$CONFIG_STATE_PREFIX}focus, &:focus',
|
28
|
+
'hover-only' '&.#{$CONFIG_STATE_PREFIX}hover, &:hover',
|
29
|
+
'focus' '&.#{$CONFIG_STATE_PREFIX}focus, &:focus',
|
30
|
+
'active' '&.#{$CONFIG_STATE_PREFIX}active, &:active',
|
31
|
+
'visited' '&.#{$CONFIG_STATE_PREFIX}visited, &:visited',
|
32
|
+
'disabled' '&.#{$CONFIG_STATE_PREFIX}disabled, &[disabled]',
|
33
|
+
'focus-inner' '&::-moz-focus-inner'
|
34
|
+
);
|
35
|
+
$CONFIG_STATE_MAPPINGS: () !default;
|
36
|
+
$CONFIG_STATE_MAPPINGS: associative-merge($CORE_STATE_MAPPINGS, $CONFIG_STATE_MAPPINGS);
|
37
|
+
|
38
|
+
// misc
|
39
|
+
$CONTENT_PLACEHOLDER: '\0020' !default; // content placeholder (ensures block elements display correctly even if they're empty)
|
40
|
+
$CONFIG_DISABLED_CSS: () !default; // a list of CSS3 features to always disable when using output-style()
|
41
|
+
$CONFIG_GENERATED_TAG_PREFIX: x-archetype !default; // the prefix for the tag name to create when using ie-pseudo method
|
42
|
+
$CONFIG_GENERATED_TAG_CSS: false !default; // styles to apply to the generated tag when using ie-pseudo method (use this as a way to reset styles on these tags)
|
43
|
+
|
44
|
+
// z-layers
|
45
|
+
$CONFIG_Z_INDEX_BASE: 0 !default; // the default starting layer for z-index calculations
|
46
|
+
$CONFIG_Z_LAYERS_OFFSET: 100 !default; // the offset between z-layers
|
47
|
+
$CONFIG_Z_LAYERS: (default dialog navigation) !default; // the orders for the z-layers
|
48
|
+
|
49
|
+
// compass
|
50
|
+
$COMPASS_RTL_SUPPORT: false !default; // does your Compass version support RTL? set to true if Compass mixins support RTL
|
51
|
+
|
52
|
+
// sprites
|
53
|
+
$CONFIG_DISABLE_STYLEGUIDE_SPRITES: false !default; // disable all sprite generation in styleguide
|
54
|
+
|
55
|
+
// keyframe animations
|
56
|
+
$CONFIG_KEYFRAMES_AUTO: $CONFIG_RESET_AUTO !default; // whether or not to auto generate the keyframe animations
|
57
|
+
$CONFIG_KEYFRAME_LOADERS: archetype-loader !default; // loading spinner keyframe name
|
58
|
+
|
59
|
+
// glyphs
|
60
|
+
$CONFIG_GLYPHS_NAME: FontAwesome !default; // name for the font-face
|
61
|
+
$CONFIG_GLYPHS_SVG_ID: $CONFIG_GLYPHS_NAME !default;
|
62
|
+
$CONFIG_GLYPHS_BASE_PATH: 'vendor/archetype/fontawesome-webfont' !default; // generic path to all glpyh fonts (sans extensions)
|
63
|
+
$CONFIG_GLYPHS_EOT: '#{$CONFIG_GLYPHS_BASE_PATH}.eot' !default;
|
64
|
+
$CONFIG_GLYPHS_FILES: font-files('#{$CONFIG_GLYPHS_BASE_PATH}.woff', '#{$CONFIG_GLYPHS_BASE_PATH}.ttf', '#{$CONFIG_GLYPHS_BASE_PATH}.svg##{$CONFIG_GLYPHS_SVG_ID}') !default;
|
65
|
+
$CONFIG_GLYPHS_WEIGHT: normal !default; // font-weight for glyphs
|
66
|
+
$CONFIG_GLYPHS_STYLE: normal !default; // font-style for glyphs
|
67
|
+
$CONFIG_GLYPHS_THRESHOLD: 16px !default; // the threshold to switch to halfling characters, if available
|
68
|
+
$CONFIG_GLYPHS_AUTO: $CONFIG_RESET_AUTO !default; // whether or not to auto generate the font-face definition for the glyph font
|
69
|
+
// FontAwesome icon mappings as of 2012/11/03
|
70
|
+
$CORE_GLYPHS_MAPPINGS: (
|
71
|
+
glass '\f000',
|
72
|
+
music '\f001',
|
73
|
+
search '\f002',
|
74
|
+
envelope '\f003',
|
75
|
+
heart '\f004',
|
76
|
+
star '\f005',
|
77
|
+
star-empty '\f006',
|
78
|
+
user '\f007',
|
79
|
+
film '\f008',
|
80
|
+
th-large '\f009',
|
81
|
+
th '\f00a',
|
82
|
+
th-list '\f00b',
|
83
|
+
ok '\f00c',
|
84
|
+
remove '\f00d',
|
85
|
+
zoom-in '\f00e',
|
86
|
+
zoom-out '\f010',
|
87
|
+
off '\f011',
|
88
|
+
signal '\f012',
|
89
|
+
cog '\f013',
|
90
|
+
trash '\f014',
|
91
|
+
home '\f015',
|
92
|
+
file '\f016',
|
93
|
+
time '\f017',
|
94
|
+
road '\f018',
|
95
|
+
download-alt '\f019',
|
96
|
+
download '\f01a',
|
97
|
+
upload '\f01b',
|
98
|
+
inbox '\f01c',
|
99
|
+
play-circle '\f01d',
|
100
|
+
repeat '\f01e',
|
101
|
+
|
102
|
+
refresh '\f021',
|
103
|
+
list-alt '\f022',
|
104
|
+
lock '\f023',
|
105
|
+
flag '\f024',
|
106
|
+
headphones '\f025',
|
107
|
+
volume-off '\f026',
|
108
|
+
volume-down '\f027',
|
109
|
+
volume-up '\f028',
|
110
|
+
qrcode '\f029',
|
111
|
+
barcode '\f02a',
|
112
|
+
tag '\f02b',
|
113
|
+
tags '\f02c',
|
114
|
+
book '\f02d',
|
115
|
+
bookmark '\f02e',
|
116
|
+
print '\f02f',
|
117
|
+
|
118
|
+
camera '\f030',
|
119
|
+
font '\f031',
|
120
|
+
bold '\f032',
|
121
|
+
italic '\f033',
|
122
|
+
text-height '\f034',
|
123
|
+
text-width '\f035',
|
124
|
+
align-left '\f036',
|
125
|
+
align-center '\f037',
|
126
|
+
align-right '\f038',
|
127
|
+
align-justify '\f039',
|
128
|
+
list '\f03a',
|
129
|
+
indent-left '\f03b',
|
130
|
+
indent-right '\f03c',
|
131
|
+
facetime-video '\f03d',
|
132
|
+
picture '\f03e',
|
133
|
+
|
134
|
+
pencil '\f040',
|
135
|
+
map-marker '\f041',
|
136
|
+
adjust '\f042',
|
137
|
+
tint '\f043',
|
138
|
+
edit '\f044',
|
139
|
+
share '\f045',
|
140
|
+
check '\f046',
|
141
|
+
move '\f047',
|
142
|
+
step-backward '\f048',
|
143
|
+
fast-backward '\f049',
|
144
|
+
backward '\f04a',
|
145
|
+
play '\f04b',
|
146
|
+
pause '\f04c',
|
147
|
+
stop '\f04d',
|
148
|
+
forward '\f04e',
|
149
|
+
|
150
|
+
fast-forward '\f050',
|
151
|
+
step-forward '\f051',
|
152
|
+
eject '\f052',
|
153
|
+
chevron-left '\f053',
|
154
|
+
chevron-right '\f054',
|
155
|
+
plus-sign '\f055',
|
156
|
+
minus-sign '\f056',
|
157
|
+
remove-sign '\f057',
|
158
|
+
ok-sign '\f058',
|
159
|
+
question-sign '\f059',
|
160
|
+
info-sign '\f05a',
|
161
|
+
screenshot '\f05b',
|
162
|
+
remove-circle '\f05c',
|
163
|
+
ok-circle '\f05d',
|
164
|
+
ban-circle '\f05e',
|
165
|
+
|
166
|
+
arrow-left '\f060',
|
167
|
+
arrow-right '\f061',
|
168
|
+
arrow-up '\f062',
|
169
|
+
arrow-down '\f063',
|
170
|
+
share-alt '\f064',
|
171
|
+
resize-full '\f065',
|
172
|
+
resize-small '\f066',
|
173
|
+
plus '\f067',
|
174
|
+
minus '\f068',
|
175
|
+
asterisk '\f069',
|
176
|
+
exclamation-sign '\f06a',
|
177
|
+
gift '\f06b',
|
178
|
+
leaf '\f06c',
|
179
|
+
fire '\f06d',
|
180
|
+
eye-open '\f06e',
|
181
|
+
|
182
|
+
eye-close '\f070',
|
183
|
+
warning-sign '\f071',
|
184
|
+
plane '\f072',
|
185
|
+
calendar '\f073',
|
186
|
+
random '\f074',
|
187
|
+
comment '\f075',
|
188
|
+
magnet '\f076',
|
189
|
+
chevron-up '\f077',
|
190
|
+
chevron-down '\f078',
|
191
|
+
retweet '\f079',
|
192
|
+
shopping-cart '\f07a',
|
193
|
+
folder-close '\f07b',
|
194
|
+
folder-open '\f07c',
|
195
|
+
resize-vertical '\f07d',
|
196
|
+
resize-horizontal '\f07e',
|
197
|
+
|
198
|
+
bar-chart '\f080',
|
199
|
+
twitter-sign '\f081',
|
200
|
+
facebook-sign '\f082',
|
201
|
+
camera-retro '\f083',
|
202
|
+
key '\f084',
|
203
|
+
cogs '\f085',
|
204
|
+
comments '\f086',
|
205
|
+
thumbs-up '\f087',
|
206
|
+
thumbs-down '\f088',
|
207
|
+
star-half '\f089',
|
208
|
+
heart-empty '\f08a',
|
209
|
+
signout '\f08b',
|
210
|
+
linkedin-sign '\f08c',
|
211
|
+
pushpin '\f08d',
|
212
|
+
external-link '\f08e',
|
213
|
+
|
214
|
+
signin '\f090',
|
215
|
+
trophy '\f091',
|
216
|
+
github-sign '\f092',
|
217
|
+
upload-alt '\f093',
|
218
|
+
lemon '\f094',
|
219
|
+
phone '\f095',
|
220
|
+
check-empty '\f096',
|
221
|
+
bookmark-empty '\f097',
|
222
|
+
phone-sign '\f098',
|
223
|
+
twitter '\f099',
|
224
|
+
facebook '\f09a',
|
225
|
+
github '\f09b',
|
226
|
+
unlock '\f09c',
|
227
|
+
credit-card '\f09d',
|
228
|
+
rss '\f09e',
|
229
|
+
|
230
|
+
hdd '\f0a0',
|
231
|
+
bullhorn '\f0a1',
|
232
|
+
bell '\f0a2',
|
233
|
+
certificate '\f0a3',
|
234
|
+
hand-right '\f0a4',
|
235
|
+
hand-left '\f0a5',
|
236
|
+
hand-up '\f0a6',
|
237
|
+
hand-down '\f0a7',
|
238
|
+
circle-arrow-left '\f0a8',
|
239
|
+
circle-arrow-right '\f0a9',
|
240
|
+
circle-arrow-up '\f0aa',
|
241
|
+
circle-arrow-down '\f0ab',
|
242
|
+
globe '\f0ac',
|
243
|
+
wrench '\f0ad',
|
244
|
+
tasks '\f0ae',
|
245
|
+
|
246
|
+
filter '\f0b0',
|
247
|
+
briefcase '\f0b1',
|
248
|
+
fullscreen '\f0b2',
|
249
|
+
|
250
|
+
group '\f0c0',
|
251
|
+
link '\f0c1',
|
252
|
+
cloud '\f0c2',
|
253
|
+
beaker '\f0c3',
|
254
|
+
cut '\f0c4',
|
255
|
+
copy '\f0c5',
|
256
|
+
paper-clip '\f0c6',
|
257
|
+
save '\f0c7',
|
258
|
+
sign-blank '\f0c8',
|
259
|
+
reorder '\f0c9',
|
260
|
+
list-ul '\f0ca',
|
261
|
+
list-ol '\f0cb',
|
262
|
+
strikethrough '\f0cc',
|
263
|
+
underline '\f0cd',
|
264
|
+
table '\f0ce',
|
265
|
+
|
266
|
+
magic '\f0d0',
|
267
|
+
truck '\f0d1',
|
268
|
+
pinterest '\f0d2',
|
269
|
+
pinterest-sign '\f0d3',
|
270
|
+
google-plus-sign '\f0d4',
|
271
|
+
google-plus '\f0d5',
|
272
|
+
money '\f0d6',
|
273
|
+
caret-down '\f0d7',
|
274
|
+
caret-up '\f0d8',
|
275
|
+
caret-left '\f0d9',
|
276
|
+
caret-right '\f0da',
|
277
|
+
columns '\f0db',
|
278
|
+
sort '\f0dc',
|
279
|
+
sort-down '\f0dd',
|
280
|
+
sort-up '\f0de',
|
281
|
+
|
282
|
+
envelope-alt '\f0e0',
|
283
|
+
linkedin '\f0e1',
|
284
|
+
undo '\f0e2',
|
285
|
+
legal '\f0e3',
|
286
|
+
dashboard '\f0e4',
|
287
|
+
comment-alt '\f0e5',
|
288
|
+
comments-alt '\f0e6',
|
289
|
+
bolt '\f0e7',
|
290
|
+
sitemap '\f0e8',
|
291
|
+
umbrella '\f0e9',
|
292
|
+
paste '\f0ea',
|
293
|
+
|
294
|
+
user-md '\f200'
|
295
|
+
);
|
296
|
+
$CONFIG_GLYPHS_MAPPINGS: () !default;
|
297
|
+
$CONFIG_GLYPHS_MAPPINGS: associative-merge($CORE_GLYPHS_MAPPINGS, $CONFIG_GLYPHS_MAPPINGS);
|
298
|
+
|
299
|
+
// browser targeting
|
300
|
+
$CONFIG_BROWSER_VENDORS_CLASS: (ie) !default; // a list of browsers to support via class targeting
|
301
|
+
$CONFIG_BROWSER_ALLOW_HACKS: true !default; // if set to true, allow browser targeting hacks
|
302
|
+
$CONFIG_BROWSER_WARN_ON_HACK: false !default; // if hacks are used, throw a warning
|
303
|
+
// this is an associative list for various hacks
|
304
|
+
$CONFIG_BROWSER_VENDORS_HACK: (
|
305
|
+
(webkit-all, safari webkit chrome),
|
306
|
+
(gecko-all, firefox gecko mozilla),
|
307
|
+
(opera-all, opera) // NOTE: this may stop working once Opera switches over to using WebKit/Blink
|
308
|
+
) !default;
|
309
|
+
|
310
|
+
// os targeting
|
311
|
+
$CONFIG_OS_VENDORS_CLASS: (
|
312
|
+
(os-win, windows win winxp win7 win8),
|
313
|
+
(os-mac, apple mac osx),
|
314
|
+
(os-linux, linux),
|
315
|
+
(os-other, other misc unknown)
|
316
|
+
) !default;
|
317
|
+
|
318
|
+
// os/language safe font stacks
|
319
|
+
// these are core font definitions, these will be extended with whatever is in $CONFIG_SAFE_FONTS
|
320
|
+
$CORE_SAFE_FONTS: (
|
321
|
+
(sans-serif, (
|
322
|
+
(default, (
|
323
|
+
(default (sans-serif)),
|
324
|
+
(ko_KR ('Malgun Gothic', default)),
|
325
|
+
(zh_TW (SimSun, default)),
|
326
|
+
(zh_CN (SimSun, default))
|
327
|
+
)),
|
328
|
+
(win, (
|
329
|
+
(default (Arial, sans-serif)),
|
330
|
+
(ja_JP (メイリオ, Meiryo, 'MS Pゴシック', 'MS PGothic', default)),
|
331
|
+
(zh_TW ('微軟正黑體', 'Microsoft JhengHei', PMingLiu, '宋体', SimSun, default)),
|
332
|
+
(zh_CN ('华文细黑', 'STHeiti Light', '微软雅黑体', 'Microsoft Yahei', '新宋体', NSimSun, '宋体', SimSun, default)),
|
333
|
+
(ko_KR nil)
|
334
|
+
)),
|
335
|
+
(mac, (
|
336
|
+
(default (Helvetica, Arial, sans-serif)),
|
337
|
+
(zh_TW ('黑體-繁', 'Heiti TC', '儷黑Pro', 'LiHei Pro', PMingLiu, '宋体', SimSun, default)),
|
338
|
+
(zh_CN ('黑体-简', 'Heiti SC', '华文细黑', 'STHeiti Light', '华文黑体', STHeiti, default)),
|
339
|
+
(ja_JP ('Hiragino Kaku Gothic Pro', 'ヒラギノ角ゴ Pro W3', 'MS Pゴシック', 'MS PGothic', default)),
|
340
|
+
(ko_KR nil)
|
341
|
+
)),
|
342
|
+
(linux, (
|
343
|
+
(default (Helvetica, FreeSans, 'Liberation Sans', Helmet, Arial, sans-serif)),
|
344
|
+
(zh_TW (PMingLiu, '宋体', SimSun, default)),
|
345
|
+
(zh_CN ('新宋体', NSimSun, '宋体', SimSun, default)),
|
346
|
+
(ja_JP nil),
|
347
|
+
(ko_KR nil)
|
348
|
+
))
|
349
|
+
)),
|
350
|
+
(serif, (
|
351
|
+
(default, (
|
352
|
+
(default (Georgia, serif)),
|
353
|
+
(CJK nil) // dont use any serif fonts in CJK langs
|
354
|
+
)),
|
355
|
+
nil
|
356
|
+
)),
|
357
|
+
(monospace, (
|
358
|
+
(default, (
|
359
|
+
(default (Menlo, Monaco, Consolas, 'Courier New', monospace)),
|
360
|
+
nil
|
361
|
+
)),
|
362
|
+
nil
|
363
|
+
))
|
364
|
+
); // note that this declaration isn't a `default`, but rather is enforced everytime. this can be modified (via extending $CONFIG_SAFE_FONTS)
|
365
|
+
$CONFIG_SAFE_FONTS: () !default;
|
366
|
+
$CONFIG_SAFE_FONTS: associative-merge($CORE_SAFE_FONTS, $CONFIG_SAFE_FONTS);
|