compass 0.12.7 → 0.13.alpha.4
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.markdown +1 -1
- data/Rakefile +14 -9
- data/VERSION.yml +6 -0
- data/features/command_line.feature +8 -50
- data/features/step_definitions/command_line_steps.rb +3 -2
- data/frameworks/compass/stylesheets/compass/_css3.scss +2 -0
- data/frameworks/compass/stylesheets/compass/_support.scss +4 -4
- data/frameworks/compass/stylesheets/compass/css3/_animation.scss +121 -0
- data/frameworks/compass/stylesheets/compass/css3/_appearance.scss +10 -6
- data/frameworks/compass/stylesheets/compass/css3/_background-clip.scss +32 -36
- data/frameworks/compass/stylesheets/compass/css3/_background-origin.scss +32 -35
- data/frameworks/compass/stylesheets/compass/css3/_background-size.scss +12 -15
- data/frameworks/compass/stylesheets/compass/css3/_border-radius.scss +27 -48
- data/frameworks/compass/stylesheets/compass/css3/_box-shadow.scss +22 -35
- data/frameworks/compass/stylesheets/compass/css3/_box-sizing.scss +12 -8
- data/frameworks/compass/stylesheets/compass/css3/_box.scss +57 -82
- data/frameworks/compass/stylesheets/compass/css3/_columns.scss +104 -71
- data/frameworks/compass/stylesheets/compass/css3/_filter.scss +38 -18
- data/frameworks/compass/stylesheets/compass/css3/_flexbox.scss +294 -0
- data/frameworks/compass/stylesheets/compass/css3/_font-face.scss +4 -4
- data/frameworks/compass/stylesheets/compass/css3/_hyphenation.scss +13 -22
- data/frameworks/compass/stylesheets/compass/css3/_images.scss +45 -48
- data/frameworks/compass/stylesheets/compass/css3/_inline-block.scss +1 -1
- data/frameworks/compass/stylesheets/compass/css3/_regions.scss +12 -8
- data/frameworks/compass/stylesheets/compass/css3/_selection.scss +31 -0
- data/frameworks/compass/stylesheets/compass/css3/_shared.scss +226 -2
- data/frameworks/compass/stylesheets/compass/css3/_text-shadow.scss +21 -26
- data/frameworks/compass/stylesheets/compass/css3/_transform-legacy.scss +3 -3
- data/frameworks/compass/stylesheets/compass/css3/_transform.scss +8 -8
- data/frameworks/compass/stylesheets/compass/css3/_transition.scss +3 -3
- data/frameworks/compass/stylesheets/compass/css3/_user-interface.scss +43 -4
- data/frameworks/compass/stylesheets/compass/typography/_units.scss +152 -0
- data/frameworks/compass/stylesheets/compass/typography/_vertical_rhythm.scss +180 -102
- data/frameworks/compass/stylesheets/compass/typography/lists/_horizontal-list.scss +5 -3
- data/frameworks/compass/stylesheets/compass/typography/lists/_inline-list.scss +6 -3
- data/frameworks/compass/stylesheets/compass/typography/text/_ellipsis.scss +1 -1
- data/frameworks/compass/stylesheets/compass/utilities/general/_float.scss +7 -3
- data/frameworks/compass/stylesheets/compass/utilities/general/_hacks.scss +2 -2
- data/frameworks/compass/stylesheets/compass/utilities/sprites/_base.scss +32 -13
- data/frameworks/compass/stylesheets/compass/utilities/tables/_borders.scss +14 -9
- data/lib/compass/actions.rb +3 -1
- data/lib/compass/commands/update_project.rb +1 -2
- data/lib/compass/commands/watch_project.rb +11 -113
- data/lib/compass/commands.rb +1 -1
- data/lib/compass/compiler.rb +8 -1
- data/lib/compass/configuration/data.rb +1 -1
- data/lib/compass/configuration/helpers.rb +2 -0
- data/lib/compass/exec/project_options_parser.rb +8 -0
- data/lib/compass/logger.rb +2 -0
- data/lib/compass/sass_extensions/functions/cross_browser_support.rb +1 -1
- data/lib/compass/sass_extensions/functions/env.rb +18 -0
- data/lib/compass/sass_extensions/functions/gradient_support.rb +101 -29
- data/lib/compass/sass_extensions/functions/image_size.rb +2 -1
- data/lib/compass/sass_extensions/functions/math.rb +13 -1
- data/lib/compass/sass_extensions/functions/sprites.rb +82 -22
- data/lib/compass/sass_extensions/functions/urls.rb +37 -6
- data/lib/compass/sass_extensions/functions/utility.rb +10 -0
- data/lib/compass/sass_extensions/sprites/engines/chunky_png_engine.rb +11 -9
- data/lib/compass/sass_extensions/sprites/image.rb +7 -2
- data/lib/compass/sass_extensions/sprites/image_methods.rb +5 -1
- data/lib/compass/sass_extensions/sprites/images.rb +29 -0
- data/lib/compass/sass_extensions/sprites/layout/diagonal.rb +42 -0
- data/lib/compass/sass_extensions/sprites/layout/horizontal.rb +66 -0
- data/lib/compass/sass_extensions/sprites/layout/smart.rb +33 -0
- data/lib/compass/sass_extensions/sprites/layout/vertical.rb +68 -0
- data/lib/compass/sass_extensions/sprites/layout.rb +39 -0
- data/lib/compass/sass_extensions/sprites/layout_methods.rb +9 -115
- data/lib/compass/sass_extensions/sprites/sprite_map.rb +5 -1
- data/lib/compass/sass_extensions/sprites/sprite_methods.rb +8 -14
- data/lib/compass/sass_extensions/sprites.rb +2 -0
- data/lib/compass/sprite_importer/content.erb +29 -24
- data/lib/compass/sprite_importer.rb +7 -11
- data/lib/compass/version.rb +10 -13
- data/lib/compass/watcher/compiler.rb +59 -0
- data/lib/compass/watcher/project_watcher.rb +111 -0
- data/lib/compass/watcher/watch.rb +33 -0
- data/lib/compass/watcher.rb +11 -0
- data/lib/compass.rb +2 -2
- data/test/fixtures/sprites/public/images/numeric/200.png +0 -0
- data/test/fixtures/stylesheets/busted_font_urls/config.rb +32 -0
- data/test/fixtures/stylesheets/busted_font_urls/css/screen.css +7 -0
- data/test/fixtures/stylesheets/busted_font_urls/fonts/feed.ttf +0 -0
- data/test/fixtures/stylesheets/busted_font_urls/fonts/grid.ttf +0 -0
- data/test/fixtures/stylesheets/busted_font_urls/fonts/sub/dk.ttf +0 -0
- data/test/fixtures/stylesheets/busted_font_urls/sass/screen.sass +11 -0
- data/test/fixtures/stylesheets/busted_font_urls/tmp/screen.css +7 -0
- data/test/fixtures/stylesheets/busted_image_urls/tmp/screen.css +9 -0
- data/test/fixtures/stylesheets/compass/css/animation-with-legacy-ie.css +33 -0
- data/test/fixtures/stylesheets/compass/css/animation.css +33 -0
- data/test/fixtures/stylesheets/compass/css/background-clip.css +5 -0
- data/test/fixtures/stylesheets/compass/css/background-origin.css +15 -0
- data/test/fixtures/stylesheets/compass/css/background-size.css +24 -0
- data/test/fixtures/stylesheets/compass/css/columns.css +27 -63
- data/test/fixtures/stylesheets/compass/css/flexbox.css +121 -0
- data/test/fixtures/stylesheets/compass/css/fonts.css +1 -1
- data/test/fixtures/stylesheets/compass/css/gradients.css +64 -36
- data/test/fixtures/stylesheets/compass/css/grid_background.css +7 -14
- data/test/fixtures/stylesheets/compass/css/hyphenation.css +4 -2
- data/test/fixtures/stylesheets/compass/css/lists.css +5 -5
- data/test/fixtures/stylesheets/compass/css/pie.css +0 -3
- data/test/fixtures/stylesheets/compass/css/regions.css +4 -2
- data/test/fixtures/stylesheets/compass/css/selection.css +13 -0
- data/test/fixtures/stylesheets/compass/css/sprites.css +251 -250
- data/test/fixtures/stylesheets/compass/css/text_shadow.css +6 -6
- data/test/fixtures/stylesheets/compass/css/transition.css +6 -0
- data/test/fixtures/stylesheets/compass/css/units.css +30 -0
- data/test/fixtures/stylesheets/compass/css/user-interface.css +22 -1
- data/test/fixtures/stylesheets/compass/css/utilities.css +15 -0
- data/test/fixtures/stylesheets/compass/css/vertical_rhythm.css +177 -8
- data/test/fixtures/stylesheets/compass/images/flag-s5b4f509715.png +0 -0
- data/test/fixtures/stylesheets/compass/sass/animation-with-legacy-ie.scss +19 -0
- data/test/fixtures/stylesheets/compass/sass/animation.scss +13 -0
- data/test/fixtures/stylesheets/compass/sass/background-clip.scss +4 -2
- data/test/fixtures/stylesheets/compass/sass/background-origin.scss +10 -0
- data/test/fixtures/stylesheets/compass/sass/background-size.scss +12 -0
- data/test/fixtures/stylesheets/compass/sass/columns.scss +9 -9
- data/test/fixtures/stylesheets/compass/sass/flexbox.scss +44 -0
- data/test/fixtures/stylesheets/compass/sass/gradients.sass +31 -0
- data/test/fixtures/stylesheets/compass/sass/selection.scss +13 -0
- data/test/fixtures/stylesheets/compass/sass/transition.scss +1 -1
- data/test/fixtures/stylesheets/compass/sass/units.scss +45 -0
- data/test/fixtures/stylesheets/compass/sass/user-interface.scss +13 -1
- data/test/fixtures/stylesheets/compass/sass/utilities.scss +10 -0
- data/test/fixtures/stylesheets/compass/sass/vertical_rhythm.scss +208 -7
- data/test/fixtures/stylesheets/envtest/css/env.css +8 -0
- data/test/fixtures/stylesheets/envtest/sass/env.scss +16 -0
- data/test/fixtures/stylesheets/envtest/tmp/env.css +14 -0
- data/test/fixtures/stylesheets/valid/css/simple.css +4 -0
- data/test/helpers/diff.rb +1 -1
- data/test/integrations/compass_test.rb +23 -14
- data/test/integrations/sprites_test.rb +305 -63
- data/test/test_helper.rb +5 -15
- data/test/units/command_line_test.rb +0 -2
- data/test/units/compass_module_test.rb +1 -1
- data/test/units/configuration_test.rb +12 -0
- data/test/units/regressions_test.rb +8 -8
- data/test/units/sass_extensions_test.rb +2 -0
- data/test/units/sass_extenstions/gradients_test.rb +33 -0
- data/test/units/sprites/image_test.rb +5 -0
- data/test/units/sprites/images_test.rb +46 -0
- data/test/units/sprites/layout_test.rb +29 -4
- data/test/units/watcher/compiler_test.rb +39 -0
- data/test/units/watcher/project_watcher_test.rb +73 -0
- data/test/units/watcher/watch_test.rb +42 -0
- metadata +171 -236
- checksums.yaml +0 -7
- data/frameworks/blueprint/stylesheets/_blueprint.scss +0 -37
- data/frameworks/blueprint/stylesheets/blueprint/_buttons.scss +0 -101
- data/frameworks/blueprint/stylesheets/blueprint/_colors.scss +0 -36
- data/frameworks/blueprint/stylesheets/blueprint/_debug.scss +0 -28
- data/frameworks/blueprint/stylesheets/blueprint/_fancy-type.scss +0 -88
- data/frameworks/blueprint/stylesheets/blueprint/_form.scss +0 -66
- data/frameworks/blueprint/stylesheets/blueprint/_grid.scss +0 -258
- data/frameworks/blueprint/stylesheets/blueprint/_ie.scss +0 -111
- data/frameworks/blueprint/stylesheets/blueprint/_interaction.scss +0 -66
- data/frameworks/blueprint/stylesheets/blueprint/_link-icons.scss +0 -37
- data/frameworks/blueprint/stylesheets/blueprint/_liquid.scss +0 -152
- data/frameworks/blueprint/stylesheets/blueprint/_print.scss +0 -86
- data/frameworks/blueprint/stylesheets/blueprint/_reset.scss +0 -3
- data/frameworks/blueprint/stylesheets/blueprint/_rtl.scss +0 -121
- data/frameworks/blueprint/stylesheets/blueprint/_scaffolding.scss +0 -52
- data/frameworks/blueprint/stylesheets/blueprint/_typography.scss +0 -90
- data/frameworks/blueprint/stylesheets/blueprint/_utilities.scss +0 -37
- data/frameworks/blueprint/stylesheets/blueprint/reset/_utilities.scss +0 -83
- data/frameworks/blueprint/templates/basic/grid.png +0 -0
- data/frameworks/blueprint/templates/basic/ie.sass +0 -4
- data/frameworks/blueprint/templates/basic/manifest.rb +0 -30
- data/frameworks/blueprint/templates/basic/partials/_base.sass +0 -10
- data/frameworks/blueprint/templates/basic/print.sass +0 -4
- data/frameworks/blueprint/templates/basic/screen.sass +0 -12
- data/frameworks/blueprint/templates/buttons/buttons/cross.png +0 -0
- data/frameworks/blueprint/templates/buttons/buttons/key.png +0 -0
- data/frameworks/blueprint/templates/buttons/buttons/tick.png +0 -0
- data/frameworks/blueprint/templates/buttons/buttons.sass +0 -49
- data/frameworks/blueprint/templates/buttons/manifest.rb +0 -17
- data/frameworks/blueprint/templates/link_icons/link_icons/doc.png +0 -0
- data/frameworks/blueprint/templates/link_icons/link_icons/email.png +0 -0
- data/frameworks/blueprint/templates/link_icons/link_icons/external.png +0 -0
- data/frameworks/blueprint/templates/link_icons/link_icons/feed.png +0 -0
- data/frameworks/blueprint/templates/link_icons/link_icons/im.png +0 -0
- data/frameworks/blueprint/templates/link_icons/link_icons/pdf.png +0 -0
- data/frameworks/blueprint/templates/link_icons/link_icons/visited.png +0 -0
- data/frameworks/blueprint/templates/link_icons/link_icons/xls.png +0 -0
- data/frameworks/blueprint/templates/link_icons/link_icons.sass +0 -13
- data/frameworks/blueprint/templates/link_icons/manifest.rb +0 -23
- data/frameworks/blueprint/templates/project/grid.png +0 -0
- data/frameworks/blueprint/templates/project/ie.sass +0 -16
- data/frameworks/blueprint/templates/project/manifest.rb +0 -30
- data/frameworks/blueprint/templates/project/partials/_base.sass +0 -11
- data/frameworks/blueprint/templates/project/print.sass +0 -8
- data/frameworks/blueprint/templates/project/screen.sass +0 -46
- data/frameworks/blueprint/templates/semantic/grid.png +0 -0
- data/frameworks/blueprint/templates/semantic/ie.sass +0 -16
- data/frameworks/blueprint/templates/semantic/manifest.rb +0 -33
- data/frameworks/blueprint/templates/semantic/partials/_base.sass +0 -10
- data/frameworks/blueprint/templates/semantic/partials/_form.sass +0 -6
- data/frameworks/blueprint/templates/semantic/partials/_page.sass +0 -17
- data/frameworks/blueprint/templates/semantic/partials/_two_col.sass +0 -38
- data/frameworks/blueprint/templates/semantic/print.sass +0 -5
- data/frameworks/blueprint/templates/semantic/screen.sass +0 -14
- data/lib/compass/commands/generate_grid_background.rb +0 -96
- data/lib/compass/grid_builder.rb +0 -102
- data/test/fixtures/stylesheets/blueprint/config.rb +0 -14
- data/test/fixtures/stylesheets/blueprint/css/ie.css +0 -76
- data/test/fixtures/stylesheets/blueprint/css/print.css +0 -56
- data/test/fixtures/stylesheets/blueprint/css/screen.css +0 -815
- data/test/fixtures/stylesheets/blueprint/css/single-imports/buttons.css +0 -56
- data/test/fixtures/stylesheets/blueprint/css/single-imports/colors.css +0 -80
- data/test/fixtures/stylesheets/blueprint/css/single-imports/debug.css +0 -11
- data/test/fixtures/stylesheets/blueprint/css/single-imports/fancy-type.css +0 -30
- data/test/fixtures/stylesheets/blueprint/css/single-imports/form.css +0 -42
- data/test/fixtures/stylesheets/blueprint/css/single-imports/grid.css +0 -435
- data/test/fixtures/stylesheets/blueprint/css/single-imports/ie.css +0 -76
- data/test/fixtures/stylesheets/blueprint/css/single-imports/interaction.css +0 -46
- data/test/fixtures/stylesheets/blueprint/css/single-imports/link-icons.css +0 -40
- data/test/fixtures/stylesheets/blueprint/css/single-imports/liquid.css +0 -651
- data/test/fixtures/stylesheets/blueprint/css/single-imports/print.css +0 -60
- data/test/fixtures/stylesheets/blueprint/css/single-imports/reset-utilities.css +0 -75
- data/test/fixtures/stylesheets/blueprint/css/single-imports/reset.css +0 -42
- data/test/fixtures/stylesheets/blueprint/css/single-imports/rtl.css +0 -437
- data/test/fixtures/stylesheets/blueprint/css/single-imports/scaffolding.css +0 -45
- data/test/fixtures/stylesheets/blueprint/css/single-imports/typography.css +0 -146
- data/test/fixtures/stylesheets/blueprint/css/single-imports/utilities.css +0 -35
- data/test/fixtures/stylesheets/blueprint/images/grid.png +0 -0
- data/test/fixtures/stylesheets/blueprint/images/link_icons/doc.png +0 -0
- data/test/fixtures/stylesheets/blueprint/images/link_icons/email.png +0 -0
- data/test/fixtures/stylesheets/blueprint/images/link_icons/external.png +0 -0
- data/test/fixtures/stylesheets/blueprint/images/link_icons/feed.png +0 -0
- data/test/fixtures/stylesheets/blueprint/images/link_icons/im.png +0 -0
- data/test/fixtures/stylesheets/blueprint/images/link_icons/pdf.png +0 -0
- data/test/fixtures/stylesheets/blueprint/images/link_icons/visited.png +0 -0
- data/test/fixtures/stylesheets/blueprint/images/link_icons/xls.png +0 -0
- data/test/fixtures/stylesheets/blueprint/sass/ie.sass +0 -3
- data/test/fixtures/stylesheets/blueprint/sass/print.sass +0 -3
- data/test/fixtures/stylesheets/blueprint/sass/screen.sass +0 -18
- data/test/fixtures/stylesheets/blueprint/sass/single-imports/buttons.scss +0 -4
- data/test/fixtures/stylesheets/blueprint/sass/single-imports/colors.scss +0 -34
- data/test/fixtures/stylesheets/blueprint/sass/single-imports/debug.scss +0 -3
- data/test/fixtures/stylesheets/blueprint/sass/single-imports/fancy-type.scss +0 -3
- data/test/fixtures/stylesheets/blueprint/sass/single-imports/form.scss +0 -5
- data/test/fixtures/stylesheets/blueprint/sass/single-imports/grid.scss +0 -3
- data/test/fixtures/stylesheets/blueprint/sass/single-imports/ie.scss +0 -3
- data/test/fixtures/stylesheets/blueprint/sass/single-imports/interaction.scss +0 -3
- data/test/fixtures/stylesheets/blueprint/sass/single-imports/link-icons.scss +0 -13
- data/test/fixtures/stylesheets/blueprint/sass/single-imports/liquid.scss +0 -3
- data/test/fixtures/stylesheets/blueprint/sass/single-imports/print.scss +0 -5
- data/test/fixtures/stylesheets/blueprint/sass/single-imports/reset-utilities.scss +0 -5
- data/test/fixtures/stylesheets/blueprint/sass/single-imports/reset.scss +0 -1
- data/test/fixtures/stylesheets/blueprint/sass/single-imports/rtl.scss +0 -3
- data/test/fixtures/stylesheets/blueprint/sass/single-imports/scaffolding.scss +0 -5
- data/test/fixtures/stylesheets/blueprint/sass/single-imports/typography.scss +0 -3
- data/test/fixtures/stylesheets/blueprint/sass/single-imports/utilities.scss +0 -3
- data/test/fixtures/stylesheets/compass/images/flag-s4798b5a210.png +0 -0
- data/test/units/compass_png_test.rb +0 -46
|
@@ -1,16 +1,217 @@
|
|
|
1
|
-
|
|
1
|
+
// Test all functions and mixins, at least indirectly.
|
|
2
|
+
// functions:
|
|
3
|
+
// * rhythm
|
|
4
|
+
// * lines-for-font-size
|
|
5
|
+
//
|
|
6
|
+
// mixins:
|
|
7
|
+
// * establish-baseline
|
|
8
|
+
// * output-rhythm
|
|
9
|
+
// * debug-vertical-alignment
|
|
10
|
+
// * adjust-font-size-to
|
|
11
|
+
// * adjust-leading-to
|
|
12
|
+
// * leader
|
|
13
|
+
// * margin-leader
|
|
14
|
+
// * padding-leader
|
|
15
|
+
// * trailer
|
|
16
|
+
// * margin-trailer
|
|
17
|
+
// * padding-trailer
|
|
18
|
+
// * rhythm
|
|
19
|
+
// * rhythm-margins
|
|
20
|
+
// * rhythm-padding
|
|
21
|
+
// * apply-side-rhythm-border
|
|
22
|
+
// * leading-border
|
|
23
|
+
// * trailing-border
|
|
24
|
+
// * rhythm-borders
|
|
25
|
+
// * horizontal-borders (h-borders)
|
|
26
|
+
//
|
|
27
|
+
// deprecated mixins:
|
|
28
|
+
// * reset-baseline
|
|
2
29
|
|
|
3
30
|
$base-font-size: 14px;
|
|
4
31
|
$base-line-height: 16px;
|
|
32
|
+
@import "compass/typography/vertical_rhythm";
|
|
33
|
+
|
|
34
|
+
@include establish-baseline;
|
|
35
|
+
|
|
36
|
+
.small {
|
|
37
|
+
@include adjust-font-size-to(12px, 1);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.padded {
|
|
41
|
+
@include rhythm(1, 1, 1, 1);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.small-padded {
|
|
45
|
+
@include adjust-font-size-to(12px, 1);
|
|
46
|
+
@include rhythm(1, 1, 1, 1, 12px);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.borders {
|
|
50
|
+
@include h-borders(1px, 1);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.large-borders {
|
|
54
|
+
@include adjust-font-size-to(24px, 3);
|
|
55
|
+
@include h-borders(6px, 1, 24px);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.reset {
|
|
59
|
+
@include reset-baseline;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
/* New test using em output */
|
|
64
|
+
$base-font-size: 18px;
|
|
65
|
+
$base-line-height: $base-font-size * 1.4;
|
|
66
|
+
$rhythm-unit: em;
|
|
67
|
+
$default-rhythm-border-style: solid #aaa;
|
|
68
|
+
|
|
69
|
+
@import "compass/typography/vertical_rhythm";
|
|
5
70
|
|
|
6
71
|
@include establish-baseline;
|
|
7
72
|
|
|
8
|
-
.
|
|
73
|
+
.container {
|
|
74
|
+
@include debug-vertical-alignment;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
p {
|
|
78
|
+
@include margin-leader;
|
|
79
|
+
@include margin-trailer;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
th,
|
|
83
|
+
td {
|
|
84
|
+
@include rhythm-padding(.25);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
// Incremental leading made easy!
|
|
88
|
+
.caption {
|
|
89
|
+
@include adjust-font-size-to(13px, 4/5);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.spaced-out {
|
|
93
|
+
@include adjust-leading-to(1.5);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
blockquote {
|
|
97
|
+
@include rhythm-margins;
|
|
98
|
+
padding: 0 rhythm();
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.fig-quote {
|
|
102
|
+
> blockquote {
|
|
103
|
+
@include trailer(.5);
|
|
104
|
+
}
|
|
105
|
+
.source {
|
|
106
|
+
@include adjust-font-size-to(13px, auto);
|
|
107
|
+
@include trailer(.5, 13px);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.panel {
|
|
112
|
+
@include adjust-font-size-to(16px);
|
|
113
|
+
@include rhythm-borders($font-size: 16px);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/* New using rem output with pixel fallbacks */
|
|
117
|
+
$base-font-size: 18px;
|
|
118
|
+
$base-line-height: $base-font-size * 1.4;
|
|
119
|
+
$rhythm-unit: rem;
|
|
120
|
+
$default-rhythm-border-style: solid #aaa;
|
|
121
|
+
@import "compass/typography/vertical_rhythm";
|
|
122
|
+
|
|
123
|
+
@include establish-baseline;
|
|
124
|
+
|
|
125
|
+
.container {
|
|
126
|
+
@include debug-vertical-alignment;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
p {
|
|
130
|
+
@include margin-leader;
|
|
131
|
+
@include margin-trailer;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
th,
|
|
135
|
+
td {
|
|
136
|
+
@include rhythm-padding(.25);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/* Incremental leading made easy! */
|
|
140
|
+
.caption {
|
|
141
|
+
@include adjust-font-size-to(.85rem, 4/5);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.spaced-out {
|
|
145
|
+
@include adjust-leading-to(1.5);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
blockquote {
|
|
149
|
+
@include rhythm-margins;
|
|
150
|
+
padding: 0 rhythm();
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.fig-quote {
|
|
154
|
+
> blockquote {
|
|
155
|
+
@include trailer(.5);
|
|
156
|
+
}
|
|
157
|
+
.source {
|
|
158
|
+
@include adjust-font-size-to(.85rem, auto);
|
|
159
|
+
@include trailer(.5);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.panel {
|
|
164
|
+
@include rhythm-borders;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
/* New using px output */
|
|
168
|
+
$base-font-size: 18px;
|
|
169
|
+
$base-line-height: $base-font-size * 1.4;
|
|
170
|
+
$rhythm-unit: px;
|
|
171
|
+
$default-rhythm-border-style: solid #aaa;
|
|
172
|
+
@import "compass/typography/vertical_rhythm";
|
|
173
|
+
|
|
174
|
+
@include establish-baseline;
|
|
175
|
+
|
|
176
|
+
.container {
|
|
177
|
+
@include debug-vertical-alignment;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
p {
|
|
181
|
+
@include margin-leader;
|
|
182
|
+
@include margin-trailer;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
th,
|
|
186
|
+
td {
|
|
187
|
+
@include rhythm-padding(.25);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
/* Incremental leading made easy! */
|
|
191
|
+
.caption {
|
|
192
|
+
@include adjust-font-size-to(.85rem, 4/5);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.spaced-out {
|
|
196
|
+
@include adjust-leading-to(1.5);
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
blockquote {
|
|
200
|
+
@include rhythm-margins;
|
|
201
|
+
padding: 0 rhythm();
|
|
202
|
+
}
|
|
9
203
|
|
|
10
|
-
.
|
|
11
|
-
|
|
204
|
+
.fig-quote {
|
|
205
|
+
> blockquote {
|
|
206
|
+
@include trailer(.5);
|
|
207
|
+
}
|
|
208
|
+
.source {
|
|
209
|
+
@include adjust-font-size-to(.85rem, auto);
|
|
210
|
+
@include trailer(.5);
|
|
211
|
+
}
|
|
212
|
+
}
|
|
12
213
|
|
|
13
|
-
.
|
|
14
|
-
|
|
214
|
+
.panel {
|
|
215
|
+
@include rhythm-borders;
|
|
216
|
+
}
|
|
15
217
|
|
|
16
|
-
.reset { @include reset-baseline; }
|
|
@@ -1,2 +1,10 @@
|
|
|
1
1
|
.env {
|
|
2
2
|
env: <%= options[:environment] %>; }
|
|
3
|
+
.time {
|
|
4
|
+
time: "<%= Time.now.strftime("%F") %>"; }
|
|
5
|
+
.date {
|
|
6
|
+
date: "<%= Time.now.strftime("%F") %>"; }
|
|
7
|
+
.filename {
|
|
8
|
+
file: <%= filename.gsub(%r{/scss/}, '/sass/') %>; }
|
|
9
|
+
.output {
|
|
10
|
+
output: <%= output_file %>; }
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
.env {
|
|
2
|
+
env: production; }
|
|
3
|
+
|
|
4
|
+
.time {
|
|
5
|
+
time: "2013-04-03"; }
|
|
6
|
+
|
|
7
|
+
.date {
|
|
8
|
+
date: "2013-04-03"; }
|
|
9
|
+
|
|
10
|
+
.filename {
|
|
11
|
+
file: /Volumes/SSD/Work/compass/test/fixtures/stylesheets/envtest/sass/env.scss; }
|
|
12
|
+
|
|
13
|
+
.output {
|
|
14
|
+
output: /Volumes/SSD/Work/compass/test/fixtures/stylesheets/envtest/tmp/env.css; }
|
data/test/helpers/diff.rb
CHANGED
|
@@ -3,7 +3,7 @@ require 'diff/lcs/hunk'
|
|
|
3
3
|
module Compass
|
|
4
4
|
module Diff
|
|
5
5
|
#stole this from rspec who stole this from the gem
|
|
6
|
-
def diff_as_string(
|
|
6
|
+
def diff_as_string(data_old, data_new)
|
|
7
7
|
data_old = data_old.split(/\n/).map! { |e| e.chomp }
|
|
8
8
|
data_new = data_new.split(/\n/).map! { |e| e.chomp }
|
|
9
9
|
output = ""
|
|
@@ -11,7 +11,7 @@ class CompassTest < Test::Unit::TestCase
|
|
|
11
11
|
end
|
|
12
12
|
|
|
13
13
|
def teardown
|
|
14
|
-
[:
|
|
14
|
+
[:empty, :compass, :image_urls, :relative].each do |project_name|
|
|
15
15
|
::FileUtils.rm_rf tempfile_path(project_name)
|
|
16
16
|
end
|
|
17
17
|
end
|
|
@@ -23,7 +23,7 @@ class CompassTest < Test::Unit::TestCase
|
|
|
23
23
|
before_compile = Proc.new do |config|
|
|
24
24
|
config.on_stylesheet_saved {|filepath| path = filepath; saved = true }
|
|
25
25
|
end
|
|
26
|
-
within_project(:
|
|
26
|
+
within_project(:compass, before_compile)
|
|
27
27
|
assert saved, "Stylesheet callback didn't get called"
|
|
28
28
|
assert path.is_a?(String), "Path is not a string. Got: #{path.class.name}"
|
|
29
29
|
end
|
|
@@ -51,17 +51,6 @@ class CompassTest < Test::Unit::TestCase
|
|
|
51
51
|
end
|
|
52
52
|
end
|
|
53
53
|
|
|
54
|
-
def test_blueprint
|
|
55
|
-
within_project(:blueprint) do |proj|
|
|
56
|
-
each_css_file(proj.css_path) do |css_file|
|
|
57
|
-
assert_no_errors css_file, :blueprint
|
|
58
|
-
end
|
|
59
|
-
each_sass_file do |sass_file|
|
|
60
|
-
assert_renders_correctly sass_file, :ignore_charset => true
|
|
61
|
-
end
|
|
62
|
-
end
|
|
63
|
-
end
|
|
64
|
-
|
|
65
54
|
def test_compass
|
|
66
55
|
within_project('compass') do |proj|
|
|
67
56
|
each_css_file(proj.css_path) do |css_file|
|
|
@@ -95,6 +84,17 @@ class CompassTest < Test::Unit::TestCase
|
|
|
95
84
|
end
|
|
96
85
|
end
|
|
97
86
|
|
|
87
|
+
def test_busted_font_urls
|
|
88
|
+
within_project('busted_font_urls') do |proj|
|
|
89
|
+
each_css_file(proj.css_path) do |css_file|
|
|
90
|
+
assert_no_errors css_file, 'busted_font_urls'
|
|
91
|
+
end
|
|
92
|
+
each_sass_file do |sass_file|
|
|
93
|
+
assert_renders_correctly sass_file
|
|
94
|
+
end
|
|
95
|
+
end
|
|
96
|
+
end
|
|
97
|
+
|
|
98
98
|
def test_busted_image_urls
|
|
99
99
|
within_project('busted_image_urls') do |proj|
|
|
100
100
|
each_css_file(proj.css_path) do |css_file|
|
|
@@ -138,8 +138,9 @@ private
|
|
|
138
138
|
def assert_renders_correctly(*arguments)
|
|
139
139
|
options = arguments.last.is_a?(Hash) ? arguments.pop : {}
|
|
140
140
|
for name in arguments
|
|
141
|
-
actual_result_file = "#{tempfile_path(@current_project)}/#{name}.css"
|
|
141
|
+
@output_file = actual_result_file = "#{tempfile_path(@current_project)}/#{name}.css"
|
|
142
142
|
expected_result_file = "#{result_path(@current_project)}/#{name}.css"
|
|
143
|
+
@filename = expected_result_file.gsub('css', 'scss')
|
|
143
144
|
actual_lines = File.read(actual_result_file)
|
|
144
145
|
actual_lines.gsub!(/^@charset[^;]+;/,'') if options[:ignore_charset]
|
|
145
146
|
actual_lines = actual_lines.split("\n").reject{|l| l=~/\A\Z/}
|
|
@@ -221,4 +222,12 @@ private
|
|
|
221
222
|
File.join(project_path(project_name), "saved")
|
|
222
223
|
end
|
|
223
224
|
|
|
225
|
+
def filename
|
|
226
|
+
@filename
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
def output_file
|
|
230
|
+
@output_file
|
|
231
|
+
end
|
|
232
|
+
|
|
224
233
|
end
|