compass 0.13.alpha.0 → 0.13.alpha.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.markdown +6 -4
- data/Rakefile +9 -0
- data/VERSION.yml +2 -2
- data/bin/compass +2 -1
- data/features/command_line.feature +5 -27
- data/features/step_definitions/command_line_steps.rb +3 -2
- data/frameworks/compass/stylesheets/compass/_css3.scss +3 -0
- data/frameworks/compass/stylesheets/compass/_support.scss +6 -0
- data/frameworks/compass/stylesheets/compass/css3/_animation.scss +77 -76
- data/frameworks/compass/stylesheets/compass/css3/_appearance.scss +15 -9
- data/frameworks/compass/stylesheets/compass/css3/_background-clip.scss +35 -36
- data/frameworks/compass/stylesheets/compass/css3/_background-origin.scss +36 -34
- data/frameworks/compass/stylesheets/compass/css3/_background-size.scss +15 -15
- data/frameworks/compass/stylesheets/compass/css3/_border-radius.scss +30 -48
- data/frameworks/compass/stylesheets/compass/css3/_box-shadow.scss +22 -27
- data/frameworks/compass/stylesheets/compass/css3/_box-sizing.scss +13 -8
- data/frameworks/compass/stylesheets/compass/css3/_box.scss +60 -82
- data/frameworks/compass/stylesheets/compass/css3/_columns.scss +145 -25
- data/frameworks/compass/stylesheets/compass/css3/_filter.scss +44 -0
- data/frameworks/compass/stylesheets/compass/css3/_hyphenation.scss +77 -0
- data/frameworks/compass/stylesheets/compass/css3/_images.scss +2 -2
- data/frameworks/compass/stylesheets/compass/css3/_inline-block.scss +14 -8
- data/frameworks/compass/stylesheets/compass/css3/_selection.scss +31 -0
- data/frameworks/compass/stylesheets/compass/css3/_shared.scss +207 -21
- data/frameworks/compass/stylesheets/compass/css3/_text-shadow.scss +52 -13
- data/frameworks/compass/stylesheets/compass/css3/_transform.scss +14 -14
- data/frameworks/compass/stylesheets/compass/css3/_transition.scss +127 -60
- data/frameworks/compass/stylesheets/compass/css3/_user-interface.scss +35 -15
- data/frameworks/compass/stylesheets/compass/typography/_units.scss +152 -0
- data/frameworks/compass/stylesheets/compass/typography/_vertical_rhythm.scss +174 -98
- 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/typography/text/_replacement.scss +35 -9
- 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 +25 -10
- data/frameworks/compass/stylesheets/compass/utilities/tables/_borders.scss +14 -9
- data/lib/compass.rb +2 -2
- data/lib/compass/actions.rb +5 -1
- data/lib/compass/commands/project_base.rb +7 -1
- data/lib/compass/commands/update_project.rb +2 -2
- data/lib/compass/commands/watch_project.rb +6 -86
- data/lib/compass/compiler.rb +6 -0
- data/lib/compass/configuration/data.rb +1 -1
- data/lib/compass/configuration/helpers.rb +2 -0
- data/lib/compass/exec/global_options_parser.rb +1 -1
- data/lib/compass/exec/project_options_parser.rb +4 -0
- data/lib/compass/logger.rb +2 -0
- data/lib/compass/sass_extensions/functions/colors.rb +14 -0
- data/lib/compass/sass_extensions/functions/constants.rb +9 -0
- data/lib/compass/sass_extensions/functions/gradient_support.rb +44 -5
- data/lib/compass/sass_extensions/functions/image_size.rb +2 -1
- data/lib/compass/sass_extensions/functions/math.rb +14 -2
- data/lib/compass/sass_extensions/functions/sprites.rb +81 -14
- data/lib/compass/sass_extensions/functions/urls.rb +29 -2
- data/lib/compass/sass_extensions/sprites.rb +2 -0
- data/lib/compass/sass_extensions/sprites/engines/chunky_png_engine.rb +5 -1
- data/lib/compass/sass_extensions/sprites/image.rb +7 -2
- data/lib/compass/sass_extensions/sprites/image_methods.rb +5 -2
- data/lib/compass/sass_extensions/sprites/images.rb +29 -0
- data/lib/compass/sass_extensions/sprites/layout.rb +39 -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_methods.rb +9 -115
- data/lib/compass/sass_extensions/sprites/sprite_map.rb +5 -0
- data/lib/compass/sass_extensions/sprites/sprite_methods.rb +9 -5
- data/lib/compass/sprite_importer.rb +3 -3
- data/lib/compass/sprite_importer/content.erb +14 -12
- data/lib/compass/version.rb +2 -1
- data/lib/compass/watcher.rb +11 -0
- data/lib/compass/watcher/compiler.rb +59 -0
- data/lib/compass/watcher/project_watcher.rb +108 -0
- data/lib/compass/watcher/watch.rb +33 -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/{examples/css3/extensions/fancy-fonts/templates/project/bgrove.ttf → 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/compass/css/animation-with-legacy-ie.css +0 -8
- data/test/fixtures/stylesheets/compass/css/animation.css +0 -8
- 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 +81 -9
- data/test/fixtures/stylesheets/compass/css/filters.css +29 -0
- data/test/fixtures/stylesheets/compass/css/gradients.css +30 -27
- data/test/fixtures/stylesheets/compass/css/grid_background.css +7 -14
- data/test/fixtures/stylesheets/compass/css/hyphenation.css +16 -0
- data/test/fixtures/stylesheets/compass/css/lists.css +11 -13
- data/test/fixtures/stylesheets/compass/css/pie.css +0 -3
- data/test/fixtures/stylesheets/compass/css/replacement.css +59 -0
- data/test/fixtures/stylesheets/compass/css/reset.css +1 -1
- data/test/fixtures/stylesheets/compass/css/selection.css +13 -0
- data/test/fixtures/stylesheets/compass/css/sprites.css +250 -250
- data/test/fixtures/stylesheets/compass/css/text_shadow.css +22 -4
- data/test/fixtures/stylesheets/compass/css/transition.css +67 -11
- data/test/fixtures/stylesheets/compass/css/units.css +30 -0
- data/test/fixtures/stylesheets/compass/css/user-interface.css +12 -1
- data/test/fixtures/stylesheets/compass/css/utilities.css +15 -0
- data/test/fixtures/stylesheets/compass/css/vertical_rhythm.css +199 -27
- data/test/fixtures/stylesheets/compass/images/flag-s5b4f509715.png +0 -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 +18 -0
- data/test/fixtures/stylesheets/compass/sass/filters.scss +24 -0
- data/test/fixtures/stylesheets/compass/sass/gradients.sass +10 -3
- data/test/fixtures/stylesheets/compass/sass/hyphenation.scss +11 -0
- data/test/fixtures/stylesheets/compass/sass/replacement.scss +22 -0
- data/test/fixtures/stylesheets/compass/sass/selection.scss +13 -0
- data/test/fixtures/stylesheets/compass/sass/text_shadow.scss +6 -1
- data/test/fixtures/stylesheets/compass/sass/transition.scss +11 -0
- data/test/fixtures/stylesheets/compass/sass/units.scss +45 -0
- data/test/fixtures/stylesheets/compass/sass/user-interface.scss +10 -5
- 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/tmp/env.css +4 -4
- data/test/fixtures/stylesheets/valid/css/simple.css +4 -0
- data/test/helpers/test_case.rb +8 -1
- data/test/integrations/compass_test.rb +13 -13
- data/test/integrations/sprites_test.rb +173 -8
- data/test/test_helper.rb +4 -0
- data/test/units/command_line_test.rb +0 -2
- data/test/units/regressions_test.rb +35 -0
- data/test/units/sass_extensions_test.rb +23 -11
- 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 +18 -2
- data/test/units/watcher/compiler_test.rb +39 -0
- data/test/units/watcher/project_watcher_test.rb +65 -0
- data/test/units/watcher/watch_test.rb +42 -0
- metadata +83 -317
- data/bin/compass.compiled.rbc +0 -707
- data/examples/compass/images/emblem-a043c4f148.png +0 -0
- data/examples/compass/images/flag-03c3b29b35.png +0 -0
- data/examples/compass/images/flag-21cfbfbfc8.png +0 -0
- data/examples/css3/extensions/fancy-fonts/templates/project/Prociono.otf +0 -0
- data/examples/css3/extensions/fancy-fonts/templates/project/bgrove.otf +0 -0
- 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 -80
- 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.sass +0 -49
- 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/manifest.rb +0 -17
- data/frameworks/blueprint/templates/link_icons/link_icons.sass +0 -13
- 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/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.rbc +0 -796
- data/lib/compass/actions.rbc +0 -2736
- data/lib/compass/app_integration.rbc +0 -836
- data/lib/compass/app_integration/merb.rbc +0 -106
- data/lib/compass/app_integration/rails.rbc +0 -2096
- data/lib/compass/app_integration/rails/configuration_defaults.rbc +0 -2430
- data/lib/compass/app_integration/rails/installer.rbc +0 -3677
- data/lib/compass/app_integration/stand_alone.rbc +0 -589
- data/lib/compass/app_integration/stand_alone/configuration_defaults.rbc +0 -721
- data/lib/compass/app_integration/stand_alone/installer.rbc +0 -1487
- data/lib/compass/browser_support.rbc +0 -1144
- data/lib/compass/commands.rbc +0 -307
- data/lib/compass/commands/base.rbc +0 -1044
- data/lib/compass/commands/clean_project.rbc +0 -1856
- data/lib/compass/commands/create_project.rbc +0 -2691
- data/lib/compass/commands/default.rbc +0 -1677
- data/lib/compass/commands/generate_grid_background.rbc +0 -1939
- data/lib/compass/commands/help.rbc +0 -1921
- data/lib/compass/commands/imports.rbc +0 -969
- data/lib/compass/commands/installer_command.rbc +0 -807
- data/lib/compass/commands/interactive.rbc +0 -1341
- data/lib/compass/commands/list_frameworks.rbc +0 -1111
- data/lib/compass/commands/print_version.rbc +0 -2478
- data/lib/compass/commands/project_base.rbc +0 -2085
- data/lib/compass/commands/project_stats.rbc +0 -4202
- data/lib/compass/commands/registry.rbc +0 -1350
- data/lib/compass/commands/sprite.rbc +0 -2212
- data/lib/compass/commands/stamp_pattern.rbc +0 -2011
- data/lib/compass/commands/unpack_extension.rbc +0 -2348
- data/lib/compass/commands/update_project.rbc +0 -3002
- data/lib/compass/commands/validate_project.rbc +0 -1686
- data/lib/compass/commands/watch_project.rbc +0 -4155
- data/lib/compass/commands/write_configuration.rbc +0 -2896
- data/lib/compass/compiler.rbc +0 -4913
- data/lib/compass/configuration.rbc +0 -1398
- data/lib/compass/configuration/adapters.rbc +0 -2088
- data/lib/compass/configuration/comments.rbc +0 -843
- data/lib/compass/configuration/data.rbc +0 -2633
- data/lib/compass/configuration/defaults.rbc +0 -3617
- data/lib/compass/configuration/file_data.rbc +0 -643
- data/lib/compass/configuration/helpers.rbc +0 -3500
- data/lib/compass/configuration/inheritance.rbc +0 -3592
- data/lib/compass/configuration/paths.rbc +0 -412
- data/lib/compass/configuration/serialization.rbc +0 -1996
- data/lib/compass/dependencies.rbc +0 -232
- data/lib/compass/errors.rbc +0 -176
- data/lib/compass/exec.rbc +0 -500
- data/lib/compass/exec/command_option_parser.rbc +0 -676
- data/lib/compass/exec/global_options_parser.rbc +0 -1306
- data/lib/compass/exec/helpers.rbc +0 -758
- data/lib/compass/exec/project_options_parser.rbc +0 -1515
- data/lib/compass/exec/sub_command_ui.rbc +0 -1191
- data/lib/compass/frameworks.rbc +0 -3640
- data/lib/compass/grid_builder.rbc +0 -0
- data/lib/compass/installers.rbc +0 -152
- data/lib/compass/installers/bare_installer.rbc +0 -939
- data/lib/compass/installers/base.rbc +0 -4427
- data/lib/compass/installers/manifest.rbc +0 -3335
- data/lib/compass/installers/manifest_installer.rbc +0 -1591
- data/lib/compass/installers/template_context.rbc +0 -1030
- data/lib/compass/logger.rbc +0 -2317
- data/lib/compass/quick_cache.rbc +0 -324
- data/lib/compass/sass_extensions.rbc +0 -213
- data/lib/compass/sass_extensions/functions.rbc +0 -808
- data/lib/compass/sass_extensions/functions/colors.rbc +0 -1279
- data/lib/compass/sass_extensions/functions/constants.rbc +0 -1921
- data/lib/compass/sass_extensions/functions/cross_browser_support.rbc +0 -1966
- data/lib/compass/sass_extensions/functions/display.rbc +0 -1227
- data/lib/compass/sass_extensions/functions/enumerate.rbc +0 -446
- data/lib/compass/sass_extensions/functions/env.rbc +0 -299
- data/lib/compass/sass_extensions/functions/font_files.rbc +0 -821
- data/lib/compass/sass_extensions/functions/gradient_support.rbc +0 -14147
- data/lib/compass/sass_extensions/functions/image_size.rbc +0 -3152
- data/lib/compass/sass_extensions/functions/inline_image.rbc +0 -1678
- data/lib/compass/sass_extensions/functions/lists.rbc +0 -2601
- data/lib/compass/sass_extensions/functions/selectors.rbc +0 -1592
- data/lib/compass/sass_extensions/functions/sprites.rbc +0 -3792
- data/lib/compass/sass_extensions/functions/trig.rbc +0 -811
- data/lib/compass/sass_extensions/functions/urls.rbc +0 -5248
- data/lib/compass/sass_extensions/monkey_patches.rbc +0 -134
- data/lib/compass/sass_extensions/monkey_patches/browser_support.rbc +0 -2169
- data/lib/compass/sass_extensions/monkey_patches/traversal.rbc +0 -660
- data/lib/compass/sass_extensions/sprites.rbc +0 -363
- data/lib/compass/sass_extensions/sprites/base.rbc +0 -4529
- data/lib/compass/sass_extensions/sprites/engines.rbc +0 -662
- data/lib/compass/sass_extensions/sprites/engines/chunky_png_engine.rbc +0 -1074
- data/lib/compass/sass_extensions/sprites/image.rbc +0 -2961
- data/lib/compass/sass_extensions/sprites/image_methods.rbc +0 -900
- data/lib/compass/sass_extensions/sprites/image_row.rbc +0 -1168
- data/lib/compass/sass_extensions/sprites/layout_methods.rbc +0 -3236
- data/lib/compass/sass_extensions/sprites/row_fitter.rbc +0 -2067
- data/lib/compass/sass_extensions/sprites/sprite_map.rbc +0 -1991
- data/lib/compass/sass_extensions/sprites/sprite_methods.rbc +0 -3190
- data/lib/compass/sass_extensions/sprites/sprites.rbc +0 -1573
- data/lib/compass/sprite_importer.rbc +0 -3573
- data/lib/compass/util.rbc +0 -552
- data/lib/compass/version.rbc +0 -1245
- 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 -816
- data/test/fixtures/stylesheets/blueprint/css/single-imports/buttons.css +0 -58
- data/test/fixtures/stylesheets/blueprint/css/single-imports/colors.css +0 -80
- data/test/fixtures/stylesheets/blueprint/css/single-imports/debug.css +0 -12
- 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 -36
- data/test/fixtures/stylesheets/blueprint/css/single-imports/reset.css +0 -40
- 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/helpers/command_line.rbc +0 -2820
- data/test/helpers/diff.rbc +0 -1104
- data/test/helpers/io.rbc +0 -962
- data/test/helpers/rails.rbc +0 -1116
- data/test/helpers/test_case.rbc +0 -1255
- data/test/integrations/compass_test.rbc +0 -6589
- data/test/integrations/rails_integration_test.rbc +0 -1342
- data/test/integrations/sprites_test.rbc +0 -6192
- data/test/test_helper.rbc +0 -1694
- data/test/units/actions_test.rbc +0 -644
- data/test/units/command_line_test.rbc +0 -1532
- data/test/units/compass_png_test.rbc +0 -0
- data/test/units/configuration_test.rbc +0 -3833
- data/test/units/rails_configuration_test.rbc +0 -1032
- data/test/units/sass_extensions_test.rbc +0 -3586
- data/test/units/sprites/engine_test.rbc +0 -962
- data/test/units/sprites/image_row_test.rbc +0 -1578
- data/test/units/sprites/image_test.rbc +0 -2836
- data/test/units/sprites/importer_test.rbc +0 -2620
- data/test/units/sprites/row_fitter_test.rbc +0 -1479
- data/test/units/sprites/sprite_command_test.rbc +0 -1147
- data/test/units/sprites/sprite_map_test.rbc +0 -6515
@@ -2,13 +2,13 @@
|
|
2
2
|
env: production; }
|
3
3
|
|
4
4
|
.time {
|
5
|
-
time: "
|
5
|
+
time: "2013-02-07"; }
|
6
6
|
|
7
7
|
.date {
|
8
|
-
date: "
|
8
|
+
date: "2013-02-07"; }
|
9
9
|
|
10
10
|
.filename {
|
11
|
-
file: /Users/
|
11
|
+
file: /Users/sdavis/Work/compass/test/fixtures/stylesheets/envtest/sass/env.scss; }
|
12
12
|
|
13
13
|
.output {
|
14
|
-
output: /Users/
|
14
|
+
output: /Users/sdavis/Work/compass/test/fixtures/stylesheets/envtest/tmp/env.css; }
|
data/test/helpers/test_case.rb
CHANGED
@@ -9,7 +9,14 @@ module Compass
|
|
9
9
|
File.join(File.expand_path('../../', __FILE__), path)
|
10
10
|
end
|
11
11
|
end
|
12
|
-
|
12
|
+
|
13
|
+
# compile a Sass string in the context of a project in the current working directory.
|
14
|
+
def compile_for_project(contents, options = {})
|
15
|
+
Compass.add_project_configuration
|
16
|
+
options[:syntax] ||= :scss
|
17
|
+
Sass::Engine.new(contents, Compass.configuration.to_sass_engine_options.merge(options)).render
|
18
|
+
end
|
19
|
+
|
13
20
|
def assert_correct(before, after)
|
14
21
|
if before == after
|
15
22
|
assert(true)
|
@@ -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|
|
@@ -13,6 +13,7 @@ class SpritesTest < Test::Unit::TestCase
|
|
13
13
|
@images_tmp_path = File.join(File.dirname(__FILE__), '..', 'fixtures', 'sprites', 'public', 'images-tmp')
|
14
14
|
@generated_images_tmp_path = File.join(File.dirname(__FILE__), '..', 'fixtures', 'sprites', 'public', 'generated-images-tmp')
|
15
15
|
::FileUtils.cp_r @images_src_path, @images_tmp_path
|
16
|
+
::FileUtils.mkdir_p @generated_images_tmp_path
|
16
17
|
file = StringIO.new("images_path = #{@images_tmp_path.inspect}\n")
|
17
18
|
Compass.add_configuration(file, "sprite_config")
|
18
19
|
Compass.configure_sass_plugin!
|
@@ -34,7 +35,7 @@ class SpritesTest < Test::Unit::TestCase
|
|
34
35
|
end
|
35
36
|
|
36
37
|
def image_size(file)
|
37
|
-
|
38
|
+
Compass::SassExtensions::Functions::ImageSize::ImageProperties.new(map_location(file)).size
|
38
39
|
end
|
39
40
|
|
40
41
|
def image_md5(file)
|
@@ -474,6 +475,123 @@ class SpritesTest < Test::Unit::TestCase
|
|
474
475
|
CSS
|
475
476
|
end
|
476
477
|
|
478
|
+
it "should use percentage positions when use_percentages is true" do
|
479
|
+
css = render <<-SCSS
|
480
|
+
@import "squares/*.png";
|
481
|
+
$squares-use-percentages: true;
|
482
|
+
.foo {
|
483
|
+
@include squares-sprite-position("twenty-by-twenty");
|
484
|
+
}
|
485
|
+
.bar {
|
486
|
+
@include squares-sprite-position("ten-by-ten");
|
487
|
+
@include squares-sprite-dimensions("ten-by-ten");
|
488
|
+
}
|
489
|
+
SCSS
|
490
|
+
assert_correct css, <<-CSS
|
491
|
+
.squares-sprite {
|
492
|
+
background: url('/squares-sbbc18e2129.png') no-repeat;
|
493
|
+
}
|
494
|
+
|
495
|
+
.foo {
|
496
|
+
background-position: 0 100%;
|
497
|
+
}
|
498
|
+
|
499
|
+
.bar {
|
500
|
+
background-position: 0 0;
|
501
|
+
height: 10px;
|
502
|
+
width: 10px;
|
503
|
+
}
|
504
|
+
CSS
|
505
|
+
end
|
506
|
+
|
507
|
+
it "should use correct percentages when use_percentages is with horizontal layout" do
|
508
|
+
css = render <<-SCSS
|
509
|
+
$squares-layout: horizontal;
|
510
|
+
@import "squares/*.png";
|
511
|
+
$squares-use-percentages: true;
|
512
|
+
.foo {
|
513
|
+
@include squares-sprite-position("twenty-by-twenty");
|
514
|
+
}
|
515
|
+
.bar {
|
516
|
+
@include squares-sprite-position("ten-by-ten");
|
517
|
+
}
|
518
|
+
SCSS
|
519
|
+
assert_correct css, <<-CSS
|
520
|
+
.squares-sprite {
|
521
|
+
background: url('/squares-s4bd95c5c56.png') no-repeat;
|
522
|
+
}
|
523
|
+
|
524
|
+
.foo {
|
525
|
+
background-position: 100% 0;
|
526
|
+
}
|
527
|
+
|
528
|
+
.bar {
|
529
|
+
background-position: 0 0;
|
530
|
+
}
|
531
|
+
CSS
|
532
|
+
end
|
533
|
+
|
534
|
+
it "should use correct percentages when use_percentages is true with smart layout" do
|
535
|
+
css = render <<-SCSS
|
536
|
+
$image_row-layout: smart;
|
537
|
+
@import "image_row/*.png";
|
538
|
+
$image_row-use-percentages: true;
|
539
|
+
.foo {
|
540
|
+
@include image_row-sprite-position("medium");
|
541
|
+
}
|
542
|
+
.bar {
|
543
|
+
@include image_row-sprite-position("large_square");
|
544
|
+
}
|
545
|
+
SCSS
|
546
|
+
assert_correct css, <<-CSS
|
547
|
+
.image_row-sprite {
|
548
|
+
background: url('/image_row-sc5082a6b9f.png') no-repeat;
|
549
|
+
}
|
550
|
+
|
551
|
+
.foo {
|
552
|
+
background-position: 0 50%;
|
553
|
+
}
|
554
|
+
|
555
|
+
.bar {
|
556
|
+
background-position: 33.33333% 100%;
|
557
|
+
}
|
558
|
+
CSS
|
559
|
+
end
|
560
|
+
|
561
|
+
it "should use correct percentages when use_percentages is true" do
|
562
|
+
css = render <<-SCSS
|
563
|
+
$image_row-use-percentages: true;
|
564
|
+
$image_row-sort-by : '!width';
|
565
|
+
@import "image_row/*.png";
|
566
|
+
@include all-image_row-sprites;
|
567
|
+
SCSS
|
568
|
+
assert_correct css, <<-CSS
|
569
|
+
.image_row-sprite, .image_row-large, .image_row-large_square, .image_row-medium, .image_row-small, .image_row-tall {
|
570
|
+
background: url('/image_row-sdf383d45a3.png') no-repeat;
|
571
|
+
}
|
572
|
+
|
573
|
+
.image_row-large {
|
574
|
+
background-position: 0 0;
|
575
|
+
}
|
576
|
+
|
577
|
+
.image_row-large_square {
|
578
|
+
background-position: 0 40%;
|
579
|
+
}
|
580
|
+
|
581
|
+
.image_row-medium {
|
582
|
+
background-position: 0 16.66667%;
|
583
|
+
}
|
584
|
+
|
585
|
+
.image_row-small {
|
586
|
+
background-position: 0 100%;
|
587
|
+
}
|
588
|
+
|
589
|
+
.image_row-tall {
|
590
|
+
background-position: 0 80%;
|
591
|
+
}
|
592
|
+
CSS
|
593
|
+
end
|
594
|
+
|
477
595
|
it "should calculate corret sprite demsions when givin spacing via issue#253" do
|
478
596
|
css = render <<-SCSS
|
479
597
|
$squares-spacing: 10px;
|
@@ -627,6 +745,7 @@ class SpritesTest < Test::Unit::TestCase
|
|
627
745
|
|
628
746
|
it "should not raise error on filenames that are invalid classnames if the selector generation is not used" do
|
629
747
|
css = render <<-SCSS
|
748
|
+
$prefix-sort-by : 'width';
|
630
749
|
@import "prefix/*.png";
|
631
750
|
a {
|
632
751
|
@include prefix-sprite("20-by-20");
|
@@ -796,18 +915,18 @@ class SpritesTest < Test::Unit::TestCase
|
|
796
915
|
background:url('/colors-s58671cb5bb.png') no-repeat;
|
797
916
|
}
|
798
917
|
.blue {
|
799
|
-
text-indent
|
800
|
-
white-space:nowrap;
|
918
|
+
text-indent:-119988px;
|
801
919
|
overflow:hidden;
|
920
|
+
text-align:left;
|
802
921
|
background-position:0 0;
|
803
922
|
background-image:url('/colors-s58671cb5bb.png');
|
804
923
|
background-repeat:no-repeat;
|
805
924
|
}
|
806
925
|
|
807
926
|
.yellow {
|
808
|
-
text-indent
|
809
|
-
white-space:nowrap;
|
927
|
+
text-indent:-119988px;
|
810
928
|
overflow:hidden;
|
929
|
+
text-align:left;
|
811
930
|
background-position:0 -10px;
|
812
931
|
height:10px;
|
813
932
|
width:10px;
|
@@ -819,7 +938,14 @@ class SpritesTest < Test::Unit::TestCase
|
|
819
938
|
end
|
820
939
|
|
821
940
|
it "should inline the sprite file" do
|
822
|
-
|
941
|
+
Compass.reset_configuration!
|
942
|
+
file = StringIO.new(<<-CONFIG)
|
943
|
+
images_path = #{@images_tmp_path.inspect}
|
944
|
+
generated_images_path = #{@generated_images_tmp_path.inspect}
|
945
|
+
CONFIG
|
946
|
+
Compass.add_configuration(file, "sprite_config")
|
947
|
+
Compass.configure_sass_plugin!
|
948
|
+
css = render <<-SCSS
|
823
949
|
$colors-inline:true;
|
824
950
|
@import "colors/*.png";
|
825
951
|
@include all-colors-sprites;
|
@@ -840,7 +966,6 @@ class SpritesTest < Test::Unit::TestCase
|
|
840
966
|
|
841
967
|
it "should have a sprite_name function that returns the names of the sprites in a sass list" do
|
842
968
|
css = render <<-SCSS
|
843
|
-
$colors-inline:true;
|
844
969
|
@import "colors/*.png";
|
845
970
|
@each $color in sprite_names($colors-sprites) {
|
846
971
|
.\#{$color} {
|
@@ -850,7 +975,7 @@ class SpritesTest < Test::Unit::TestCase
|
|
850
975
|
SCSS
|
851
976
|
other_css = <<-CSS
|
852
977
|
.colors-sprite {
|
853
|
-
background
|
978
|
+
background: url('/colors-s58671cb5bb.png') no-repeat;
|
854
979
|
}
|
855
980
|
.blue {
|
856
981
|
width:0px;
|
@@ -883,4 +1008,44 @@ class SpritesTest < Test::Unit::TestCase
|
|
883
1008
|
assert_correct clean(css), clean(other_css)
|
884
1009
|
end
|
885
1010
|
|
1011
|
+
it "should return width and height of the map" do
|
1012
|
+
css = render <<-SCSS
|
1013
|
+
@import "colors/*.png";
|
1014
|
+
.height { height : sprite_height($colors-sprites); }
|
1015
|
+
.width { width : sprite_width($colors-sprites); }
|
1016
|
+
SCSS
|
1017
|
+
other_css = <<-CSS
|
1018
|
+
.colors-sprite {
|
1019
|
+
background: url('/colors-s58671cb5bb.png') no-repeat;
|
1020
|
+
}
|
1021
|
+
.height {
|
1022
|
+
height : 20px;
|
1023
|
+
}
|
1024
|
+
.width {
|
1025
|
+
width : 10px;
|
1026
|
+
}
|
1027
|
+
CSS
|
1028
|
+
assert_correct clean(css), clean(other_css)
|
1029
|
+
end
|
1030
|
+
|
1031
|
+
it "should return width and height of a sprite" do
|
1032
|
+
css = render <<-SCSS
|
1033
|
+
@import "colors/*.png";
|
1034
|
+
.height { height : sprite_height($colors-sprites, blue); }
|
1035
|
+
.width { width : sprite_width($colors-sprites, blue); }
|
1036
|
+
SCSS
|
1037
|
+
other_css = <<-CSS
|
1038
|
+
.colors-sprite {
|
1039
|
+
background: url('/colors-s58671cb5bb.png') no-repeat;
|
1040
|
+
}
|
1041
|
+
.height {
|
1042
|
+
height : 10px;
|
1043
|
+
}
|
1044
|
+
.width {
|
1045
|
+
width : 10px;
|
1046
|
+
}
|
1047
|
+
CSS
|
1048
|
+
assert_correct clean(css), clean(other_css)
|
1049
|
+
end
|
1050
|
+
|
886
1051
|
end
|
data/test/test_helper.rb
CHANGED
@@ -22,10 +22,8 @@ class CommandLineTest < Test::Unit::TestCase
|
|
22
22
|
within_tmp_directory do
|
23
23
|
compass "create", "--boring", "basic"
|
24
24
|
assert File.exists?("basic/sass/screen.scss")
|
25
|
-
assert File.exists?("basic/stylesheets/screen.css")
|
26
25
|
assert_action_performed :directory, "basic/"
|
27
26
|
assert_action_performed :create, "basic/sass/screen.scss"
|
28
|
-
assert_action_performed :create, "basic/stylesheets/screen.css"
|
29
27
|
end
|
30
28
|
end
|
31
29
|
|
@@ -0,0 +1,35 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
require 'compass'
|
3
|
+
require 'compass/exec'
|
4
|
+
require 'stringio'
|
5
|
+
|
6
|
+
class RegressionsTest < Test::Unit::TestCase
|
7
|
+
include Compass::CommandLineHelper
|
8
|
+
setup do
|
9
|
+
Compass.reset_configuration!
|
10
|
+
end
|
11
|
+
|
12
|
+
after do
|
13
|
+
Compass.reset_configuration!
|
14
|
+
end
|
15
|
+
|
16
|
+
def test_issue911_sprites_with_globbing_and_line_comments
|
17
|
+
within_tmp_directory do
|
18
|
+
compass "create --bare issue911"
|
19
|
+
FileUtils.mkdir_p "issue911/images/sprites/a"
|
20
|
+
FileUtils.mkdir_p "issue911/images/sprites/b"
|
21
|
+
open "issue911/images/sprites/a/foo.png", "wb" do |f|
|
22
|
+
f.write(Compass::PNG.new(5,10, [255,0,255]).to_blob)
|
23
|
+
end
|
24
|
+
open "issue911/images/sprites/b/bar.png", "wb" do |f|
|
25
|
+
f.write(Compass::PNG.new(5,10, [255,255,0]).to_blob)
|
26
|
+
end
|
27
|
+
Dir.chdir "issue911" do
|
28
|
+
result = compile_for_project(<<-SCSS)
|
29
|
+
@import "sprites/**/*.png";
|
30
|
+
SCSS
|
31
|
+
Sass::Engine.new(result, :syntax => :scss).render # raises an error if we generated invalid css
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -23,7 +23,7 @@ class SassExtensionsTest < Test::Unit::TestCase
|
|
23
23
|
def test_enumerate
|
24
24
|
assert_equal ".grid-1, .grid-2, .grid-3", evaluate(%Q{enumerate(".grid", 1, 3, "-")})
|
25
25
|
end
|
26
|
-
|
26
|
+
|
27
27
|
def test_append_selector
|
28
28
|
assert_equal "div.bar", evaluate(%Q{append_selector("div", ".bar")})
|
29
29
|
assert_equal ".foo1.bar1, .foo1.bar2, .foo2.bar1, .foo2.bar2", evaluate(%Q{append_selector(".foo1, .foo2", ".bar1, .bar2")})
|
@@ -59,30 +59,40 @@ class SassExtensionsTest < Test::Unit::TestCase
|
|
59
59
|
assert_equal "25%", evaluate("saturation(adjust-saturation(hsl(50deg, 50%, 50%), -25%))")
|
60
60
|
end
|
61
61
|
|
62
|
+
def test_shade
|
63
|
+
assert_equal evaluate("mix(black, #ff0, 25%)"), evaluate("shade(#ff0, 25%)")
|
64
|
+
assert_equal evaluate("mix(black, #ff0, 0%)"), evaluate("shade(#ff0, 0%)")
|
65
|
+
end
|
66
|
+
|
67
|
+
def test_tint
|
68
|
+
assert_equal evaluate("mix(white, #ff0, 75%)"), evaluate("tint(#ff0, 75%)")
|
69
|
+
assert_equal evaluate("mix(white, #ff0, 100%)"), evaluate("tint(#ff0, 100%)")
|
70
|
+
end
|
71
|
+
|
62
72
|
def test_if_function
|
63
73
|
assert_equal "no", evaluate("if(false, yes, no)")
|
64
74
|
assert_equal "yes", evaluate("if(true, yes, no)")
|
65
75
|
end
|
66
76
|
|
67
77
|
def test_math_functions
|
68
|
-
assert_equal "0.
|
69
|
-
assert_equal "0.
|
78
|
+
assert_equal "0.84147", evaluate("sin(1)")
|
79
|
+
assert_equal "0.84147px", evaluate("sin(1px)")
|
70
80
|
assert_equal "0.0", evaluate("sin(pi())")
|
71
81
|
assert_equal "1", evaluate("sin(pi() / 2)")
|
72
82
|
assert_equal "0.0", evaluate("sin(180deg)")
|
73
83
|
assert_equal "-1", evaluate("sin(3* pi() / 2)")
|
74
84
|
assert_equal "-1", evaluate("cos(pi())")
|
75
85
|
assert_equal "1", evaluate("cos(360deg)")
|
76
|
-
assert_equal "-0.
|
86
|
+
assert_equal "-0.17605", evaluate("sin(270)")
|
77
87
|
assert_equal "1", evaluate("cos(2*pi())")
|
78
88
|
assert_equal "0.0", evaluate("cos(pi() / 2)")
|
79
89
|
assert_equal "0.0", evaluate("cos(3* pi() / 2)")
|
80
90
|
assert_equal "0.0", evaluate("tan(pi())")
|
81
91
|
assert_equal "0.0", evaluate("tan(360deg)")
|
82
|
-
assert_equal "0.
|
92
|
+
assert_equal "0.95892", evaluate("sin(360)")
|
83
93
|
assert evaluate("tan(pi()/2 - 0.0001)").to_f > 1000, evaluate("tan(pi()/2 - 0.0001)")
|
84
94
|
assert evaluate("tan(pi()/2 + 0.0001)").to_f < -1000, evaluate("tan(pi()/2 - 0.0001)")
|
85
|
-
assert_equal "0.
|
95
|
+
assert_equal "0.69315px", evaluate("logarithm(2px)")
|
86
96
|
assert_equal "0", evaluate("logarithm(1)")
|
87
97
|
assert_equal "1", evaluate("logarithm(e())")
|
88
98
|
assert_equal "1", evaluate("logarithm($number: e())")
|
@@ -93,7 +103,9 @@ class SassExtensionsTest < Test::Unit::TestCase
|
|
93
103
|
assert_equal "5px", evaluate("square-root($number: 25px)")
|
94
104
|
assert_equal "25px", evaluate("pow(5px, 2)")
|
95
105
|
assert_equal "25px", evaluate("pow($number: 5px, $exponent: 2)")
|
96
|
-
assert_equal "79.
|
106
|
+
assert_equal "79.43236px", evaluate("pow(5px, e())")
|
107
|
+
assert (0..2).include?(evaluate("random(2)").to_i)
|
108
|
+
assert (4..16).include?(evaluate("random(4, 16)").to_i)
|
97
109
|
end
|
98
110
|
|
99
111
|
def test_blank
|
@@ -166,16 +178,16 @@ class SassExtensionsTest < Test::Unit::TestCase
|
|
166
178
|
base64_string = File.read(File.join(Compass.configuration.fonts_path, "bgrove.base64.txt")).chomp
|
167
179
|
assert_equal "url('data:font/truetype;base64,#{base64_string}') format('truetype')", evaluate("inline_font_files('bgrove.ttf', truetype)")
|
168
180
|
end
|
169
|
-
|
170
|
-
|
181
|
+
|
182
|
+
|
171
183
|
def test_image_size_should_respond_to_to_path
|
172
184
|
object = mock()
|
173
185
|
object.expects(:to_path).returns('foo.jpg')
|
174
186
|
object.expects(:respond_to?).with(:to_path).returns(true)
|
175
|
-
|
187
|
+
|
176
188
|
Compass::SassExtensions::Functions::ImageSize::ImageProperties.new(object)
|
177
189
|
end
|
178
|
-
|
190
|
+
|
179
191
|
def test_reject
|
180
192
|
assert_equal "b d", evaluate("reject(a b c d, a, c)")
|
181
193
|
assert_equal "a b c d", evaluate("reject(a b c d, e)")
|