Repository: Compass/compass Branch: stable Commit: 4de01475c984 Files: 883 Total size: 2.0 MB Directory structure: gitextract_y675jjmd/ ├── .gitignore ├── .travis.yml ├── CONTRIBUTING.md ├── Guardfile ├── LICENSE.markdown ├── README.markdown ├── Rakefile ├── TODO.md ├── cli/ │ ├── .gitignore │ ├── Gemfile │ ├── Rakefile │ ├── VERSION │ ├── VERSION_NAME │ ├── bin/ │ │ └── compass │ ├── compass.gemspec │ ├── features/ │ │ ├── command_line.feature │ │ ├── extensions.feature │ │ └── step_definitions/ │ │ ├── command_line_steps.rb │ │ └── extension_steps.rb │ ├── gemfiles/ │ │ ├── listen_2.gemfile │ │ ├── sass_3_3.gemfile │ │ └── sass_local.gemfile │ ├── lib/ │ │ ├── compass/ │ │ │ ├── actions.rb │ │ │ ├── app_integration/ │ │ │ │ ├── stand_alone/ │ │ │ │ │ ├── configuration_defaults.rb │ │ │ │ │ └── installer.rb │ │ │ │ └── stand_alone.rb │ │ │ ├── app_integration.rb │ │ │ ├── commands/ │ │ │ │ ├── base.rb │ │ │ │ ├── clean_project.rb │ │ │ │ ├── create_project.rb │ │ │ │ ├── default.rb │ │ │ │ ├── extension_command.rb │ │ │ │ ├── help.rb │ │ │ │ ├── imports.rb │ │ │ │ ├── installer_command.rb │ │ │ │ ├── interactive.rb │ │ │ │ ├── list_frameworks.rb │ │ │ │ ├── print_version.rb │ │ │ │ ├── project_base.rb │ │ │ │ ├── project_stats.rb │ │ │ │ ├── project_structure.rb │ │ │ │ ├── registry.rb │ │ │ │ ├── sprite.rb │ │ │ │ ├── stamp_pattern.rb │ │ │ │ ├── unpack_extension.rb │ │ │ │ ├── update_project.rb │ │ │ │ ├── validate_project.rb │ │ │ │ ├── watch_project.rb │ │ │ │ └── write_configuration.rb │ │ │ ├── commands.rb │ │ │ ├── compiler.rb │ │ │ ├── configuration/ │ │ │ │ ├── comments.rb │ │ │ │ ├── file_data.rb │ │ │ │ ├── helpers.rb │ │ │ │ └── serialization.rb │ │ │ ├── dependencies.rb │ │ │ ├── deprecation.rb │ │ │ ├── errors.rb │ │ │ ├── exec/ │ │ │ │ ├── command_option_parser.rb │ │ │ │ ├── global_options_parser.rb │ │ │ │ ├── helpers.rb │ │ │ │ ├── project_options_parser.rb │ │ │ │ └── sub_command_ui.rb │ │ │ ├── exec.rb │ │ │ ├── generated_version.rb │ │ │ ├── installers/ │ │ │ │ ├── bare_installer.rb │ │ │ │ ├── base.rb │ │ │ │ ├── manifest.rb │ │ │ │ ├── manifest_installer.rb │ │ │ │ └── template_context.rb │ │ │ ├── installers.rb │ │ │ ├── logger.rb │ │ │ ├── quick_cache.rb │ │ │ ├── rails.rb │ │ │ ├── sass_compiler.rb │ │ │ ├── sass_extensions/ │ │ │ │ ├── functions/ │ │ │ │ │ └── sprites.rb │ │ │ │ ├── functions.rb │ │ │ │ ├── sprites/ │ │ │ │ │ ├── engines/ │ │ │ │ │ │ └── chunky_png_engine.rb │ │ │ │ │ ├── engines.rb │ │ │ │ │ ├── image.rb │ │ │ │ │ ├── image_methods.rb │ │ │ │ │ ├── image_row.rb │ │ │ │ │ ├── images.rb │ │ │ │ │ ├── layout/ │ │ │ │ │ │ ├── diagonal.rb │ │ │ │ │ │ ├── horizontal.rb │ │ │ │ │ │ ├── smart.rb │ │ │ │ │ │ └── vertical.rb │ │ │ │ │ ├── layout.rb │ │ │ │ │ ├── layout_methods.rb │ │ │ │ │ ├── row_fitter.rb │ │ │ │ │ ├── sprite_map.rb │ │ │ │ │ └── sprite_methods.rb │ │ │ │ └── sprites.rb │ │ │ ├── sass_extensions.rb │ │ │ ├── sprite_importer/ │ │ │ │ ├── binding.rb │ │ │ │ └── content.erb │ │ │ ├── sprite_importer.rb │ │ │ ├── stats.rb │ │ │ ├── test_case.rb │ │ │ ├── validator.rb │ │ │ └── version.rb │ │ └── compass.rb │ └── test/ │ ├── fixtures/ │ │ ├── extensions/ │ │ │ └── only_stylesheets/ │ │ │ ├── compass_init.rb │ │ │ └── scss/ │ │ │ └── only_stylesheets/ │ │ │ └── foo.scss │ │ ├── fonts/ │ │ │ └── bgrove.base64.txt │ │ └── stylesheets/ │ │ ├── busted_font_urls/ │ │ │ ├── config.rb │ │ │ ├── css/ │ │ │ │ └── screen.css │ │ │ └── sass/ │ │ │ └── screen.sass │ │ ├── busted_image_urls/ │ │ │ ├── config.rb │ │ │ ├── css/ │ │ │ │ └── screen.css │ │ │ └── sass/ │ │ │ └── screen.sass │ │ ├── compass/ │ │ │ ├── config.rb │ │ │ ├── css/ │ │ │ │ ├── animation-with-legacy-ie.css │ │ │ │ ├── animation.css │ │ │ │ ├── appearance.css │ │ │ │ ├── background-clip.css │ │ │ │ ├── background-origin.css │ │ │ │ ├── background-size.css │ │ │ │ ├── border_radius.css │ │ │ │ ├── box-sizing.css │ │ │ │ ├── box.css │ │ │ │ ├── box_shadow.css │ │ │ │ ├── brightness.css │ │ │ │ ├── browser-support.css │ │ │ │ ├── color.css │ │ │ │ ├── columns.css │ │ │ │ ├── filters.css │ │ │ │ ├── flexbox.css │ │ │ │ ├── fonts.css │ │ │ │ ├── force-wrap.css │ │ │ │ ├── gradients.css │ │ │ │ ├── grid_background.css │ │ │ │ ├── hyphenation.css │ │ │ │ ├── image_size.css │ │ │ │ ├── images.css │ │ │ │ ├── layout.css │ │ │ │ ├── legacy_clearfix.css │ │ │ │ ├── lists.css │ │ │ │ ├── opacity.css │ │ │ │ ├── print.css │ │ │ │ ├── regions.css │ │ │ │ ├── replacement.css │ │ │ │ ├── reset.css │ │ │ │ ├── selection.css │ │ │ │ ├── sprites_with_explicit_separator.css │ │ │ │ ├── stretching.css │ │ │ │ ├── support.css │ │ │ │ ├── text_shadow.css │ │ │ │ ├── transform.css │ │ │ │ ├── transition.css │ │ │ │ ├── typography/ │ │ │ │ │ └── links/ │ │ │ │ │ └── hover-link.css │ │ │ │ ├── units.css │ │ │ │ ├── user-interface.css │ │ │ │ ├── utilities.css │ │ │ │ ├── vertical_rhythm.css │ │ │ │ ├── vertical_rhythm_with_ems.css │ │ │ │ ├── vertical_rhythm_with_px.css │ │ │ │ └── vertical_rhythm_with_rems.css │ │ │ └── sass/ │ │ │ ├── animation-with-legacy-ie.scss │ │ │ ├── animation.scss │ │ │ ├── appearance.scss │ │ │ ├── background-clip.scss │ │ │ ├── background-origin.scss │ │ │ ├── background-size.scss │ │ │ ├── border_radius.scss │ │ │ ├── box-sizing.scss │ │ │ ├── box.sass │ │ │ ├── box_shadow.scss │ │ │ ├── brightness.scss │ │ │ ├── browser-support.scss │ │ │ ├── color.scss │ │ │ ├── columns.scss │ │ │ ├── filters.scss │ │ │ ├── flexbox.scss │ │ │ ├── fonts.sass │ │ │ ├── force-wrap.scss │ │ │ ├── gradients.sass │ │ │ ├── grid_background.scss │ │ │ ├── hyphenation.scss │ │ │ ├── image_size.sass │ │ │ ├── images.scss │ │ │ ├── layout.sass │ │ │ ├── legacy_clearfix.scss │ │ │ ├── lists.scss │ │ │ ├── opacity.scss │ │ │ ├── print.sass │ │ │ ├── regions.scss │ │ │ ├── replacement.scss │ │ │ ├── reset.sass │ │ │ ├── selection.scss │ │ │ ├── sprites_with_explicit_separator.scss │ │ │ ├── stretching.sass │ │ │ ├── support.scss │ │ │ ├── text_shadow.scss │ │ │ ├── transform.scss │ │ │ ├── transition.scss │ │ │ ├── typography/ │ │ │ │ └── links/ │ │ │ │ └── hover-link.scss │ │ │ ├── units.scss │ │ │ ├── user-interface.scss │ │ │ ├── utilities.scss │ │ │ ├── vertical_rhythm.scss │ │ │ ├── vertical_rhythm_with_ems.scss │ │ │ ├── vertical_rhythm_with_px.scss │ │ │ └── vertical_rhythm_with_rems.scss │ │ ├── envtest/ │ │ │ ├── config.rb │ │ │ ├── css/ │ │ │ │ └── env.css │ │ │ └── sass/ │ │ │ └── env.scss │ │ ├── error/ │ │ │ ├── config.rb │ │ │ └── sass/ │ │ │ └── screen.sass │ │ ├── image_urls/ │ │ │ ├── config.rb │ │ │ ├── css/ │ │ │ │ └── screen.css │ │ │ └── sass/ │ │ │ └── screen.sass │ │ ├── relative/ │ │ │ ├── config.rb │ │ │ ├── css/ │ │ │ │ ├── ie.css │ │ │ │ ├── print.css │ │ │ │ └── screen.css │ │ │ └── sass/ │ │ │ ├── ie.sass │ │ │ ├── print.sass │ │ │ └── screen.sass │ │ ├── sourcemaps/ │ │ │ ├── config.rb │ │ │ ├── css/ │ │ │ │ ├── another_simple.css │ │ │ │ ├── simple.css │ │ │ │ └── with_libraries.css │ │ │ └── sass/ │ │ │ ├── another_simple.scss │ │ │ ├── simple.sass │ │ │ └── with_libraries.scss │ │ ├── uses_only_stylesheets_ext/ │ │ │ ├── config.rb │ │ │ ├── sass/ │ │ │ │ ├── ie.scss │ │ │ │ ├── print.scss │ │ │ │ └── screen.scss │ │ │ └── stylesheets/ │ │ │ ├── ie.css │ │ │ ├── print.css │ │ │ └── screen.css │ │ ├── valid/ │ │ │ ├── config.rb │ │ │ └── sass/ │ │ │ ├── another_simple.scss │ │ │ └── simple.sass │ │ └── with_sass_globbing/ │ │ ├── config.rb │ │ ├── css/ │ │ │ └── screen.css │ │ └── sass/ │ │ ├── partials/ │ │ │ ├── _1.scss │ │ │ ├── _2.scss │ │ │ └── _3.scss │ │ └── screen.scss │ ├── helpers/ │ │ ├── command_line.rb │ │ ├── diff.rb │ │ ├── io.rb │ │ ├── rails.rb │ │ └── test_case.rb │ ├── integrations/ │ │ ├── compass_test.rb │ │ └── sprites_test.rb │ ├── test_helper.rb │ └── units/ │ ├── actions_test.rb │ ├── caniuse_test.rb │ ├── command_line_test.rb │ ├── compass_util_test.rb │ ├── compiler_test.rb │ ├── configuration_test.rb │ ├── regressions_test.rb │ ├── sass_extensions_test.rb │ ├── sass_extenstions/ │ │ └── gradients_test.rb │ └── sprites/ │ ├── engine_test.rb │ ├── image_row_test.rb │ ├── image_test.rb │ ├── images_test.rb │ ├── importer_test.rb │ ├── layout_test.rb │ ├── row_fitter_test.rb │ ├── sprite_command_test.rb │ └── sprite_map_test.rb ├── compass-style.org/ │ ├── .compass/ │ │ └── config.rb │ ├── .gitignore │ ├── .livereload │ ├── Gemfile │ ├── Procfile │ ├── README.markdown │ ├── Rakefile │ ├── Rules │ ├── assets/ │ │ ├── fonts/ │ │ │ └── examples/ │ │ │ └── bgrove.otf │ │ ├── htaccess │ │ └── javascripts/ │ │ ├── fixups.js │ │ ├── install.js │ │ ├── jquery.cookie.js │ │ ├── jquery.url.packed.js │ │ ├── placeholder.js │ │ ├── shAutoloader.js │ │ ├── shBrushCss.js │ │ ├── shBrushPlain.js │ │ ├── shBrushSass.js │ │ ├── shBrushScss.js │ │ ├── shBrushXml.js │ │ ├── shCore.js │ │ └── site.js │ ├── authors.yml │ ├── config.yaml │ ├── content/ │ │ ├── .livereload │ │ ├── CHANGELOG.markdown │ │ ├── blog/ │ │ │ ├── archive.haml │ │ │ └── atom.haml │ │ ├── blog.haml │ │ ├── copyright.markdown │ │ ├── examples/ │ │ │ ├── blueprint/ │ │ │ │ └── grid/ │ │ │ │ ├── pull/ │ │ │ │ │ └── stylesheet.scss │ │ │ │ └── two_cols/ │ │ │ │ └── stylesheet.scss │ │ │ ├── compass/ │ │ │ │ ├── css3/ │ │ │ │ │ ├── background-clip/ │ │ │ │ │ │ ├── markup.haml │ │ │ │ │ │ └── stylesheet.scss │ │ │ │ │ ├── background-clip.haml │ │ │ │ │ ├── background-origin/ │ │ │ │ │ │ ├── markup.haml │ │ │ │ │ │ └── stylesheet.scss │ │ │ │ │ ├── background-origin.haml │ │ │ │ │ ├── background-size/ │ │ │ │ │ │ ├── markup.haml │ │ │ │ │ │ └── stylesheet.scss │ │ │ │ │ ├── background-size.haml │ │ │ │ │ ├── border_radius/ │ │ │ │ │ │ ├── markup.haml │ │ │ │ │ │ └── stylesheet.scss │ │ │ │ │ ├── border_radius.haml │ │ │ │ │ ├── box_shadow/ │ │ │ │ │ │ ├── markup.haml │ │ │ │ │ │ └── stylesheet.scss │ │ │ │ │ ├── box_shadow.haml │ │ │ │ │ ├── box_sizing/ │ │ │ │ │ │ ├── markup.haml │ │ │ │ │ │ └── stylesheet.scss │ │ │ │ │ ├── box_sizing.haml │ │ │ │ │ ├── columns/ │ │ │ │ │ │ ├── markup.haml │ │ │ │ │ │ └── stylesheet.scss │ │ │ │ │ ├── columns.haml │ │ │ │ │ ├── flexbox/ │ │ │ │ │ │ ├── markup.haml │ │ │ │ │ │ └── stylesheet.scss │ │ │ │ │ ├── flexbox.haml │ │ │ │ │ ├── font-face/ │ │ │ │ │ │ ├── markup.haml │ │ │ │ │ │ └── stylesheet.scss │ │ │ │ │ ├── font-face.haml │ │ │ │ │ ├── gradient/ │ │ │ │ │ │ ├── markup.haml │ │ │ │ │ │ └── stylesheet.scss │ │ │ │ │ ├── gradient.haml │ │ │ │ │ ├── inline_block/ │ │ │ │ │ │ ├── markup.haml │ │ │ │ │ │ └── stylesheet.scss │ │ │ │ │ ├── inline_block.haml │ │ │ │ │ ├── input-placeholder/ │ │ │ │ │ │ ├── markup.haml │ │ │ │ │ │ └── stylesheet.scss │ │ │ │ │ ├── input-placeholder.haml │ │ │ │ │ ├── opacity/ │ │ │ │ │ │ ├── markup.haml │ │ │ │ │ │ └── stylesheet.scss │ │ │ │ │ ├── opacity.haml │ │ │ │ │ ├── regions/ │ │ │ │ │ │ ├── markup.haml │ │ │ │ │ │ └── stylesheet.scss │ │ │ │ │ ├── regions.haml │ │ │ │ │ ├── text_shadow/ │ │ │ │ │ │ ├── markup.haml │ │ │ │ │ │ └── stylesheet.scss │ │ │ │ │ ├── text_shadow.haml │ │ │ │ │ ├── transition/ │ │ │ │ │ │ ├── markup.haml │ │ │ │ │ │ └── stylesheet.scss │ │ │ │ │ └── transition.haml │ │ │ │ ├── helpers/ │ │ │ │ │ ├── elements-of-type/ │ │ │ │ │ │ ├── markup.haml │ │ │ │ │ │ └── stylesheet.scss │ │ │ │ │ ├── elements-of-type.haml │ │ │ │ │ ├── enumerate/ │ │ │ │ │ │ ├── markup.haml │ │ │ │ │ │ └── stylesheet.scss │ │ │ │ │ ├── enumerate.haml │ │ │ │ │ ├── using-extend-in-place-of-enumerate/ │ │ │ │ │ │ ├── markup.haml │ │ │ │ │ │ └── stylesheet.scss │ │ │ │ │ └── using-extend-in-place-of-enumerate.haml │ │ │ │ ├── layout/ │ │ │ │ │ ├── sticky-footer/ │ │ │ │ │ │ ├── markup.haml │ │ │ │ │ │ └── stylesheet.scss │ │ │ │ │ ├── sticky-footer.haml │ │ │ │ │ ├── stretching/ │ │ │ │ │ │ ├── markup.haml │ │ │ │ │ │ └── stylesheet.scss │ │ │ │ │ └── stretching.haml │ │ │ │ ├── tables/ │ │ │ │ │ ├── all/ │ │ │ │ │ │ ├── markup.haml │ │ │ │ │ │ └── stylesheet.scss │ │ │ │ │ ├── all.haml │ │ │ │ │ ├── borders/ │ │ │ │ │ │ ├── markup.haml │ │ │ │ │ │ └── stylesheet.scss │ │ │ │ │ ├── borders.haml │ │ │ │ │ ├── scaffolding/ │ │ │ │ │ │ ├── markup.haml │ │ │ │ │ │ └── stylesheet.scss │ │ │ │ │ ├── scaffolding.haml │ │ │ │ │ ├── striping/ │ │ │ │ │ │ ├── markup.haml │ │ │ │ │ │ └── stylesheet.scss │ │ │ │ │ └── striping.haml │ │ │ │ └── utilities/ │ │ │ │ ├── contrast/ │ │ │ │ │ ├── markup.haml │ │ │ │ │ └── stylesheet.scss │ │ │ │ └── contrast.haml │ │ │ └── index.haml │ │ ├── frameworks.haml │ │ ├── get-involved/ │ │ │ └── index.haml │ │ ├── help/ │ │ │ ├── documentation/ │ │ │ │ ├── command-line.markdown │ │ │ │ ├── configuration-reference.markdown │ │ │ │ ├── sass-based-configuration-options.markdown │ │ │ │ └── tuning-vendor-prefixes.markdown │ │ │ ├── documentation.haml │ │ │ ├── index.haml │ │ │ ├── tutorials/ │ │ │ │ ├── best_practices.markdown │ │ │ │ ├── configurable-variables.haml │ │ │ │ ├── contributing.markdown │ │ │ │ ├── extending.markdown │ │ │ │ ├── extensions.markdown │ │ │ │ ├── integration.markdown │ │ │ │ ├── production-css.markdown │ │ │ │ ├── spriting/ │ │ │ │ │ ├── customization-options.markdown │ │ │ │ │ ├── magic-selectors.markdown │ │ │ │ │ └── sprite-layouts.markdown │ │ │ │ ├── spriting.markdown │ │ │ │ ├── testing.markdown │ │ │ │ ├── upgrading/ │ │ │ │ │ ├── antares.markdown │ │ │ │ │ ├── im-scared.markdown │ │ │ │ │ └── lemonade_upgrade_guide.markdown │ │ │ │ └── upgrading.markdown │ │ │ └── tutorials.haml │ │ ├── index/ │ │ │ ├── functions.haml │ │ │ ├── mixins.haml │ │ │ └── variables.haml │ │ ├── index.haml │ │ ├── install.haml │ │ ├── posts/ │ │ │ ├── 2011-04-24-v011-release.markdown │ │ │ ├── 2011-04-26-compass-release-strategy.markdown │ │ │ ├── 2011-05-09-compass-django.markdown │ │ │ ├── 2012-01-29-compass-and-rails-integration.markdown │ │ │ ├── 2012-02-01-compass-0-12-is-released.markdown │ │ │ ├── 2012-05-20-removing-blueprint.markdown │ │ │ ├── 2013-11-27-compass-versioning-change.markdown │ │ │ └── 2014-08-15-omg-compass-1-0.markdown │ │ ├── reference/ │ │ │ ├── compass/ │ │ │ │ ├── css3/ │ │ │ │ │ ├── animation.haml │ │ │ │ │ ├── appearance.haml │ │ │ │ │ ├── background_clip.haml │ │ │ │ │ ├── background_origin.haml │ │ │ │ │ ├── background_size.haml │ │ │ │ │ ├── border_radius.haml │ │ │ │ │ ├── box.haml │ │ │ │ │ ├── box_shadow.haml │ │ │ │ │ ├── box_sizing.haml │ │ │ │ │ ├── columns.haml │ │ │ │ │ ├── filter.haml │ │ │ │ │ ├── flexbox.haml │ │ │ │ │ ├── font_face.haml │ │ │ │ │ ├── hyphenation.haml │ │ │ │ │ ├── images.haml │ │ │ │ │ ├── inline_block.haml │ │ │ │ │ ├── opacity.haml │ │ │ │ │ ├── pie.haml │ │ │ │ │ ├── regions.haml │ │ │ │ │ ├── selection.haml │ │ │ │ │ ├── shared.haml │ │ │ │ │ ├── text-shadow.haml │ │ │ │ │ ├── transform.haml │ │ │ │ │ ├── transition.haml │ │ │ │ │ └── user_interface.haml │ │ │ │ ├── css3.haml │ │ │ │ ├── helpers/ │ │ │ │ │ ├── color-stops.haml │ │ │ │ │ ├── colors.haml │ │ │ │ │ ├── constants.haml │ │ │ │ │ ├── cross-browser.haml │ │ │ │ │ ├── display.haml │ │ │ │ │ ├── env.haml │ │ │ │ │ ├── font-files.haml │ │ │ │ │ ├── image-dimensions.haml │ │ │ │ │ ├── inline-data.haml │ │ │ │ │ ├── math.haml │ │ │ │ │ ├── selectors.haml │ │ │ │ │ ├── sprites.haml │ │ │ │ │ └── urls.haml │ │ │ │ ├── helpers.haml │ │ │ │ ├── layout/ │ │ │ │ │ ├── grid_background.haml │ │ │ │ │ ├── sticky_footer.haml │ │ │ │ │ └── stretching.haml │ │ │ │ ├── layout.haml │ │ │ │ ├── reset/ │ │ │ │ │ └── utilities.haml │ │ │ │ ├── reset-legacy/ │ │ │ │ │ └── utilities-legacy.haml │ │ │ │ ├── reset-legacy.haml │ │ │ │ ├── reset.haml │ │ │ │ ├── support.haml │ │ │ │ ├── typography/ │ │ │ │ │ ├── links/ │ │ │ │ │ │ ├── hover_link.haml │ │ │ │ │ │ ├── link_colors.haml │ │ │ │ │ │ └── unstyled_link.haml │ │ │ │ │ ├── links.haml │ │ │ │ │ ├── lists/ │ │ │ │ │ │ ├── bullets.haml │ │ │ │ │ │ ├── horizontal_list.haml │ │ │ │ │ │ ├── inline-block-list.haml │ │ │ │ │ │ └── inline_list.haml │ │ │ │ │ ├── lists.haml │ │ │ │ │ ├── text/ │ │ │ │ │ │ ├── ellipsis.haml │ │ │ │ │ │ ├── force-wrap.haml │ │ │ │ │ │ ├── nowrap.haml │ │ │ │ │ │ └── replacement.haml │ │ │ │ │ ├── text.haml │ │ │ │ │ └── vertical_rhythm.haml │ │ │ │ ├── typography.haml │ │ │ │ ├── utilities/ │ │ │ │ │ ├── color/ │ │ │ │ │ │ ├── brightness.haml │ │ │ │ │ │ └── contrast.haml │ │ │ │ │ ├── color.haml │ │ │ │ │ ├── general/ │ │ │ │ │ │ ├── clearfix.haml │ │ │ │ │ │ ├── float.haml │ │ │ │ │ │ ├── hacks.haml │ │ │ │ │ │ ├── min.haml │ │ │ │ │ │ ├── reset.haml │ │ │ │ │ │ └── tag_cloud.haml │ │ │ │ │ ├── general.haml │ │ │ │ │ ├── print.haml │ │ │ │ │ ├── sprites/ │ │ │ │ │ │ ├── base.haml │ │ │ │ │ │ └── sprite_img.haml │ │ │ │ │ ├── sprites.haml │ │ │ │ │ ├── tables/ │ │ │ │ │ │ ├── alternating_rows_and_columns.haml │ │ │ │ │ │ ├── borders.haml │ │ │ │ │ │ └── scaffolding.haml │ │ │ │ │ └── tables.haml │ │ │ │ └── utilities.haml │ │ │ └── compass.haml │ │ ├── reference.haml │ │ ├── screencast.haml │ │ ├── search-data.js.erb │ │ ├── search.haml │ │ ├── sitemap.xml │ │ └── stylesheets/ │ │ ├── core/ │ │ │ ├── _base-classes.sass │ │ │ ├── _clearing-classes.sass │ │ │ ├── _extensions.scss │ │ │ └── _media-block.scss │ │ ├── home.scss │ │ ├── ie.scss │ │ ├── partials/ │ │ │ ├── _ads.scss │ │ │ ├── _blog.scss │ │ │ ├── _code.scss │ │ │ ├── _example.scss │ │ │ ├── _home.scss │ │ │ ├── _install.scss │ │ │ ├── _layout.scss │ │ │ ├── _main.scss │ │ │ ├── _nav.scss │ │ │ ├── _sidebar.scss │ │ │ ├── _theme.scss │ │ │ └── _typography.scss │ │ ├── screen.scss │ │ └── syntax/ │ │ ├── _shCore.scss │ │ ├── _shThemeRDark.scss │ │ ├── _syntax-theme.scss │ │ └── _theme_template.scss │ ├── layouts/ │ │ ├── article.haml │ │ ├── basic.haml │ │ ├── blog.haml │ │ ├── core.haml │ │ ├── default.haml │ │ ├── documentation.haml │ │ ├── example.haml │ │ ├── homepage.haml │ │ ├── main.haml │ │ ├── partials/ │ │ │ ├── ad.haml │ │ │ ├── analytics.haml │ │ │ ├── breadcrumbs.haml │ │ │ ├── example.haml │ │ │ ├── footer.haml │ │ │ ├── js-core.haml │ │ │ ├── js-highlighter.haml │ │ │ ├── main-navigation.haml │ │ │ ├── reference/ │ │ │ │ ├── const_table.haml │ │ │ │ ├── constants.haml │ │ │ │ ├── examples.haml │ │ │ │ ├── functions.haml │ │ │ │ ├── import-few.haml │ │ │ │ ├── import.haml │ │ │ │ ├── imports.haml │ │ │ │ ├── mixins.haml │ │ │ │ └── selectors.haml │ │ │ ├── sidebar/ │ │ │ │ ├── container.haml │ │ │ │ ├── heading.haml │ │ │ │ └── item.haml │ │ │ └── sidebar.haml │ │ ├── post.haml │ │ ├── redirect.haml │ │ ├── reference.haml │ │ ├── simple_core.haml │ │ ├── site.haml │ │ └── tutorial.haml │ ├── lib/ │ │ ├── blog.rb │ │ ├── data_sources/ │ │ │ ├── asset_data_source.rb │ │ │ ├── better_combined_datasource.rb │ │ │ ├── core_extensions.rb │ │ │ ├── nanoc_monkey_patches.rb │ │ │ └── syntax_highter.rb │ │ ├── default.rb │ │ ├── examples.rb │ │ ├── search.rb │ │ ├── stylesheets/ │ │ │ └── sass_extensions.rb │ │ └── stylesheets.rb │ └── tasks/ │ └── generators.thor ├── core/ │ ├── .gitignore │ ├── Gemfile │ ├── LICENSE.txt │ ├── README.md │ ├── Rakefile │ ├── VERSION │ ├── compass-core.gemspec │ ├── data/ │ │ ├── caniuse.json │ │ └── caniuse_extras/ │ │ └── css-placeholder.json │ ├── lib/ │ │ ├── compass/ │ │ │ ├── browser_support.rb │ │ │ ├── configuration/ │ │ │ │ ├── adapters.rb │ │ │ │ ├── data.rb │ │ │ │ ├── defaults.rb │ │ │ │ ├── inheritance.rb │ │ │ │ ├── paths.rb │ │ │ │ └── watch.rb │ │ │ ├── configuration.rb │ │ │ ├── core/ │ │ │ │ ├── caniuse.rb │ │ │ │ ├── generated_version.rb │ │ │ │ ├── sass_extensions/ │ │ │ │ │ ├── functions/ │ │ │ │ │ │ ├── colors.rb │ │ │ │ │ │ ├── configuration.rb │ │ │ │ │ │ ├── constants.rb │ │ │ │ │ │ ├── cross_browser_support.rb │ │ │ │ │ │ ├── display.rb │ │ │ │ │ │ ├── enumerate.rb │ │ │ │ │ │ ├── env.rb │ │ │ │ │ │ ├── files.rb │ │ │ │ │ │ ├── font_files.rb │ │ │ │ │ │ ├── gradient_support.rb │ │ │ │ │ │ ├── image_size.rb │ │ │ │ │ │ ├── inline_image.rb │ │ │ │ │ │ ├── lists.rb │ │ │ │ │ │ ├── math.rb │ │ │ │ │ │ ├── selectors.rb │ │ │ │ │ │ └── urls.rb │ │ │ │ │ ├── functions.rb │ │ │ │ │ ├── monkey_patches/ │ │ │ │ │ │ ├── browser_support.rb │ │ │ │ │ │ └── traversal.rb │ │ │ │ │ └── monkey_patches.rb │ │ │ │ ├── sass_extensions.rb │ │ │ │ └── version.rb │ │ │ ├── core.rb │ │ │ ├── error.rb │ │ │ ├── frameworks.rb │ │ │ └── util.rb │ │ └── compass-core.rb │ ├── stylesheets/ │ │ ├── _compass.scss │ │ ├── _lemonade.scss │ │ └── compass/ │ │ ├── _configuration.scss │ │ ├── _css3.scss │ │ ├── _layout.scss │ │ ├── _reset-legacy.scss │ │ ├── _reset.scss │ │ ├── _support.scss │ │ ├── _typography.scss │ │ ├── _utilities.scss │ │ ├── css3/ │ │ │ ├── _animation.scss │ │ │ ├── _appearance.scss │ │ │ ├── _background-clip.scss │ │ │ ├── _background-origin.scss │ │ │ ├── _background-size.scss │ │ │ ├── _border-radius.scss │ │ │ ├── _box-shadow.scss │ │ │ ├── _box-sizing.scss │ │ │ ├── _box.scss │ │ │ ├── _columns.scss │ │ │ ├── _deprecated-support.scss │ │ │ ├── _filter.scss │ │ │ ├── _flexbox.scss │ │ │ ├── _font-face.scss │ │ │ ├── _hyphenation.scss │ │ │ ├── _images.scss │ │ │ ├── _inline-block.scss │ │ │ ├── _opacity.scss │ │ │ ├── _pie.scss │ │ │ ├── _regions.scss │ │ │ ├── _selection.scss │ │ │ ├── _shared.scss │ │ │ ├── _text-shadow.scss │ │ │ ├── _transform.scss │ │ │ ├── _transition.scss │ │ │ └── _user-interface.scss │ │ ├── layout/ │ │ │ ├── _grid-background.scss │ │ │ ├── _sticky-footer.scss │ │ │ └── _stretching.scss │ │ ├── reset/ │ │ │ ├── _utilities-legacy.scss │ │ │ └── _utilities.scss │ │ ├── typography/ │ │ │ ├── _links.scss │ │ │ ├── _lists.scss │ │ │ ├── _text.scss │ │ │ ├── _units.scss │ │ │ ├── _vertical_rhythm.scss │ │ │ ├── links/ │ │ │ │ ├── _hover-link.scss │ │ │ │ ├── _link-colors.scss │ │ │ │ └── _unstyled-link.scss │ │ │ ├── lists/ │ │ │ │ ├── _bullets.scss │ │ │ │ ├── _horizontal-list.scss │ │ │ │ ├── _inline-block-list.scss │ │ │ │ └── _inline-list.scss │ │ │ └── text/ │ │ │ ├── _ellipsis.scss │ │ │ ├── _force-wrap.scss │ │ │ ├── _nowrap.scss │ │ │ └── _replacement.scss │ │ └── utilities/ │ │ ├── _color.scss │ │ ├── _general.scss │ │ ├── _links.scss │ │ ├── _lists.scss │ │ ├── _print.scss │ │ ├── _sass.scss │ │ ├── _sprites.scss │ │ ├── _tables.scss │ │ ├── _text.scss │ │ ├── color/ │ │ │ ├── _brightness.scss │ │ │ └── _contrast.scss │ │ ├── general/ │ │ │ ├── _clearfix.scss │ │ │ ├── _float.scss │ │ │ ├── _hacks.scss │ │ │ ├── _min.scss │ │ │ ├── _reset.scss │ │ │ ├── _tabs.scss │ │ │ └── _tag-cloud.scss │ │ ├── links/ │ │ │ ├── _hover-link.scss │ │ │ ├── _link-colors.scss │ │ │ └── _unstyled-link.scss │ │ ├── lists/ │ │ │ ├── _bullets.scss │ │ │ ├── _horizontal-list.scss │ │ │ ├── _inline-block-list.scss │ │ │ └── _inline-list.scss │ │ ├── sass/ │ │ │ ├── _lists.scss │ │ │ └── _maps.scss │ │ ├── sprites/ │ │ │ ├── _base.scss │ │ │ └── _sprite-img.scss │ │ ├── tables/ │ │ │ ├── _alternating-rows-and-columns.scss │ │ │ ├── _borders.scss │ │ │ └── _scaffolding.scss │ │ └── text/ │ │ ├── _ellipsis.scss │ │ ├── _nowrap.scss │ │ └── _replacement.scss │ ├── templates/ │ │ ├── ellipsis/ │ │ │ ├── ellipsis.sass │ │ │ ├── manifest.rb │ │ │ └── xml/ │ │ │ └── ellipsis.xml │ │ ├── extension/ │ │ │ ├── manifest.rb │ │ │ ├── stylesheets/ │ │ │ │ └── main.sass │ │ │ └── templates/ │ │ │ └── project/ │ │ │ ├── manifest.rb │ │ │ └── screen.sass │ │ └── project/ │ │ ├── USAGE.markdown │ │ ├── ie.sass │ │ ├── manifest.rb │ │ ├── print.sass │ │ └── screen.sass │ └── test/ │ ├── helpers/ │ │ └── diff.rb │ ├── integrations/ │ │ ├── projects/ │ │ │ ├── .gitignore │ │ │ ├── busted_font_urls/ │ │ │ │ ├── css/ │ │ │ │ │ └── screen.css │ │ │ │ └── sass/ │ │ │ │ ├── _project-setup.scss │ │ │ │ └── screen.sass │ │ │ ├── busted_image_urls/ │ │ │ │ ├── css/ │ │ │ │ │ └── screen.css │ │ │ │ └── sass/ │ │ │ │ ├── _project-setup.scss │ │ │ │ └── screen.sass │ │ │ ├── compass/ │ │ │ │ ├── css/ │ │ │ │ │ ├── animation-with-legacy-ie.css │ │ │ │ │ ├── animation.css │ │ │ │ │ ├── appearance.css │ │ │ │ │ ├── background-clip.css │ │ │ │ │ ├── background-origin.css │ │ │ │ │ ├── background-size.css │ │ │ │ │ ├── border_radius.css │ │ │ │ │ ├── box-sizing.css │ │ │ │ │ ├── box.css │ │ │ │ │ ├── box_shadow.css │ │ │ │ │ ├── brightness.css │ │ │ │ │ ├── browser-support.css │ │ │ │ │ ├── color.css │ │ │ │ │ ├── columns.css │ │ │ │ │ ├── env.css │ │ │ │ │ ├── filters.css │ │ │ │ │ ├── flexbox.css │ │ │ │ │ ├── fonts.css │ │ │ │ │ ├── force-wrap.css │ │ │ │ │ ├── gradients.css │ │ │ │ │ ├── grid_background.css │ │ │ │ │ ├── hyphenation.css │ │ │ │ │ ├── image_size.css │ │ │ │ │ ├── images.css │ │ │ │ │ ├── issue-1853.css │ │ │ │ │ ├── layout.css │ │ │ │ │ ├── legacy_clearfix.css │ │ │ │ │ ├── lists.css │ │ │ │ │ ├── opacity.css │ │ │ │ │ ├── print.css │ │ │ │ │ ├── regions.css │ │ │ │ │ ├── replacement.css │ │ │ │ │ ├── reset.css │ │ │ │ │ ├── selection.css │ │ │ │ │ ├── selection.css.3.3 │ │ │ │ │ ├── stretching.css │ │ │ │ │ ├── support.css │ │ │ │ │ ├── table.css │ │ │ │ │ ├── text_shadow.css │ │ │ │ │ ├── transform.css │ │ │ │ │ ├── transition.css │ │ │ │ │ ├── typography/ │ │ │ │ │ │ └── links/ │ │ │ │ │ │ └── hover-link.css │ │ │ │ │ ├── units.css │ │ │ │ │ ├── user-interface.css │ │ │ │ │ ├── utilities.css │ │ │ │ │ ├── utilities.css.3.3 │ │ │ │ │ └── vertical_rhythm.css │ │ │ │ └── sass/ │ │ │ │ ├── _project-setup.scss │ │ │ │ ├── animation-with-legacy-ie.scss │ │ │ │ ├── animation.scss │ │ │ │ ├── appearance.scss │ │ │ │ ├── background-clip.scss │ │ │ │ ├── background-origin.scss │ │ │ │ ├── background-size.scss │ │ │ │ ├── border_radius.scss │ │ │ │ ├── box-sizing.scss │ │ │ │ ├── box.sass │ │ │ │ ├── box_shadow.scss │ │ │ │ ├── brightness.scss │ │ │ │ ├── browser-support.scss │ │ │ │ ├── color.scss │ │ │ │ ├── columns.scss │ │ │ │ ├── env.scss │ │ │ │ ├── filters.scss │ │ │ │ ├── flexbox.scss │ │ │ │ ├── fonts.sass │ │ │ │ ├── force-wrap.scss │ │ │ │ ├── gradients.sass │ │ │ │ ├── grid_background.scss │ │ │ │ ├── hyphenation.scss │ │ │ │ ├── image_size.sass │ │ │ │ ├── images.scss │ │ │ │ ├── issue-1853.scss │ │ │ │ ├── layout.sass │ │ │ │ ├── legacy_clearfix.scss │ │ │ │ ├── lists.scss │ │ │ │ ├── opacity.scss │ │ │ │ ├── print.sass │ │ │ │ ├── regions.scss │ │ │ │ ├── replacement.scss │ │ │ │ ├── reset.sass │ │ │ │ ├── selection.scss │ │ │ │ ├── stretching.sass │ │ │ │ ├── support.scss │ │ │ │ ├── table.scss │ │ │ │ ├── text_shadow.scss │ │ │ │ ├── transform.scss │ │ │ │ ├── transition.scss │ │ │ │ ├── typography/ │ │ │ │ │ └── links/ │ │ │ │ │ └── hover-link.scss │ │ │ │ ├── units.scss │ │ │ │ ├── user-interface.scss │ │ │ │ ├── utilities.scss │ │ │ │ └── vertical_rhythm.scss │ │ │ ├── envtest/ │ │ │ │ ├── css/ │ │ │ │ │ └── env.css │ │ │ │ └── sass/ │ │ │ │ ├── _project-setup.scss │ │ │ │ └── env.scss │ │ │ ├── image_urls/ │ │ │ │ ├── css/ │ │ │ │ │ └── screen.css │ │ │ │ └── sass/ │ │ │ │ ├── _project-setup.scss │ │ │ │ └── screen.sass │ │ │ ├── relative/ │ │ │ │ ├── css/ │ │ │ │ │ ├── ie.css │ │ │ │ │ ├── print.css │ │ │ │ │ └── screen.css │ │ │ │ └── sass/ │ │ │ │ ├── _project-setup.scss │ │ │ │ ├── ie.sass │ │ │ │ ├── print.sass │ │ │ │ └── screen.sass │ │ │ ├── uses_only_stylesheets_ext/ │ │ │ │ ├── css/ │ │ │ │ │ ├── ie.css │ │ │ │ │ ├── print.css │ │ │ │ │ └── screen.css │ │ │ │ └── sass/ │ │ │ │ ├── ie.scss │ │ │ │ ├── print.scss │ │ │ │ └── screen.scss │ │ │ └── valid/ │ │ │ ├── css/ │ │ │ │ └── simple.css │ │ │ └── sass/ │ │ │ └── simple.sass │ │ ├── projects_test.rb │ │ └── test_helper.rb │ └── units/ │ ├── configuration_test.rb │ ├── frameworks_test.rb │ ├── shared_extension_paths_test.rb │ ├── test_helper.rb │ └── urls_test.rb ├── import-once/ │ ├── .gitignore │ ├── Gemfile │ ├── Gemfile_sass_3_2 │ ├── LICENSE.txt │ ├── README.md │ ├── Rakefile │ ├── VERSION │ ├── compass-import-once.gemspec │ ├── lib/ │ │ ├── compass/ │ │ │ ├── import-once/ │ │ │ │ ├── activate.rb │ │ │ │ ├── engine.rb │ │ │ │ ├── importer.rb │ │ │ │ └── version.rb │ │ │ └── import-once.rb │ │ └── compass-import-once.rb │ └── test/ │ ├── diff_as_string.rb │ ├── fixtures/ │ │ ├── _simple_partial.scss │ │ ├── basic.css │ │ ├── basic.scss │ │ ├── force_import.css │ │ ├── force_import.scss │ │ ├── with_globbing.css │ │ └── with_globbing.scss │ ├── import_once_test.rb │ └── test_helper.rb └── test_all.sh ================================================ FILE CONTENTS ================================================ ================================================ FILE: .gitignore ================================================ *.gem ================================================ FILE: .travis.yml ================================================ language: ruby rvm: - 1.8.7 - 1.9.2 - 1.9.3 - jruby-18mode - jruby-19mode - rbx - ree - 2.0.0 - 2.1.0 - 2.2.0 sudo: false env: - CI_TEST=core - CI_TEST=cli gemfile: - core/Gemfile - cli/gemfiles/sass_3_3.gemfile - cli/gemfiles/listen_2.gemfile script: cd $CI_TEST && bundle exec rake matrix: exclude: - gemfile: cli/gemfiles/sass_3_3.gemfile env: CI_TEST=core rvm: 1.8.7 - gemfile: cli/gemfiles/listen_2.gemfile env: CI_TEST=core rvm: 1.8.7 - gemfile: core/Gemfile env: CI_TEST=cli rvm: 1.8.7 - gemfile: cli/gemfiles/sass_3_3.gemfile env: CI_TEST=core rvm: 1.9.2 - gemfile: cli/gemfiles/listen_2.gemfile env: CI_TEST=core rvm: 1.9.2 - gemfile: core/Gemfile env: CI_TEST=cli rvm: 1.9.2 - gemfile: cli/gemfiles/sass_3_3.gemfile env: CI_TEST=core rvm: 1.9.3 - gemfile: cli/gemfiles/listen_2.gemfile env: CI_TEST=core rvm: 1.9.3 - gemfile: core/Gemfile env: CI_TEST=cli rvm: 1.9.3 - gemfile: cli/gemfiles/sass_3_3.gemfile env: CI_TEST=core rvm: jruby-18mode - gemfile: cli/gemfiles/listen_2.gemfile env: CI_TEST=core rvm: jruby-18mode - gemfile: core/Gemfile env: CI_TEST=cli rvm: jruby-18mode - gemfile: cli/gemfiles/sass_3_3.gemfile env: CI_TEST=core rvm: jruby-19mode - gemfile: cli/gemfiles/listen_2.gemfile env: CI_TEST=core rvm: jruby-19mode - gemfile: core/Gemfile env: CI_TEST=cli rvm: jruby-19mode - gemfile: cli/gemfiles/sass_3_3.gemfile env: CI_TEST=core rvm: rbx - gemfile: cli/gemfiles/listen_2.gemfile env: CI_TEST=core rvm: rbx - gemfile: core/Gemfile env: CI_TEST=cli rvm: rbx - gemfile: cli/gemfiles/sass_3_3.gemfile env: CI_TEST=core rvm: ree - gemfile: cli/gemfiles/listen_2.gemfile env: CI_TEST=core rvm: ree - gemfile: core/Gemfile env: CI_TEST=cli rvm: ree - gemfile: cli/gemfiles/sass_3_3.gemfile env: CI_TEST=core rvm: 2.0.0 - gemfile: cli/gemfiles/listen_2.gemfile env: CI_TEST=core rvm: 2.0.0 - gemfile: core/Gemfile env: CI_TEST=cli rvm: 2.0.0 - gemfile: cli/gemfiles/sass_3_3.gemfile env: CI_TEST=core rvm: 2.1.0 - gemfile: cli/gemfiles/listen_2.gemfile env: CI_TEST=core rvm: 2.1.0 - gemfile: core/Gemfile env: CI_TEST=cli rvm: 2.1.0 - gemfile: cli/gemfiles/listen_2.gemfile env: CI_TEST=cli rvm: 1.8.7 - gemfile: cli/gemfiles/listen_2.gemfile env: CI_TEST=cli rvm: 1.9.2 - gemfile: cli/gemfiles/listen_2.gemfile env: CI_TEST=cli rvm: jruby-18mode - gemfile: cli/gemfiles/listen_2.gemfile env: CI_TEST=cli rvm: jruby-19mode - gemfile: cli/gemfiles/listen_2.gemfile env: CI_TEST=cli rvm: ree notifications: irc: {channels: "irc.freenode.org#compass"} campfire: rooms: secure: GXnvuoZ8BVMv+JwJIBb0Ey1ARbfeypmCvpmynykD5taooedTqwyTeT32jw1YTQAOuBewgeWW1H4bF10ySz0GWmu6X2sNx9CVYT1dFudoMvLtnvEmAe0JyyRuSCBFj45jP21eRUAACltxzyX4q/gh+zRIlaRin9YBo/Xv84gDzLw= ================================================ FILE: CONTRIBUTING.md ================================================ Contributing Stylesheets to Compass =================================== **Please make all pull requests against the master branch** Thank you for your interest in contributing to Compass. Our goal is to make it as easy as we can for you to contribute changes to compass -- So if there's something here that seems harder than it ought to be, please let us know. If you find a bug **in this document**, you are bound to contribute a fix. Stop reading now if you do not wish to abide by this rule. **Step 1**: If you do not have a github account, create one. **Step 2**: Fork Compass to your account. Go to the [main repo](http://github.com/chriseppstein/compass) and click the fork button. ![Fork Me](http://img.skitch.com/20101015-n4ssnfyj16e555cnn7wp2pg717.png) Now we're at a decision point. What kind of change do you intend to make? * [Fix a typo (or some other trivial change)](#trivial-changes) * [Documentation Changes](#documentation-changes) * [Fixing Stylesheet Bugs](#stylesheet-bugs) * [New Stylesheet Features](#stylesheet-changes) * [Ruby Changes](#ruby-changes) Here's some general information about the project you might find useful along the way: * [Submitting Patches](#patches) * [Project Structure](#project-structure) * [General Philosophy](#project-philosophy) * [Stylesheet Conventions](#stylesheet-conventions) * [Miscellaneous Stuff](#faq) * [Setting up Git](#setting-up-git) * [Using Compass while Under Development](#running-local-code) * [Running Tests](#running-tests) * [Recovering from a cherry-pick or a rebase](#recovering-from-rebased-or-cherry-picked-changesets)

Making Trivial Changes

Thanks to Github, making small changes is super easy. After forking the project navigate to the file you want to change and click the edit link. ![Edit Me](http://img.skitch.com/20101015-n2x2iaric7wkey2x7u4fa2m1hj.png) Change the file, write a commit message, and click the `Commit` button. ![Commit Me](http://img.skitch.com/20101015-br74tfwtd1ur428mq4ejt12kfc.png) Now you need to get your change [accepted](#patches).

Making Documentation Changes

The compass documentation is stored in two places. First, the `doc-src` directory is where the documentation lives -- however much of the documentation is generated from comments in the Sass files themselves. More information on [changing documentation][documentation]. Once your changes are pushed, please [submit them](#patches).

Fixing Stylesheet Bugs

**Step 3**: If this is a bug you discovered. Please [report it][issues] before working on a fix. This helps us better understand the patch. **Step 4**: Get [the code](#setting-up-git) if you haven't yet done so. **Step 5**: Fix the bug and commit the changes. Please make sure to mention the bug id in your commit message like so: Fixed the display of the fizzlebuzz in IE6. Closes GH-123. **Step 6**: Verify the fix in as many browsers as you can as well as against your own project. How to [use compass while changing it](#running-local-code). **Step 7**: Make sure the tests pass. More info on [running tests](#running-tests) If the tests fail, fix the tests or the stylesheets accordingly. If the tests, don't fail, that means this aspect was not well enough tested. Please [add or augment a test](#writing-tests). You're done. Please [submit your changes](#patches).

Making Stylesheet Changes

It is a good idea to discuss new features ideas with the compass users and developers before building something. Please don't be shy; send an email to the [compass mailing list](http://groups.google.com/group/compass-users). Many feature ideas are good but not obviously a good fit for the compass core library. In these cases, you can and should create a [compass extension][extensions]. Sometimes this is because the concept does not align with the [compass philosophy](#project-philosophy). But sometimes it's just because we think the idea needs time to bake. [Documentation on making extensions.][extensions] **Step 3**: Get [the code](#setting-up-git) if you haven't yet done so. **Step 4**: Add the feature -- contact the mailing list if you have any questions. **Step 5**: Add a test case. More info on [writing tests for compass](#writing-tests). **Step 6**: Documentation - Add or update the reference documentation. Add an example of using the feature. See the [doc readme for details][documentation]. You're done. Please [submit your changes](#patches).

Making Ruby Changes

At this time, if you're a rubyist who's planning on working on the ruby-side of things, it's assumed you know how to read code and use standard ruby tools like rake, gem, bundler, test/unit, cucumber, rspec, etc. If you have any questions, please ask. No changes will be accepted without accompanying tests.

Submitting Patches

If you are submitting features that have more than one changeset, please create a topic branch to hold the changes while they are pending merge and also to track iterations to the original submission. To create a topic branch: $ git checkout -b new_branch_name ... make more commits if needed ... $ git push origin new_branch_name You can now see these changes online at a url like: http://github.com/your_user_name/compass/commits/new_branch_name If you have single-commit patches, it is fine to keep them on master. But do keep in mind that these changesets might be [cherry-picked](#recovering-from-rebased-or-cherry-picked-changesets). Once your changeset(s) are on github, select the appropriate branch containing your changes and send a pull request. Make sure to choose the same upstream branch that you developed against (probably stable or master). Most of the description of your changes should be in the commit messages -- so no need to write a whole lot in the pull request message. However, the pull request message is a good place to provide a rationale or use case for the change if you think one is needed. More info on [pull requests][pulls]. ![Pull Request Example](http://img.skitch.com/20101015-rgfh43yhk7e61fchj9wccne9cq.png) Pull requests are then managed like an issue from the [compass issues page][issues]. A code review will be performed by a compass core team member, and one of three outcomes will result: 1. The change is rejected -- Not all changes are right for [compass's philosophy](#project-philosophy). If your change is rejected it might be better suited for a plugin, at least until it matures and/or proves itself with the users. 2. The change is rejected, *unless* -- Sometimes, there are missing pieces, or other changes that need to be made before the change can be accepted. Comments will be left on the commits indicating what issues need to be addressed. 3. The change is accepted -- The change is merged into compass, sometimes minor changes are then applied by the committer after the merge.

Project Structure

compass/ bin/ compass - CLI executable devbin/ - development scripts after installing the bundle doc-src/ - source for documentation docs/ - generated documentation features/ - tests for compass frameworks/ - All frameworks in this directory are loaded automatically compass/ - The compass framework stylesheets/ - The compass libraries templates/ - The compass project templates and patterns blueprint/ stylesheets/ - The blueprint libraries templates/ - The blueprint project templates and patterns lib/ compass.rb - The main compass ruby library compass/ app_integration/ - integration with app frameworks commands/ - UI agnostic support for the CLI configuration/ - support for project configuration exec/ - UI code for the CLI installers/ - support for installing templates sass_extensions/ - enhancements to Sass functions/ - Sass functions exposed by compass monkey_patches/ - Changes to sass itself test/ - unit tests

General Philosophy

1. Users specify their own selectors. Compass never forces a user to use a presentational class name. 2. Compass does not require javascript. It is a CSS framework. 3. Compass core is "design agnostic". This is why compass core has no grid framework -- grids are not design agnostic. 4. Compass frameworks are not special. If compass can do it, so should an extension be able. 5. Sass is awesome -- Compass should make sass more accessible and demonstrate how to use Sass to its fullest potential. 6. Developing across browsers is hard and will always be hard. It takes a community to get it right. 7. By default, Compass supports as many browsers as it can. Where it can't it progressively enhances. Where it degrades, the documentation should make a note. Deviation from this requires an excellent reason. 8. Compass is a proving ground for Sass features. The watcher and color functions are examples of features that started in Compass and got moved to Sass.

Stylesheet Conventions

1. All framework stylesheets are partials. Their filename begin with an underscore. Otherwise, Sass will create stylesheets directly into the user's CSS directory. 2. Compass imports do not emit styles. There are a few limited exceptions to this like the resets and base classes for inheritance. 3. Mixins with two-level defaults. Mixins often provide two levels of default values. The first is a global default that can be overridden once. The second is a default that can be overridden when the mixin is included. 4. Mixin argument names are part of the public API, make sure they are understandable and not needlessly truncated or terse. 5. If adding a new folder of stylesheets, add a single stylesheet with the same name that imports all of the stylesheets in the folder. 6. Try to avoid passing selectors as arguments. This is what mixins are for.

Common Problems & Miscellaneous Info

Setting up Git

Please follow [these instructions](http://help.github.com/git-email-settings/) to set up your email address and attribution information. Download your git repo: git clone git@github.com:your_username/compass.git Set up a remote to the main repo: cd compass git remote add chriseppstein git://github.com/chriseppstein/compass.git Getting recent changes from the main repo: git fetch chriseppstein

Using Compass while Under Development

1. Use the bin script. `/path/to/compass/bin/compass` is a version of the compass command line that uses the local changes you have made. You can add `/path/to/compass/bin` to your `$PATH`, or refer to it directly. 2. `gem build compass.gemspec` 3. `gem install compass-.gem` -- If installing to your system gems, you'll probably need to add `sudo` to the front. If you don't know what that means, you probably need to add `sudo` to the front. 4. In a [bundled][bundler] environment, you can configure your gem to use compass while you work on it like so: `gem 'compass', :path => "/Users/myusername/some/path/to/compass"` Bundler will perform some sort of charm on ruby to make it work. 5. Configuring ruby directly. If you're a ruby pro, you probably don't need to be told that you can set compass on the load path like so: `export RUBYLIB=/Users/myusername/some/path/to/compass/lib`

Running Tests

1. You must have Ruby installed on your system. After [setting up git](#setting-up-git), change to the root directory of your git checkout of Compass. `cd compass` 2. Install the bundler Ruby gem. `gem install bundler` If installing to your system gems, you'll probably need to add `sudo` to the front of that command. If you don't know what that means, you probably need to add `sudo` to the front. 3. Install development dependencies: `bundle install --binstubs devbin` 4. Running core library and stylesheet tests: `bundle exec rake test features` 5. Running behavior tests `./devbin/cucumber` If stylesheet tests fail, the output of the test project is captured in `test/fixtures/stylesheets//saved/` and the error message will report where the error was. Here's an example: ![Stylesheet Test Failure](http://img.skitch.com/20101015-k4t11k8n7xs2r53ftjhrji629d.png)

Writing Stylesheet Tests

Compass has stylesheet tests to ensure that: - each stylesheet compiles - each stylesheet can be imported directly without any other dependencies - refactorings that should not affect the output, don't At some point, it would be great to have a test system that verifies that the stylesheets *work correctly* in various browsers. If you have ideas for how to accomplish this in a sane way, please let us know. In the `test/fixtures/stylesheets` directory, there are a number of compass projects. The tests work by adding or updating the sass files, running the tests to make sure they fail, and then changing the expected css output to make the test pass. It is rudimentary, but as a safety net, it has caught a number of problems that might have been missed otherwise. If you add a new stylesheet to compass, please make sure to add a new test stylesheet that only imports the newly added stylesheet and add rules that use the new features in that stylesheet.

You cherry-picked/rebased my changes. What should I do?

Depending on any number of reasons, including but not limited to the alignment of the stars, Your changes might not be merged into compass using a simple merge. For instance, we might decide to place a change against master into stable instead, or we might squish all your changes together into a single commit at the time of merge, or we might want a change you've submitted but not a change that it was placed onto top of. In these cases, there are a couple of ways you can react: 1. If you have some changes on a branch that were not yet accepted, but other changes on that branch were accepted then you should run the following command (make sure to fetch first): `git checkout branch_name; git rebase chriseppstein/master` (assuming the change was applied to the master branch) 2. If all your changes on the topic branch were accepted or you don't care to keep it around anymore: `git checkout master; git branch -D branch_name; git push origin :branch_name` [pulls]: http://help.github.com/pull-requests/ [issues]: http://github.com/chriseppstein/compass/issues [documentation]: http://github.com/chriseppstein/compass/blob/stable/doc-src/README.markdown [bundler]: http://gembundler.com/ [extensions]: /help/tutorials/extensions/ ================================================ FILE: Guardfile ================================================ group :tests do guard :test do watch(%r{^lib/(.+)\.rb$}) { |m| "test/#{m[1]}_test.rb" } watch(%r{^test/.+_test\.rb$}) watch(%r{^test/units/.+_test\.rb$}) watch('test/test_helper.rb') { "test" } end end group :features do guard :cucumber do watch(%r{^features/.+\.feature$}) watch(%r{^features/support/.+$}) { 'features' } watch(%r{^features/step_definitions/(.+)_steps\.rb$}) { |m| Dir[File.join("**/#{m[1]}.feature")][0] || 'features' } end end ================================================ FILE: LICENSE.markdown ================================================ Copyright (c) 2009-2014 Christopher M. Eppstein Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. No attribution is required by products that make use of this software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name(s) of the above copyright holders shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization. Contributors to this project agree to grant all rights to the copyright holder of the primary product. Attribution is maintained in the source control history of the product. ================================================ FILE: README.markdown ================================================ # Compass Stylesheet Authoring Framework **Depreciated:** Compass is no longer supported. Build Status: [![Build Status](https://travis-ci.org/Compass/compass.png)](https://travis-ci.org/Compass/compass) Code Quality: [![Code Climate](https://codeclimate.com/github/Compass/compass.png)](https://codeclimate.com/github/Compass/compass) ## Resources * [Compass Homepage](http://compass-style.org/) * [Installing Compass](http://compass-style.org/install/) * [Compass Reference](http://compass-style.org/install/reference/) ## Author Compass is written by [Chris Eppstein](http://chriseppstein.github.io/).
Chris is a software engineer at [LinkedIn](http://www.linkedin.com/) and a member of the [Sass](https://github.com/nex3/sass) core team. ## Core Team Members * [Scott Davis](https://github.com/scottdavis) * [Miriam Suzanne](https://github.com/mirisuzanne) * [Brandon Mathis](https://github.com/imathis) ## Major Contributors * [Nico Hagenburger](https://github.com/hagenburger) ## License Copyright (c) 2008-2014 Christopher M. Eppstein
All Rights Reserved.
Released under a [slightly modified MIT License](LICENSE.markdown). ================================================ FILE: Rakefile ================================================ GEMS = ['core', 'cli', 'import-once'] task :default => %w[test] desc "Run all tests" task :test do sh %{./test_all.sh} do |ok, res| Rake::Task["test_cleanup"].invoke if ok end end desc "build gems" task :build_gems => [:test] do GEMS.each do |gem| chdir gem do if gem == 'cli' sh "gem build compass.gemspec" else sh "gem build compass-#{gem}.gemspec" end end end end desc "publish gems" task :publish_gems => [:build_gems] do GEMS.each do |gem| chdir gem do if gem == 'cli' sh "gem push compass.gemspec" else sh "gem push compass-#{gem}.gemspec" end end end end desc "Clean up all test files" task :test_cleanup do dirs = [ 'core/devbin/', 'core/.sass-cache/', 'core/test/integrations/projects/busted_font_urls/tmp/', 'core/test/integrations/projects/busted_image_urls/tmp/', 'core/test/integrations/projects/compass/tmp/', 'core/test/integrations/projects/envtest/tmp/', 'core/test/integrations/projects/image_urls/tmp/', 'core/test/integrations/projects/relative/tmp/', 'core/test/integrations/projects/uses_only_stylesheets_ext/tmp/', 'core/test/integrations/projects/valid/tmp/', 'import-once/.sass-cache/' ] dirs.each { |dir| rm_rf dir } end desc "Bundle Update" task :bundle_update do GEMS.each do |gem| chdir gem do sh "bundle update" end end end ================================================ FILE: TODO.md ================================================ FYI: I'm abandoning the even/odd release numbering scheme in favor of using preview releases. Going forward the master branch will use the following release numbering: * 0.11.0.alpha.N.shortsha (Not tagged) * 0.11.0.beta.N (tagged, new features expected) * 0.11.0.rc.N (tagged, no new features expected) MUST: * A proper welcome page for blueprint projects (or delete it) * Rails Integration NICE: * some extension commands * Better help for commands and patterns * Color Palette extraction and management commands v0.11 ===== Planned Release Date: Aug 2, 2010 This is a quick iteration release. The focus on turning out even better documentation and some stylesheet updates and enhancements that take better advantage of the Sass 3 features. ### Docs (can be done on stable) * Improve the design * Better tutorials and getting started guides. * Terminal for Designers * Better examples & example navigation * Contribution guide: * Compass stylesheets * Compass ruby code * Documentation patches * SCSS Style Guide * Bundler 1.0 support * Upgrade nanoc * Better search experience * Search mixins and constants and code fragments that might use those. * Awesome homepage that is better integrated with the docs. * HTML5 the docs so they can run locally in offline mode. ### Compass Core * Updates as necessary to the CSS3 module as the spec process develops. * Typography module ### Blueprint * Provide an option to use @extend in the blueprint grid ### Rails * Fully integrated support of Rails 3 ### Other * Consider adding app integration with: Node.js, Django, Drupal, Wordpress (Wherever opinionated layouts exist). Also, try to make one of these a plugin to test out the concept. * clean up all the argument names in preparation for keyword argument support from sass. v0.12 ===== This release depends on Sass 3.2 and is aimed at taking advantage of the new sass 3.2 feature set as well as really making the extensions system come alive. Since I don't foresee any deprecations in Sass 3.2, this will not be a coordinated release. Instead, this release will trail Sass 3.2 by a month or two. ### Compass Core * Figure out what to do about multiple attribute properties like background. Might require list and function support from sass. ### Blueprint * If sass 3.2 is out with @function support, use that for grid calculations, otherwise punt to 1.0. ### Extensions * Extension registry on compass-style.org. * One step publishing via github + webhooks * Easy install via CLI * Local (per-user) extension repo with auto-discovery. * Video showing how easy it is to create, publish, and install an extension. v1.0 - Polaris ============== ### Blueprint * If the @extend version of the grid is full of win, make it the default. ### Sassdoc Extract the compass documentation system into a stand-alone project. ### Extensions * Build basic docs and host them for all extensions using sassdoc. * Support for selling extensions and taking a cut for umdf.org? ### Project Tools * enable building project docs using the sassdoc tool. v2.0 ==== Version 2 is all about making compass easier to use. Compass and Sass will have a GUI that makes it simple to manage your projects. ### GUI Prerelease 1 * Concept brainstorming * mockups * How can compass gui and sass gui interoperate or plug in. ### GUI Prerelease 2 Beta release as a separate install. ### GUI Prerelease 3 * Iterate based on feedback. * Integrate with a Sass GUI. * Embed the docs ### One-click Installers Install compass and sass with one click * Windows (Only if someone else wants to build and maintain it.) * Mac (.dmg + drag & drop app or installer) * Linux (Get distro packages going and in place for the 1.0 release) ================================================ FILE: cli/.gitignore ================================================ *.DS_Store *.tmproj *.lock tmp/* devbin .sass-cache test/tmp test/fixtures/stylesheets/*/tmp test/fixtures/stylesheets/*/saved test/fixtures/stylesheets/empty test/fixtures/stylesheets/*/sass/.sass-cache test/fixtures/stylesheets/valid/css/* pkg/* compass-*.gem coverage* docs .bundle attic devbin .rvmrc *.rbc vendor/ruby vendor Gemfile.lock *.pkg RELEASE_VERSION ================================================ FILE: cli/Gemfile ================================================ source 'https://rubygems.org' gemspec unless defined?(CI) unless ENV['PKG'] gem "sass", "~> 3.3.13" unless defined?(CI) gem "compass-core", :path => "../core" unless defined?(CI) gem "compass-import-once", :path => "../import-once" unless defined?(CI) gem 'sass-globbing', "~> 1.1.1" gem "cucumber", "~> 1.2.1" gem "rspec", "~> 2.0.0" gem "compass-validator", "3.0.1" gem "css_parser", "~> 1.0.1" gem "rubyzip", "0.9.9" gem 'mocha', '0.11.4' gem 'minitest', '2.12.1' gem 'diff-lcs', '~> 1.1.2' gem 'rake' gem 'json', '~> 1.7.7', :platforms => :ruby_18 gem 'true', "~> 0.2.3" gem 'test-unit', '~> 3.0.9' # Warning be carful adding OS dependant gems above this line it will break the CI server please # place them below so they are excluded unless ENV["CI"] gem 'rb-fsevent' gem 'ruby_gntp' gem "ruby-prof", :platforms => [:mri_19, :mri_20] gem "rcov", :platforms => :mri_18 gem 'guard', :platforms => [:mri_20] gem 'guard-test', :platforms => [:mri_20] gem 'guard-cucumber', :platforms => [:mri_20] # gem 'packager' gem 'colorize' gem 'pry' end end ================================================ FILE: cli/Rakefile ================================================ sh "git checkout lib/compass/generated_version.rb" require 'rubygems' require 'rubygems/package_task' require 'rake/testtask' require 'fileutils' if ENV["PKG"] $: << File.expand_path(File.dirname(__FILE__))+"/lib" else require 'bundler/setup' end unless ENV['CI'] require 'colorize' require 'fileutils' end begin require 'rake/dsl_definition' rescue LoadError # pass end # ----- Default: Testing ------ task :default => [:test, :features] begin require 'cucumber' require 'cucumber/rake/task' Cucumber::Rake::Task.new(:features) do |t| #t.cucumber_opts = %w{--format progress} end rescue LoadError $stderr.puts "cannot load cucumber" end Rake::TestTask.new :test do |t| t.libs << 'lib' t.libs << 'test' test_files = FileList['test/**/*_test.rb'] test_files.exclude('test/rails/*', 'test/haml/*') t.test_files = test_files t.verbose = true end Rake::TestTask.new :units do |t| t.libs << 'lib' t.libs << 'test' test_files = FileList['test/units/**/*_test.rb'] test_files.exclude('test/rails/*', 'test/haml/*') t.test_files = test_files t.verbose = true end Rake::TestTask.new :integrations do |t| t.libs << 'lib' t.libs << 'test' test_files = FileList['test/integrations/**/*_test.rb'] test_files.exclude('test/rails/*', 'test/haml/*') t.test_files = test_files t.verbose = true end namespace :git do task :clean do sh "git", "clean", "-fdx" end end begin require 'cucumber/rake/task' require 'rcov/rcovtask' namespace :rcov do Cucumber::Rake::Task.new(:cucumber) do |t| t.rcov = true t.rcov_opts = %w{--exclude osx\/objc,gems\/,spec\/,features\/ --aggregate coverage.data} t.rcov_opts << %[-o "coverage"] end Rcov::RcovTask.new(:units) do |rcov| rcov.libs << 'lib' test_files = FileList['test/**/*_test.rb'] test_files.exclude('test/rails/*', 'test/haml/*') rcov.pattern = test_files rcov.output_dir = 'coverage' rcov.verbose = true rcov.rcov_opts = %w{--exclude osx\/objc,gems\/,spec\/,features\/ --aggregate coverage.data} rcov.rcov_opts << %[-o "coverage" --sort coverage] end desc "Run both specs and features to generate aggregated coverage" task :all do |t| rm "coverage.data" if File.exist?("coverage.data") Rake::Task["rcov:units"].invoke Rake::Task["rcov:cucumber"].invoke end end rescue LoadError => e puts "WARNING: #{e}" end namespace :test do debug = false desc "update test expectations if needed" task :update do Rake::Task['test:update:fixtures'].invoke end task :debug do debug = true Rake::Task['test:update:fixtures'].invoke end namespace :update do EXPECTED = 'css' TMP = 'tmp' #desc "update fixture expectations for test cases if needed" task :fixtures do fixtures = File.join('test/fixtures/stylesheets/compass'.split('/')) # remove any existing temporary files FileUtils.rm_rf(File.join(File.dirname(__FILE__), fixtures, TMP, '.')) # compile the fixtures puts "checking test cases..." CHECKMARK = "\u2713 " filter = debug ? '--trace' : "| grep 'error.*#{fixtures}'" errors = %x[compass compile #{fixtures} #{filter}] # check for compilation errors if not errors.empty? puts "Please fix the following errors before proceeding:".colorize(:red) if not debug puts errors else # check to see what's changed diff = %x[diff -r #{File.join(fixtures, EXPECTED, '')} #{File.join(fixtures, TMP, '')}] # ignore non-CSS files in css/ diff.gsub!(/^Only in .*\/css\/(.*)\:.*[^.]/, '') if diff.empty? puts "#{CHECKMARK}Cool! Looks like all the tests are up to date".colorize(:green) else puts "The following changes were found:" puts "====================================" # check for new or removed expectations diff.scan(/^Only in .*\/(#{EXPECTED}|#{TMP})\/(.*)\: (.*).css/).each do |match| config = (match[0] == TMP) ? [:green, '>', 'NEW TEST'] : [:red, '<', 'DELETED'] puts "[#{File.join(match[1], match[2])}] #{config[2].colorize(config[0])}".colorize(:cyan) new_file = File.join(File.dirname(__FILE__), fixtures, match[0], match[1], match[2]) + '.css' puts File.read(new_file).gsub(/^(.*)/, config[1] + ' \1').colorize(config[0]) end diff = diff.gsub(/^diff\s\-r\s.*\/tmp\/(.*).css/, '[\1]'.colorize(:cyan)) diff = diff.gsub(/^Only in .*\n?/, '') diff = diff.gsub(/^(\<.*)/, '\1'.colorize(:red)) diff = diff.gsub(/^(\>.*)/, '\1'.colorize(:green)) diff = diff.gsub(/^(\d+.*)/, '\1'.colorize(:cyan)) puts diff puts "====================================" puts "Are all of these changes expected? [y/n]".colorize(:yellow) if (($stdin.gets.chomp)[0] == 'y') FileUtils.rm_rf(File.join(File.dirname(__FILE__), fixtures, EXPECTED, '.')) FileUtils.cp_r(File.join(File.dirname(__FILE__), fixtures, TMP, '.'), File.join(File.dirname(__FILE__), fixtures, EXPECTED)) puts "#{CHECKMARK}Thanks! The test expectations have been updated".colorize(:green) else puts "Please manually update the test cases and expectations".colorize(:red) end end end end end end # Release tasks gemspec_file = FileList['compass.gemspec'].first spec = eval(File.read(gemspec_file), binding, gemspec_file) spec.files.delete("VERSION") spec.files.delete("VERSION_NAME") def spec.bump! segments = version.to_s.split(".") segments[-1] = segments.last.succ self.version = Gem::Version.new(segments.join(".")) end # Set SAME_VERSION when moving to a new major version and you want to specify the new version # explicitly instead of bumping the current version. # E.g. rake build SAME_VERSION=true spec.bump! unless ENV["SAME_VERSION"] desc "Run tests and build compass-#{spec.version}.gem" task :build => [:default, :gem] task :gem => :release_version task :release_version do open("lib/compass/generated_version.rb", "w") do |f| f.write(< [:record_version, :push_gem, :tag] desc "Build & Publish version #{spec.version}" task :release => [:build, :publish] Gem::PackageTask.new(spec) do |pkg| pkg.need_zip = true pkg.need_tar = true end desc "Record the new version in version control for posterity" task :record_version do unless ENV["SAME_VERSION"] open(FileList["VERSION"].first, "w") do |f| f.write(spec.version.to_s) end sh "git add VERSION" sh "git checkout lib/compass/generated_version.rb" sh %Q{git commit -m "Bump version to #{spec.version}."} end end desc "Tag the repo as #{spec.version} and push the code and tag." task :tag do sh "git tag -a -m 'Version #{spec.version}' #{spec.version}" sh "git push --tags origin #{`git rev-parse --abbrev-ref HEAD`}" end desc "Push compass-#{spec.version}.gem to the rubygems server" task :push_gem do sh "gem push pkg/compass-#{spec.version}.gem" end ================================================ FILE: cli/VERSION ================================================ 1.0.3 ================================================ FILE: cli/VERSION_NAME ================================================ Polaris ================================================ FILE: cli/bin/compass ================================================ #!/usr/bin/env ruby # The compass command line utility # This allows compass to run easily from a git checkout without install. def fallback_load_path(path) retried = false begin yield rescue LoadError unless retried $: << path retried = true retry end raise end end fallback_load_path(File.join(File.dirname(__FILE__), '..', 'lib')) do require 'compass' require 'compass/exec' end if defined?(Bundler) require 'bundler/shared_helpers' Bundler.require :assets if Bundler::SharedHelpers.in_bundle? end runner = Proc.new do Compass::Exec::SubCommandUI.new(ARGV).run! end if ARGV.delete("--profile") require 'ruby-prof' RubyProf.start exit_code = runner.call result = RubyProf.stop # Print a flat profile to text printer = RubyProf::FlatPrinter.new(result) printer.print(STDERR, 0) exit exit_code else exit runner.call || 1 end ================================================ FILE: cli/compass.gemspec ================================================ path = File.expand_path("lib", File.dirname(__FILE__)) $:.unshift(path) unless $:.include?(path) require 'compass/version' Gem::Specification.new do |gemspec| gemspec.name = "compass" gemspec.version = Compass::VERSION # Update VERSION file to set this. gemspec.description = "Compass is a Sass-based Stylesheet Framework that streamlines the creation and maintenance of CSS." gemspec.homepage = "http://compass-style.org" gemspec.authors = ["Chris Eppstein", "Scott Davis", "Eric M. Suzanne", "Brandon Mathis", "Nico Hagenburger"] gemspec.email = "chris@eppsteins.net" gemspec.executables = %w(compass) gemspec.require_paths = %w(lib) gemspec.rubygems_version = "1.3.5" gemspec.summary = %q{A Real Stylesheet Framework} gemspec.add_dependency 'sass', '>= 3.3.13', '< 3.5' gemspec.add_dependency 'compass-core', "~> #{File.read(File.join(File.dirname(__FILE__),"..","core","VERSION")).strip}" gemspec.add_dependency 'compass-import-once', "~> #{File.read(File.join(File.dirname(__FILE__),"..","import-once","VERSION")).strip}" gemspec.add_dependency 'chunky_png', '~> 1.2' gemspec.add_dependency 'rb-fsevent', '>= 0.9.3' gemspec.add_dependency 'rb-inotify', '>= 0.9' gemspec.post_install_message = <<-MESSAGE Compass is charityware. If you love it, please donate on our behalf at http://umdf.org/compass Thanks! MESSAGE gemspec.files = %w(LICENSE.markdown VERSION VERSION_NAME Rakefile) gemspec.files += Dir.glob("bin/*") gemspec.files += Dir.glob("data/**/*") gemspec.files += Dir.glob("frameworks/**/*") gemspec.files += Dir.glob("lib/**/*") gemspec.files += Dir.glob("test/**/*.*") gemspec.files -= Dir.glob("test/fixtures/stylesheets/*/saved/**/*.*") gemspec.test_files = Dir.glob("test/**/*.*") gemspec.test_files -= Dir.glob("test/fixtures/stylesheets/*/saved/**/*.*") gemspec.test_files += Dir.glob("features/**/*.*") end ================================================ FILE: cli/features/command_line.feature ================================================ Feature: Command Line In order to manage my stylesheets As a user on the command line I want to create a new project Scenario: Install a project without a framework When I create a project using: compass create my_project Then a directory my_project/ is created And a configuration file my_project/config.rb is created And a sass file my_project/sass/screen.scss is created And a sass file my_project/sass/print.scss is created And a sass file my_project/sass/ie.scss is created And a css file my_project/stylesheets/screen.css is created And a css file my_project/stylesheets/print.css is created And a css file my_project/stylesheets/ie.css is created And I am told how to link to /stylesheets/screen.css for media "screen, projection" And I am told how to link to /stylesheets/print.css for media "print" And I am told how to conditionally link "IE" to /stylesheets/ie.css for media "screen, projection" Scenario: Install a project with specific directories When I create a project using: compass create custom_project --using compass --sass-dir sass --css-dir css --images-dir assets/imgs Then a directory custom_project/ is created And a directory custom_project/sass/ is created And a directory custom_project/css/ is created And a sass file custom_project/sass/screen.scss is created And a css file custom_project/css/screen.css is created Scenario: Creating a bare project When I create a project using: compass create bare_project --bare Then a directory bare_project/ is created And a configuration file bare_project/config.rb is created And a directory bare_project/sass/ is created And a directory bare_project/stylesheets/ is not created And I am congratulated And I am told that I can place stylesheets in the sass subdirectory And I am told how to compile my sass stylesheets Scenario: Compiling a project with errors Given I am using the existing project in test/fixtures/stylesheets/valid And the project has a file named "sass/error.scss" containing: """ .broken { """ When I run: compass compile Then the command exits with a non-zero error code Scenario: Creating a bare project with a framework When I create a project using: compass create bare_project --using blueprint --bare Then an error message is printed out: A bare project cannot be created when a framework is specified. And the command exits with a non-zero error code Scenario: Compiling an existing project. Given I am using the existing project in test/fixtures/stylesheets/valid When I run: compass compile Then a directory tmp/ is created And a css file tmp/simple.css is created Scenario: Compiling an existing project with a specified project Given I am using the existing project in test/fixtures/stylesheets/valid And I am in the parent directory When I run: compass compile tmp_valid Then a directory tmp_valid/tmp/ is created And a css file tmp_valid/tmp/simple.css is created Scenario: Recompiling a project with no changes Given I am using the existing project in test/fixtures/stylesheets/valid When I run: compass compile And I run: compass compile Scenario: compiling a specific file in a project Given I am using the existing project in test/fixtures/stylesheets/valid And I run: compass compile sass/simple.sass Then a sass file sass/another_simple.scss is not mentioned And a css file tmp/simple.css is reported written And a css file tmp/simple.css is created And a css file tmp/another_simple.css is not created Scenario: Re-compiling a specific file in a project with no changes Given I am using the existing project in test/fixtures/stylesheets/valid When I run: compass compile And I run: compass compile sass/simple.sass --force Then a sass file sass/another_simple.scss is not mentioned And a css file tmp/simple.css is reported written Scenario: Basic help When I run: compass help Then I should see the following "primary" commands: | clean | | compile | | create | | init | | watch | And I should see the following "other" commands: | config | | extension | | frameworks | | help | | imports | | install | | interactive | | sprite | | stats | | unpack | | validate | | version | Scenario: Recompiling a project with no material changes Given I am using the existing project in test/fixtures/stylesheets/valid When I run: compass compile And I wait 1 second And I touch sass/simple.sass And I run: compass compile Then a css file tmp/simple.css is reported written Scenario: Recompiling a project with changes Given I am using the existing project in test/fixtures/stylesheets/valid When I run: compass compile And I wait 1 second And I add some sass to sass/simple.sass And I run: compass compile And a css file tmp/simple.css is reported written Scenario: Cleaning a project Given I am using the existing project in test/fixtures/stylesheets/valid When I run: compass compile And I run: compass clean Then the following files are reported removed: | .sass-cache/ | | tmp/simple.css | | tmp/another_simple.css | And the following files are removed: | .sass-cache/ | | tmp/simple.css | | tmp/another_simple.css | @now Scenario: Watching a project for changes Given ruby supports fork Given I am using the existing project in test/fixtures/stylesheets/valid When I run: compass compile And I run in a separate process: compass watch And I wait 4 seconds And I touch sass/simple.sass And I wait 2 seconds And I shutdown the other process Then a css file tmp/simple.css is reported written Scenario: Generate a compass configuration file Given I should clean up the directory: config When I run: compass config config/compass.rb --sass-dir sass --css-dir assets/css Then a configuration file config/compass.rb is created And the following configuration properties are set in config/compass.rb: | property | value | | sass_dir | sass | | css_dir | assets/css | Scenario Outline: Print out a configuration value Given I am using the existing project in test/fixtures/stylesheets/valid When I run: compass config -p Then I should see the following output: And the command exits Examples: | property | value | exit | | extensions_dir | extensions | normally | | extensions_path | $PROJECT_PATH/extensions | normally | | css_dir | tmp | normally | | css_path | $PROJECT_PATH/tmp | normally | | sass_dir | sass | normally | | sass_path | $PROJECT_PATH/sass | normally | | foobar | ERROR: configuration property 'foobar' does not exist | with a non-zero error code | @validator Scenario: Validate the generated CSS Given I am using the existing project in test/fixtures/stylesheets/valid When I run: compass validate Then my css is validated And I am informed that my css is valid. @stats Scenario: Get stats for my project Given I am using the existing project in test/fixtures/stylesheets/valid When I run: bundle exec compass stats Then I am told statistics for each file: | Filename | Rules | Properties | Mixins Defs | Mixins Used | Filesize | CSS Selectors | CSS Properties | CSS Filesize | | sass/simple.sass | \d+ | \d+ | \d+ | \d+ | \d+ K?B | \d+ | \d+ | \d+ K?B | | sass/another_simple.scss | \d+ | \d+ | \d+ | \d+ | \d+ K?B | \d+ | \d+ | \d+ K?B | | Total.* | \d+ | \d+ | \d+ | \d+ | \d+ K?B | \d+ | \d+ | \d+ K?B | @listframeworks Scenario: List frameworks registered with compass When I run: compass frameworks Then I should see the following lines of output: | compass | ================================================ FILE: cli/features/extensions.feature ================================================ Feature: Extensions In order to have an open source ecosystem for stylesheets As a compass user I can install extensions that others have created And I can create and publish my own extensions @listframeworks Scenario: Extensions directory for stand_alone projects Given I am using the existing project in test/fixtures/stylesheets/compass And the "extensions" directory exists And and I have a fake extension at extensions/testing When I run: compass frameworks Then the list of frameworks includes "testing" @listframeworks Scenario: Shared extensions directory Given the "~/.compass/extensions" directory exists And and I have a fake extension at ~/.compass/extensions/testing And I am using the existing project in test/fixtures/stylesheets/compass When I run: compass frameworks Then the list of frameworks includes "testing" @listframeworks Scenario: Frameworks without templates Given I am using the existing project in test/fixtures/stylesheets/uses_only_stylesheets_ext When I run: compass frameworks Then the list of frameworks includes "only_stylesheets" ================================================ FILE: cli/features/step_definitions/command_line_steps.rb ================================================ $:.unshift(File.expand_path(File.join(File.dirname(__FILE__), '../../test'))) require 'bundler/setup' require 'test_helper' require 'compass/exec' include Compass::TestCaseHelper include Compass::CommandLineHelper include Compass::IoHelper Before do Compass.reset_configuration! @cleanup_directories = [] @original_working_directory = Dir.pwd end After do Dir.chdir @original_working_directory @cleanup_directories.each do |dir| FileUtils.rm_rf dir end end Given "ruby supports fork" do if RUBY_PLATFORM == "java" pending end end # Given Preconditions Given %r{^I am using the existing project in ([^\s]+)$} do |project| tmp_project = "tmp_#{File.basename(project)}" @cleanup_directories << tmp_project FileUtils.cp_r project, tmp_project Dir.chdir tmp_project end Given %r{^I am in the parent directory$} do Dir.chdir ".." end Given /^I should clean up the directory: (\w+)$/ do |directory| @cleanup_directories << directory end Given %r{^the project has a file named "([^"]*)" containing:$} do |arg1, string| File.open(arg1, "w") do |f| f << string end end # When Actions are performed When /^I create a project using: compass create ([^\s]+) ?(.+)?$/ do |dir, args| @cleanup_directories << dir compass 'create', dir, *(args || '').split end When /^I initialize a project using: compass init ?(.+)?$/ do |args| compass 'init', *(args || '').split end When /^I run: compass ([^\s]+) ?(.+)?$/ do |command, args| compass command, *(args || '').split end When /^I run in a separate process: compass ([^\s]+) ?(.+)?$/ do |command, args| unless @other_process = fork @last_result = '' @last_error = '' Signal.trap("HUP") do open('/tmp/last_result.compass_test.txt', 'w') do |file| file.puts $stdout.string end open('/tmp/last_error.compass_test.txt', 'w') do |file| file.puts $stderr.string end exit! end # this command will run forever # we kill it with a HUP signal from the parent process. args = (args || '').split args << { :wait => 5 } compass command, *args exit! end end When /^I shutdown the other process$/ do Process.kill("HUP", @other_process) Process.wait @last_result = File.read('/tmp/last_result.compass_test.txt') @last_error = File.read('/tmp/last_error.compass_test.txt') end When /^I touch ([^\s]+)$/ do |filename| FileUtils.touch filename end When /^I wait ([\d.]+) seconds?$/ do |count| sleep count.to_f end When /^I add some sass to ([^\s]+)$/ do |filename| open(filename, "w+") do |file| file.puts ".added .some .arbitrary" file.puts " sass: code" end end # Then postconditions Then /^a directory ([^ ]+) is (not )?created$/ do |directory, negated| File.directory?(directory).should == !negated end Then /an? \w+ file ([^ ]+) is (not )?removed/ do |filename, negated| File.exists?(filename).should == !!negated end Then /an? \w+ file ([^ ]+) is (not )?created/ do |filename, negated| File.exists?(filename).should == !negated end Then "the following files are reported removed:" do |table| table.rows.each do |css_file| #need to find a better way but this works for now step %Q{a css file #{css_file.first} is reported removed} end end Then "the following files are removed:" do |table| table.rows.each do |css_file| step %Q{a css file #{css_file.first} is removed} end end Then /an? \w+ file ([^ ]+) is reported removed/ do |filename| @last_result.should =~ /delete.*#{Regexp.escape(filename)}/ end Then /an? \w+ file ([^ ]+) is reported written/ do |filename| @last_result.should =~ /write.*#{Regexp.escape(filename)}/ end Then /a \w+ file ([^ ]+) is (?:reported )?compiled/ do |filename| @last_result.should =~ /compile.*#{Regexp.escape(filename)}/ end Then /a \w+ file ([^ ]+) is reported unchanged/ do |filename| @last_result.should =~ /unchanged.*#{Regexp.escape(filename)}/ end Then /a \w+ file ([^ ]+) is reported identical/ do |filename| @last_result.should =~ /identical.*#{Regexp.escape(filename)}/ end Then /a \w+ file ([^ ]+) is reported overwritten/ do |filename| @last_result.should =~ /overwrite.*#{Regexp.escape(filename)}/ end Then /a \w+ file ([^ ]+) is not mentioned/ do |filename| @last_result.should_not =~ /#{Regexp.escape(filename)}/ end Then /I am told how to link to ([^ ]+) for media "([^"]+)"/ do |stylesheet, media| @last_result.should =~ %r{} end Then /I am told how to conditionally link "([^"]+)" to ([^ ]+) for media "([^"]+)"/ do |condition, stylesheet, media| @last_result.should =~ %r{}mi end Then /^an error message is printed out: (.+)$/ do |error_message| @last_error.should =~ Regexp.new(Regexp.escape(error_message)) end Then /^the command exits with a non\-zero error code$/ do @last_exit_code.should_not == 0 end Then /^the command exits normally$/ do @last_exit_code.should == 0 end Then /^I am congratulated$/ do @last_result.should =~ /Congratulations!/ end Then /^I am told that I can place stylesheets in the ([^\s]+) subdirectory$/ do |subdir| @last_result.should =~ /You may now add sass stylesheets to the #{subdir} subdirectory of your project./ end Then /^I am told how to compile my sass stylesheets$/ do @last_result.should =~ /You must compile your sass stylesheets into CSS when they change.\nThis can be done in one of the following ways:/ end Then /^I should be shown a list of "([^"]+)" commands$/ do |kind| @last_result.should =~ /^#{kind.capitalize} Commands:$/ @last_command_list = [] found = false indent = nil @last_result.split("\n").each do |line| if line =~ /^#{kind.capitalize} Commands:$/ found = true elsif found && line =~ /^\s+/ @last_command_list << line elsif found && line =~ /^$|^\w/ break end end end Then /^the list of commands should describe the ([^ ]+) command$/ do |command| @last_result.should =~ /^\s+\* #{command}\s+- [A-Z].+$/ end Then /^the following configuration properties are set in ([^ ]+):$/ do |config_file, table| config = Compass::Configuration::FileData.new_from_file(config_file) table.hashes.each do |hash| config.send(hash['property']).should == hash['value'] end end Then /^my css is validated$/ do if @last_error =~ /The Compass CSS Validator could not be loaded/ pending "Missing Dependency: sudo gem install compass-validator" else @last_result.should =~ /files? validated/ end end Then /^I am informed that my css is valid.$/ do @last_result.should =~ /Result: Valid/ end Then /^I am told statistics for each file:$/ do |table| # table is a Cucumber::Ast::Table table.raw.each do |row| re = Regexp.new row.join(' *\| *') @last_result.should =~ re end end Then /^I should see the following "([^"]+)" commands:$/ do |kind, table| step %Q{I should be shown a list of "#{kind}" commands} commands = @last_command_list.map{|c| c =~ /^\s+\* ([^ ]+)\s+- [A-Z].+$/; [$1]} table.diff!(commands) end Then /^the image ([^ ]+) has a size of (\d+)x(\d+)$/ do |file, width, height| # see http://snippets.dzone.com/posts/show/805 size = File.open(file, "rb") {|io| io.read}[0x10..0x18].unpack('NN') size.should == [width.to_i, height.to_i] end Then /^I should see the following lines of output:$/ do |table| table.diff!([['compass']]) end Then /^I should see the following output: (.+)$/ do |expected| (@last_result.strip + @last_error.strip).should == expected.gsub(/\$PROJECT_PATH/,Dir.pwd).strip end ================================================ FILE: cli/features/step_definitions/extension_steps.rb ================================================ Given /^the "([^\"]*)" directory exists$/ do |directory| directory.gsub!('~', ENV["HOME"]) if directory.include?('~/') FileUtils.mkdir_p directory end Given /^and I have a fake extension at (.*)$/ do |directory| directory.gsub!('~', ENV["HOME"]) if directory.include?('~/') FileUtils.mkdir_p File.join(directory, 'stylesheets') FileUtils.mkdir_p File.join(directory, 'templates/project') open(File.join(directory, 'templates/project/manifest.rb'),"w") do |f| f.puts %Q{ description "This is a fake extension" help "this is the fake help" welcome_message "this is a fake welcome" } end end Then /^the list of frameworks includes "([^\"]*)"$/ do |framework| @last_result.split("\n").map{|f| f.gsub(/(^\s+[*-]\s+)|(\s+$)/,'')}.should include(framework) end ================================================ FILE: cli/gemfiles/listen_2.gemfile ================================================ CI=true main_gemfile = File.expand_path(File.join(File.dirname(__FILE__), "..", "Gemfile")) eval File.read(main_gemfile), nil, main_gemfile gem 'sass', '~> 3.3.12' gem 'compass', :path => "../" gem 'compass-core', :path => "../../core" gem 'compass-import-once', :path => "../../import-once" gem 'listen', '~> 2.7.1' gemspec :path=>"../" ================================================ FILE: cli/gemfiles/sass_3_3.gemfile ================================================ CI=true main_gemfile = File.expand_path(File.join(File.dirname(__FILE__), "..", "Gemfile")) eval File.read(main_gemfile), nil, main_gemfile gem 'sass', "~> 3.3.12" gem 'compass', :path => "../" gem 'compass-core', :path => "../../core" gem 'compass-import-once', :path => "../../import-once" gemspec :path=>"../" ================================================ FILE: cli/gemfiles/sass_local.gemfile ================================================ CI=true main_gemfile = File.expand_path(File.join(File.dirname(__FILE__), "..", "Gemfile")) eval File.read(main_gemfile), nil, main_gemfile gem 'sass', :path => "../../sass" gem 'compass', :path => "../" gemspec :path=>"../" ================================================ FILE: cli/lib/compass/actions.rb ================================================ module Compass module Actions attr_writer :logger def logger @logger ||= ::Compass::Logger.new end # copy/process a template in the compass template directory to the project directory. def copy(from, to, options = nil, binary = false) options ||= self.options if self.respond_to?(:options) if binary contents = File.new(from,"rb").read else contents = File.new(from).read end write_file to, contents, options, binary end # create a directory and all the directories necessary to reach it. def directory(dir, options = nil) options ||= self.options if self.respond_to?(:options) options ||= {} if File.exists?(dir) && File.directory?(dir) # do nothing elsif File.exists?(dir) msg = "#{basename(dir)} already exists and is not a directory." raise Compass::FilesystemConflict.new(msg) else log_action :directory, separate("#{basename(dir)}/"), options FileUtils.mkdir_p(dir) end end # Write a file given the file contents as a string def write_file(file_name, contents, options = nil, binary = false) options ||= self.options if self.respond_to?(:options) skip_write = false contents = process_erb(contents, options[:erb]) if options[:erb] if File.exists?(file_name) existing_contents = IO.read(file_name) if existing_contents == contents log_action :identical, basename(file_name), options skip_write = true elsif options[:force] log_action :overwrite, basename(file_name), options else msg = "File #{basename(file_name)} already exists. Run with --force to force overwrite." raise Compass::FilesystemConflict.new(msg) end else log_action :create, basename(file_name), options end if skip_write FileUtils.touch file_name else mode = "w" mode << "b" if binary open(file_name, mode) do |file| file.write(contents) end end end def process_erb(contents, ctx = nil) ctx = Object.new.instance_eval("binding") unless ctx.is_a? Binding ERB.new(contents).result(ctx) end def remove(file_name) file_name ||= '' if File.directory?(file_name) FileUtils.rm_rf file_name log_action :remove, basename(file_name)+"/", options elsif File.exists?(file_name) File.unlink file_name log_action :remove, basename(file_name), options end end def basename(file) relativize(file) {|f| File.basename(file)} end def relativize(path) path = File.expand_path(path) if path.index(working_path+File::SEPARATOR) == 0 path[(working_path+File::SEPARATOR).length..-1] elsif block_given? yield path else path end end # Write paths like we're on unix and then fix it def separate(path) path.gsub(%r{/}, File::SEPARATOR) end # Removes the trailing separator, if any, from a path. def strip_trailing_separator(path) (path[-1..-1] == File::SEPARATOR) ? path[0..-2] : path end def log_action(action, file, options) quiet = !!options[:quiet] quiet = false if options[:loud] && options[:loud] == true quiet = false if options[:loud] && options[:loud].is_a?(Array) && options[:loud].include?(action) unless quiet logger.record(action, file, options[:extra].to_s) end end end end ================================================ FILE: cli/lib/compass/app_integration/stand_alone/configuration_defaults.rb ================================================ module Compass module AppIntegration module StandAlone module ConfigurationDefaults def default_project_type :stand_alone end def sass_dir_without_default "sass" end def javascripts_dir_without_default "javascripts" end def css_dir_without_default "stylesheets" end def images_dir_without_default "images" end def default_cache_dir ".sass-cache" end end end end end ================================================ FILE: cli/lib/compass/app_integration/stand_alone/installer.rb ================================================ module Compass module Installers class Base end class ManifestInstaller < Base end end module AppIntegration module StandAlone class Installer < Compass::Installers::ManifestInstaller def init directory targetize("") super end def write_configuration_files(config_file = nil) config_file ||= targetize('config.rb') write_file config_file, config_contents end def config_files_exist? File.exists? targetize('config.rb') end def config_contents project_path, Compass.configuration.project_path = Compass.configuration.project_path, nil Compass.configuration.serialize ensure Compass.configuration.project_path = project_path end def prepare write_configuration_files unless config_files_exist? || !@manifest.generate_config? end def completed_configuration nil end def finalize(options = {}) if options[:create] && !manifest.welcome_message_options[:replace] puts <<-NEXTSTEPS ********************************************************************* Congratulations! Your compass project has been created. You may now add and edit sass stylesheets in the #{Compass.configuration.sass_dir} subdirectory of your project. Sass files beginning with an underscore are called partials and won't be compiled to CSS, but they can be imported into other sass stylesheets. You can configure your project by editing the config.rb configuration file. You must compile your sass stylesheets into CSS when they change. This can be done in one of the following ways: 1. To compile on demand: compass compile [path/to/project] 2. To monitor your project for changes and automatically recompile: compass watch [path/to/project] More Resources: * Website: http://compass-style.org/ * Sass: http://sass-lang.com * Community: http://groups.google.com/group/compass-users/ NEXTSTEPS end puts manifest.welcome_message if manifest.welcome_message if manifest.has_stylesheet? && !manifest.welcome_message_options[:replace] puts "\nTo import your new stylesheets add the following lines of HTML (or equivalent) to your webpage:" puts stylesheet_links end end def compilation_required? @manifest.compile? end end end end end ================================================ FILE: cli/lib/compass/app_integration/stand_alone.rb ================================================ %w(configuration_defaults installer).each do |lib| require "compass/app_integration/stand_alone/#{lib}" end module Compass module AppIntegration module StandAlone extend self def installer(*args) Installer.new(*args) end def configuration Compass::Configuration::Data.new('stand_alone'). extend(ConfigurationDefaults) end end end end ================================================ FILE: cli/lib/compass/app_integration.rb ================================================ require "compass/app_integration/stand_alone" module Compass module AppIntegration module Helpers #attr_accessor :project_types DEAFULT_PROJECT_TYPES = { :stand_alone => "Compass::AppIntegration::StandAlone" } def init @project_types ||= DEAFULT_PROJECT_TYPES.dup end def project_types @project_types end def default? @project_types.keys === DEAFULT_PROJECT_TYPES.keys end def lookup(type) unless @project_types[type].nil? eval @project_types[type] else raise Compass::Error, "No application integration exists for #{type}" end end def register(type, klass) @project_types[type] = klass end end extend Helpers init end end ================================================ FILE: cli/lib/compass/commands/base.rb ================================================ module Compass module Commands class Base def self.register(command_name) Compass::Commands[command_name] = self end include Actions attr_accessor :working_path, :options def initialize(working_path, options) self.working_path = working_path.to_s self.options = options end def execute perform end def perform raise StandardError.new("Not Implemented") end def successful? !@failed end def failed! @failed = true end protected def framework unless Compass::Frameworks[options[:framework]] raise Compass::Error.new("No such framework: #{options[:framework].inspect}") end Compass::Frameworks[options[:framework]] end end end end ================================================ FILE: cli/lib/compass/commands/clean_project.rb ================================================ require 'compass/commands/project_base' require 'compass/compiler' module Compass module Commands module CleanProjectOptionsParser def set_options(opts) opts.banner = %Q{ Usage: compass clean [path/to/project] [options] Description: Remove generated files and the sass cache. Options: }.split("\n").map{|l| l.gsub(/^ */,'')}.join("\n") super end end class CleanProject < UpdateProject register :clean def initialize(working_path, options) super assert_project_directory_exists! end def perform compiler = new_compiler_instance compiler.clean! Compass::SpriteImporter.find_all_sprite_map_files(Compass.configuration.generated_images_path).each do |sprite| remove sprite end end def determine_cache_location Compass.configuration.cache_path || Sass::Plugin.options[:cache_location] || File.join(working_path, ".sass-cache") end class << self def option_parser(arguments) parser = Compass::Exec::CommandOptionParser.new(arguments) parser.extend(Compass::Exec::GlobalOptionsParser) parser.extend(Compass::Exec::ProjectOptionsParser) parser.extend(CleanProjectOptionsParser) end def usage option_parser([]).to_s end def primary; true; end def description(command) "Remove generated files and the sass cache" end def parse!(arguments) parser = option_parser(arguments) parser.parse! parse_arguments!(parser, arguments) parser.options end def parse_arguments!(parser, arguments) if arguments.size > 0 parser.options[:project_name] = arguments.shift if File.directory?(arguments.first) unless arguments.empty? parser.options[:sass_files] = arguments.dup parser.options[:force] = true end end end end end end end ================================================ FILE: cli/lib/compass/commands/create_project.rb ================================================ require 'fileutils' require 'compass/commands/stamp_pattern' module Compass module Commands module CreateProjectOptionsParser def set_options(opts) if $command == "create" opts.banner = %Q{ Usage: compass create path/to/project [options] Description: Create a new compass project at the path specified. Options: }.split("\n").map{|l| l.gsub(/^ */,'')}.join("\n") opts.on_tail("--bare", "Don't generate any Sass or CSS files.") do self.options[:bare] = true end else opts.banner = %Q{ Usage: compass init project_type path/to/project [options] Description: Initialize an existing project at the path specified. Supported Project Types: * rails Options: }.split("\n").map{|l| l.gsub(/^ */,'')}.join("\n").strip end opts.on("--using PATTERN", "A framework's pattern to use when creating the project.") do |framework| framework = framework.split('/', 2) self.options[:framework] = framework[0] self.options[:pattern] = framework[1] end opts.on("-x", "--syntax SYNTAX", [:sass, :scss], "Specify the syntax to use when generating stylesheets.", "One of sass or scss. Defaults to scss.") do |syntax| self.options[:preferred_syntax] = syntax end opts.on("--prepare", "Prepare the project by only creating configuration files.") do self.options[:prepare] = true end super end end class CreateProject < StampPattern register :create register :init class << self def option_parser(arguments) parser = Compass::Exec::CommandOptionParser.new(arguments) parser.extend(Compass::Exec::GlobalOptionsParser) parser.extend(Compass::Exec::ProjectOptionsParser) parser.extend(CreateProjectOptionsParser) end def usage option_parser([]).to_s end def description(command) if command.to_sym == :create "Create a new compass project" else "Add compass to an existing project" end end def primary; true; end def parse!(arguments) parser = option_parser(arguments) parse_options!(parser, arguments) parse_arguments!(parser, arguments) if parser.options[:framework] && parser.options[:bare] raise Compass::Error, "A bare project cannot be created when a framework is specified." end set_default_arguments(parser) parser.options end def parse_init!(arguments) parser = option_parser(arguments) parse_options!(parser, arguments) if arguments.size > 0 parser.options[:project_type] = arguments.shift.to_sym end parse_arguments!(parser, arguments) set_default_arguments(parser) parser.options end def parse_options!(parser, arguments) parser.parse! parser end def parse_arguments!(parser, arguments) if arguments.size == 1 parser.options[:project_name] = arguments.shift elsif arguments.size == 0 # default to the current directory. else raise Compass::Error, "Too many arguments were specified." end end def set_default_arguments(parser) parser.options[:framework] ||= :compass parser.options[:pattern] ||= "project" end end def is_project_creation? true end end end end ================================================ FILE: cli/lib/compass/commands/default.rb ================================================ module Compass module Commands module DefaultOptionsParser def set_options(opts) opts.on("--trace") do self.options[:trace] = true end opts.on("-?", "-h", "--help") do self.options[:command] = Proc.new do Help.new(working_path, options.merge(:help_command => "help")) end end opts.on("-q", "--quiet") do self.options[:quiet] = true end opts.on("-v", "--version") do self.options[:command] = Proc.new do PrintVersion.new(working_path, options) end end super end end class Default < Base class << self def option_parser(arguments) parser = Compass::Exec::CommandOptionParser.new(arguments) parser.extend(DefaultOptionsParser) end # def usage # $stderr.puts caller.join("\n") # "XXX" # end def parse!(arguments) parser = option_parser(arguments) parser.parse! parser.options[:command] ||= Proc.new do Help.new(working_path, options.merge(:help_command => "help")) end parser.options end end def execute instance_eval(&options[:command]).execute end end end end ================================================ FILE: cli/lib/compass/commands/extension_command.rb ================================================ require 'fileutils' require 'compass/commands/base' module Compass module Commands module ExtensionsOptionParser def set_options(opts) opts.banner = %Q{ Usage: compass extension install EXTENSION_NAME [options] compass extension uninstall EXTENSION_NAME [options] compass extension list Description: Manage the list of extensions on your system. Compass to all of your compass projects. Example: compass extension install sassy-buttons compass extension uninstall sassy-buttons } super end end class ExtensionCommand < Base register :extension class << self def option_parser(arguments) parser = Compass::Exec::CommandOptionParser.new(arguments) parser.extend(ExtensionsOptionParser) end def usage option_parser([]).to_s end def description(command) "Manage the list of compass extensions on your system" end def parse!(arguments) {:arguments => arguments} end end include InstallerCommand def initialize(working_path, options) super(working_path, options) end # all commands must implement perform def perform require 'rubygems/gem_runner' Gem::GemRunner.new.run(options[:arguments]) end end end end ================================================ FILE: cli/lib/compass/commands/help.rb ================================================ module Compass module Commands module HelpOptionsParser def set_options(opts) banner = %Q{Usage: compass help [command] Description: The Compass Stylesheet Authoring Framework helps you build and maintain your stylesheets and makes it easy for you to use stylesheet libraries provided by others. Donating: Compass is charityware. If you find it useful please make a tax deductable donation: http://umdf.org/compass To get help on a particular command please specify the command. } primary_commands = Compass::Commands.all.select do |c| cmd = Compass::Commands[c] cmd.respond_to?(:primary) && cmd.primary end other_commands = Compass::Commands.all - primary_commands banner << command_list("Primary Commands:", primary_commands) banner << command_list("Other Commands:", other_commands) banner << "\nAvailable Frameworks & Patterns:\n\n" banner << Compass::Frameworks.pretty_print banner << "\nGlobal Options:\n" opts.banner = banner super end def command_list(header, commands) list = "#{header}\n" commands.sort_by{|c| c.to_s}.each do |command| list << " * #{command}" if Compass::Commands[command].respond_to? :description list << "\t- #{Compass::Commands[command].description(command)}" end list << "\n" end list end end class Help < Base register :help class << self def option_parser(arguments) parser = Compass::Exec::CommandOptionParser.new(arguments) parser.extend(Compass::Exec::GlobalOptionsParser) parser.extend(HelpOptionsParser) end def usage option_parser([]).to_s end def description(command) "Get help on a compass command or extension" end def parse!(arguments) parser = option_parser(arguments) parser.parse! parser.options[:help_command] = arguments.shift || 'help' parser.options end end def execute if Compass::Commands.command_exists? options[:help_command] $command = options[:help_command] puts Compass::Commands[options[:help_command]].usage $command = "help" elsif Compass::Frameworks.template_exists? options[:help_command] puts Compass::Frameworks.template_usage(options[:help_command]) else raise OptionParser::ParseError, "No such command: #{options[:help_command]}" end end end end end ================================================ FILE: cli/lib/compass/commands/imports.rb ================================================ module Compass module Commands class Imports < ProjectBase attr_accessor :options register :imports def initialize(working_path, options) super end def execute print ::Compass::Frameworks::ALL.map{|f| "-I #{f.stylesheets_directory}" }.join(' ') end class << self def description(command) "Emit an imports suitable for passing to the sass command-line." end def usage "Usage: compass imports\n\n" + "Prints out the imports known to compass.\n"+ "Useful for passing imports to the sass command line:\n" + " sass -r compass `compass imports` a_file_using_compass.sass" end def parse!(arguments) if arguments.join("").strip.size > 0 raise OptionParser::ParseError, "This command takes no options or arguments." else {} end end end end end end ================================================ FILE: cli/lib/compass/commands/installer_command.rb ================================================ require 'compass/installers' module Compass module Commands module InstallerCommand include Compass::Installers def configure! add_project_configuration Compass.add_configuration(options, 'command_line') Compass.discover_extensions! Compass.add_configuration(installer.completed_configuration, 'installer') end def app @app ||= Compass::AppIntegration.lookup(Compass.configuration.project_type) end def installer @installer ||= if options[:bare] Compass::Installers::BareInstaller.new(*installer_args) else app.installer(*installer_args) end end def installer_args [template_directory(options[:pattern] || "project"), project_directory, options] end end end end ================================================ FILE: cli/lib/compass/commands/interactive.rb ================================================ require 'compass/commands/project_base' require 'compass/commands/update_project' module Compass module Commands module InteractiveOptionsParser def set_options(opts) opts.banner = %Q{ Usage: compass interactive [path/to/project] [options] Description: Interactively evaluate SassScript Options: }.strip.split("\n").map{|l| l.gsub(/^ {0,10}/,'')}.join("\n") super end end class Interactive < ProjectBase register :interactive def initialize(working_path, options) super end def perform require 'sass/repl' Sass::Repl.new.run end class << self def option_parser(arguments) parser = Compass::Exec::CommandOptionParser.new(arguments) parser.extend(Compass::Exec::GlobalOptionsParser) parser.extend(Compass::Exec::ProjectOptionsParser) parser.extend(InteractiveOptionsParser) end def usage option_parser([]).to_s end def description(command) "Interactively evaluate SassScript" end def parse!(arguments) parser = option_parser(arguments) parser.parse! parser.options end end end end end ================================================ FILE: cli/lib/compass/commands/list_frameworks.rb ================================================ module Compass module Commands class ListFrameworks < ProjectBase attr_accessor :options register :frameworks def initialize(working_path, options) super end def execute if options[:quiet] Compass::Frameworks::ALL.each do |framework| puts framework.name unless framework.name =~ /^_/ end else puts "Available Frameworks & Patterns:\n\n" puts Compass::Frameworks.pretty_print end end class << self def option_parser(arguments) parser = Compass::Exec::CommandOptionParser.new(arguments) parser.extend(Compass::Exec::GlobalOptionsParser) end def usage option_parser([]).to_s end def description(command) "List the available frameworks" end def parse!(arguments) parser = option_parser(arguments) parser.parse! parser.options end end end end end ================================================ FILE: cli/lib/compass/commands/print_version.rb ================================================ module Compass module Commands module VersionOptionsParser def set_options(opts) opts.banner = %Q{Usage: compass version [options] Options: } opts.on_tail("-?", "-h", "--help", "Print out this message.") do puts opts exit end opts.on("-q", "--quiet", "Just print the version string.") do self.options[:quiet] = true end opts.on("--major", "Print the major version number") do self.options[:major] = true self.options[:custom] = true end opts.on("--minor", "Print up to the minor version number") do self.options[:major] = true self.options[:minor] = true self.options[:custom] = true end opts.on("--patch", "Print up to the patch version number") do self.options[:major] = true self.options[:minor] = true self.options[:patch] = true self.options[:custom] = true end end end class PrintVersion < Base register :version class << self def option_parser(arguments) parser = Compass::Exec::CommandOptionParser.new(arguments) parser.extend(VersionOptionsParser) end def usage option_parser([]).to_s end def description(command) "Print out version information" end def parse!(arguments) parser = option_parser(arguments) parser.parse! parser.options end def long_output_string lines = [] lines << "Compass #{::Compass.version[:string]}" if name = ::Compass.version[:name] lines.last << " (#{name})" end lines << "Copyright (c) 2008-#{Time.now.year} Chris Eppstein" lines << "Released under the MIT License." lines << "Compass is charityware." lines << "Please make a tax deductable donation for a worthy cause: http://umdf.org/compass" lines.join("\n") end end attr_accessor :options def initialize(working_path, options) self.options = options end def execute if options[:custom] version = "" version << "#{Compass.version[:major]}" if options[:major] version << ".#{Compass.version[:minor]}" if options[:minor] version << ".#{Compass.version[:patch]}" if options[:patch] puts version elsif options[:quiet] puts ::Compass.version[:string] else puts self.class.long_output_string end end end end end ================================================ FILE: cli/lib/compass/commands/project_base.rb ================================================ require 'fileutils' require 'pathname' require 'compass/commands/base' require 'compass/commands/installer_command' module Compass module Commands class ProjectBase < Base attr_accessor :project_directory, :project_name, :options def initialize(working_path, options = {}) super(working_path, options) self.project_name = determine_project_name(working_path, options) Compass.add_configuration({:project_path => determine_project_directory(working_path, options)}, "implied") configure! end def execute super end protected def configure! add_project_configuration Compass.add_configuration(options, "command_line") Compass.discover_extensions! unless skip_extension_discovery? end def add_project_configuration defaults = Compass.configuration_for(options, "cli_defaults") if options[:project_type] project_type_config = Compass.configuration_for(options[:project_type]) project_type_config.inherit_from!(Compass.default_configuration) defaults.inherit_from!(project_type_config) end Compass.add_project_configuration(options[:configuration_file], :defaults => defaults) do options[:project_type] end end def projectize(path) Compass.projectize(path) end def project_directory Compass.configuration.project_path end def project_css_subdirectory Compass.configuration.css_dir end def project_src_subdirectory Compass.configuration.sass_dir end def project_images_subdirectory Compass.configuration.images_dir end def assert_project_directory_exists! if File.exists?(project_directory) && !File.directory?(project_directory) raise Compass::FilesystemConflict.new("#{project_directory} is not a directory.") elsif !File.directory?(project_directory) raise Compass::Error.new("#{project_directory} does not exist.") end end private def determine_project_name(working_path, options) if options[:project_name] File.basename(strip_trailing_separator(options[:project_name])) else File.basename(working_path) end end def determine_project_directory(working_path, options) if options[:project_name] if absolute_path?(options[:project_name]) options[:project_name] else File.join(working_path, options[:project_name]) end else working_path end end def absolute_path?(path) # Pretty basic implementation path.index(File::SEPARATOR) == 0 || path.index(':') == 1 end def skip_extension_discovery? false end end end end ================================================ FILE: cli/lib/compass/commands/project_stats.rb ================================================ require 'compass/commands/project_base' require 'compass/commands/update_project' module Compass module Commands module StatsOptionsParser def set_options(opts) opts.banner = %Q{ Usage: compass stats [path/to/project] [options] Description: Compile project at the path specified (or the current directory if not specified) and then compute statistics for the sass and css files in the project. Options: }.strip.split("\n").map{|l| l.gsub(/^ {0,10}/,'')}.join("\n") super end end class ProjectStats < UpdateProject register :stats def initialize(working_path, options) super assert_project_directory_exists! end def perform super require 'compass/stats' compiler = new_compiler_instance sass_files = sorted_sass_files(compiler) total_label = "Total (#{sass_files.size} files):" rows = [[ :-, :-, :-, :-, :-, :-, :-, :-, :- ], [ 'Filename', 'Rules', 'Properties', 'Mixins Defs', 'Mixins Used', 'Filesize', 'CSS Selectors', 'CSS Properties', 'CSS Filesize' ], [ :-, :-, :-, :-, :-, :-, :-, :-, :- ]] maximums = [ total_label.length, 5, 10, 14, 11, 13, 13, 14, 14 ] alignments = [ :left, :right, :right, :right, :right, :right, :right, :right, :right ] delimiters = [ ['| ', ' |'], [' ', ' |'], [' ', ' |'], [' ', ' |'], [' ', ' |'], [' ', ' |'], [' ', ' |'], [' ', ' |'], [' ', ' |'] ] formatters = [ nil, nil, nil, nil, nil, :kb, nil, nil, :kb ] totals = [ total_label, 0, 0, 0, 0, 0, 0, 0, 0 ] columns = rows.first.size sass_files.each do |sass_file| css_file = compiler.corresponding_css_file(sass_file) unless sass_file[0..0] == '_' row = filename_columns(sass_file) row += sass_columns(sass_file) row += css_columns(css_file) row.each_with_index do |c, i| maximums[i] = [maximums[i].to_i, c.size].max totals[i] = totals[i] + c.to_i if i > 0 end rows << row end rows << [:-] * columns rows << totals.map{|t| t.to_s} rows << [:-] * columns rows.each do |row| row.each_with_index do |col, i| print pad(col, maximums[i], :align => alignments[i], :left => delimiters[i].first, :right => delimiters[i].last, :formatter => formatters[i]) end print "\n" end if @missing_css_parser puts "\nInstall #{@missing_css_parser} to enable stats on your css files:\n\n\tgem install #{@missing_css_parser}" end end def pad(c, max, options = {}) options[:align] ||= :left if c == :- filler = '-' c = '' else filler = ' ' end c = send(:"format_#{options[:formatter]}", c) if options[:formatter] spaces = max - c.size filled = filler * [spaces,0].max "#{options[:left]}#{filled if options[:align] == :right}#{c}#{filled if options[:align] == :left}#{options[:right]}" end def format_kb(v) return v unless v =~ /^\d+$/ v = Integer(v) if v < 1024 "#{v} B" else v = v / 1024.0 "#{v.ceil} KB" end end def sorted_sass_files(compiler) sass_files = compiler.sass_files sass_files.map! do |s| filename = Compass.deprojectize(s, File.join(Compass.configuration.project_path, Compass.configuration.sass_dir)) [s, File.dirname(filename), File.basename(filename)] end sass_files = sass_files.sort_by do |s,d,f| File.join(d, f[0] == ?_ ? f[1..-1] : f) end sass_files.map!{|s,d,f| s} end def filename_columns(sass_file) filename = Compass.deprojectize(sass_file, working_path) [filename] end def sass_columns(sass_file) sf = Compass::Stats::SassFile.new(sass_file) sf.analyze! %w(rule_count prop_count mixin_def_count mixin_count file_size).map do |t| sf.send(t).to_s end end def css_columns(css_file) if File.exists?(css_file) cf = Compass::Stats::CssFile.new(css_file) cf.analyze! %w(selector_count prop_count file_size).map do |t| cf.send(t).to_s end else return [ '--', '--' , '--'] end rescue LoadError => e @missing_css_parser = e.message =~ /iconv/ ? "iconv" : "css_parser" return [ 'DISABLED', 'DISABLED', 'DISABLED' ] end class << self def option_parser(arguments) parser = Compass::Exec::CommandOptionParser.new(arguments) parser.extend(Compass::Exec::GlobalOptionsParser) parser.extend(Compass::Exec::ProjectOptionsParser) parser.extend(StatsOptionsParser) end def usage option_parser([]).to_s end def description(command) "Report statistics about your stylesheets" end def primary; false; end def parse!(arguments) parser = option_parser(arguments) parser.parse! parse_arguments!(parser, arguments) parser.options end def parse_arguments!(parser, arguments) if arguments.size == 1 parser.options[:project_name] = arguments.shift elsif arguments.size == 0 # default to the current directory. else raise Compass::Error, "Too many arguments were specified." end end end end end end ================================================ FILE: cli/lib/compass/commands/project_structure.rb ================================================ require 'compass/commands/project_base' require 'compass/commands/update_project' module Compass module Commands module StructureOptionsParser def set_options(opts) opts.banner = %Q{ Usage: compass structure [path/to/project] [options] Description: Display the import structure of your stylesheets. Options: }.strip.split("\n").map{|l| l.gsub(/^ {0,10}/,'')}.join("\n") super end end class ProjectStats < UpdateProject register :structure def initialize(working_path, options) super assert_project_directory_exists! end def perform @compiler = new_compiler_instance (options[:sass_files] || sorted_sass_files).each do |sass_file| print_tree(Compass.projectize(sass_file)) end end def print_tree(file, depth = 0, importer = @compiler.importer) puts ((depth > 0 ? "| " : " ") * depth) + "+- " + Compass.deprojectize(file) @compiler.staleness_checker.send(:compute_dependencies, file, importer).each do |(dep, dep_importer)| print_tree(dep, depth + 1, dep_importer)# unless Compass.deprojectize(dep)[0...1] == "/" end end def sorted_sass_files sass_files = @compiler.sass_files sass_files.map! do |s| filename = Compass.deprojectize(s, File.join(Compass.configuration.project_path, Compass.configuration.sass_dir)) [s, File.dirname(filename), File.basename(filename)] end sass_files = sass_files.sort_by do |s,d,f| File.join(d, f[0] == ?_ ? f[1..-1] : f) end sass_files.map!{|s,d,f| s} end class << self def option_parser(arguments) parser = Compass::Exec::CommandOptionParser.new(arguments) parser.extend(Compass::Exec::GlobalOptionsParser) parser.extend(Compass::Exec::ProjectOptionsParser) parser.extend(StructureOptionsParser) end def usage option_parser([]).to_s end def description(command) "Report statistics about your stylesheets" end def primary; false; end def parse!(arguments) parser = option_parser(arguments) parser.parse! parse_arguments!(parser, arguments) parser.options end def parse_arguments!(parser, arguments) if arguments.size > 0 parser.options[:project_name] = arguments.shift if File.directory?(arguments.first) parser.options[:sass_files] = arguments end end end end end end ================================================ FILE: cli/lib/compass/commands/registry.rb ================================================ module Compass::Commands module Registry def register(name, command_class) @commands ||= Hash.new @commands[name.to_sym] = command_class end def get(name) return unless name @commands ||= Hash.new @commands[name.to_sym] || @commands[abbreviation_of(name)] end def abbreviation_of(name) re = /^#{Regexp.escape(name)}/ matching = @commands.keys.select{|k| k.to_s =~ re} if matching.size == 1 matching.first elsif name =~ /^-/ nil elsif matching.size > 1 raise Compass::Error, "Ambiguous abbreviation '#{name}'. Did you mean one of: #{matching.join(", ")}" else raise Compass::Error, "Command not found: #{name}" end end def abbreviation?(name) re = /^#{Regexp.escape(name)}/ @commands.keys.detect{|k| k.to_s =~ re} end def command_exists?(name) @commands ||= Hash.new name && (@commands.has_key?(name.to_sym) || abbreviation?(name)) end def all @commands.keys end alias_method :[], :get alias_method :[]=, :register end extend Registry end ================================================ FILE: cli/lib/compass/commands/sprite.rb ================================================ require 'compass/commands/project_base' require 'compass/commands/update_project' module Compass module Commands module SpriteOptionsParser def set_options(opts) opts.on("-f SPRITE_FILE") do |output_file| self.options[:output_file] = output_file end opts.on("--skip-overrides", "Skip the generation of sprite overrides") do |skip_overrides| self.options[:skip_overrides] = skip_overrides end opts.banner = %Q{ Usage: compass sprite [options] "images/path/to/sprites/*.png" Description: Generate a sprite import based on the given sprite directory. Alternatively, you can simply do this in your sass files: @import "sprite-folder/*.png" And a magical, custom made sprite file will be imported. Options: }.strip.split("\n").map{|l| l.gsub(/^ {0,10}/,'')}.join("\n") super end end class Sprite < ProjectBase register :sprite def initialize(working_path, options) super assert_project_directory_exists! end def perform relative_uri = options[:uri].gsub(/^#{Compass.configuration.images_dir}\//, '') name = Compass::SpriteImporter.sprite_name(relative_uri) sprites = Compass::SpriteImporter.new options[:output_file] ||= File.join(Compass.configuration.sass_path, "sprites", "_#{name}.#{Compass.configuration.preferred_syntax}") options[:skip_overrides] ||= false contents = Compass::SpriteImporter.content_for_images(relative_uri, name, options[:skip_overrides]) if options[:output_file][-4..-1] != "scss" contents = Sass::Engine.new(contents, Compass.sass_engine_options.merge(:syntax => :scss)).to_tree.to_sass end directory File.dirname(options[:output_file]) write_file options[:output_file], contents end class << self def option_parser(arguments) parser = Compass::Exec::CommandOptionParser.new(arguments) parser.extend(Compass::Exec::GlobalOptionsParser) parser.extend(Compass::Exec::ProjectOptionsParser) parser.extend(SpriteOptionsParser) end def usage option_parser([]).to_s end def description(command) "Generate an import for your sprites." end def parse!(arguments) parser = option_parser(arguments) parser.parse! parse_arguments!(parser, arguments) parser.options end def parse_arguments!(parser, arguments) parser.options[:uri] = arguments.shift unless arguments.size == 0 raise Compass::Error, "Please specify at least one image to sprite." end end end end end end ================================================ FILE: cli/lib/compass/commands/stamp_pattern.rb ================================================ require 'fileutils' require 'compass/commands/base' require 'compass/commands/update_project' module Compass module Commands module StampPatternOptionsParser def set_options(opts) opts.banner = %Q{Usage: compass install extension/pattern [path/to/project] [options] Description: Install an extension's pattern into your compass project Example: compass install blueprint/buttons Options: } opts.on("-x", "--syntax SYNTAX", [:sass, :scss], "Specify the syntax to use when generating stylesheets.", "One of sass or scss. Defaults to scss.") do |syntax| self.options[:preferred_syntax] = syntax end super end end class StampPattern < ProjectBase register :install class << self def option_parser(arguments) parser = Compass::Exec::CommandOptionParser.new(arguments) parser.extend(Compass::Exec::GlobalOptionsParser) parser.extend(Compass::Exec::ProjectOptionsParser) parser.extend(StampPatternOptionsParser) end def usage option_parser([]).to_s end def description(command) "Install an extension's pattern into your compass project" end def parse!(arguments) parser = option_parser(arguments) parser.parse! parse_arguments!(parser, arguments) parser.options end def parse_arguments!(parser, arguments) if arguments.size == 0 raise OptionParser::ParseError, "Please specify a pattern." end pattern = arguments.shift.split('/', 2) parser.options[:framework] = pattern[0] parser.options[:pattern] = pattern[1] if arguments.size > 0 parser.options[:project_name] = arguments.shift end if arguments.size > 0 raise OptionParser::ParseError, "Unexpected trailing arguments: #{arguments.join(" ")}" end end end include InstallerCommand def initialize(working_path, options) super(working_path, options) end # all commands must implement perform def perform installer.init installer.run(:skip_finalization => true, :skip_preparation => !is_project_creation?) UpdateProject.new(working_path, options).perform if installer.compilation_required? installer.finalize(options.merge(:create => is_project_creation?)) end def is_project_creation? false end def template_directory(pattern) File.join(framework.templates_directory, pattern) end end end end ================================================ FILE: cli/lib/compass/commands/unpack_extension.rb ================================================ require 'compass/commands/project_base' require 'fileutils' module Compass module Commands module ExtensionOptionsParser def set_options(opts) opts.banner = %Q{ Usage: compass unpack EXTENSION Description: Copy an extension into your extensions folder for easy access to the source code. This makes it easier to peruse the source in unfamiliar projects. It is not recommended that you change other extensions' source -- this makes it hard to take updates from the original author. The following extensions are available: FRAMEWORKS Options: }.strip.split("\n").map{|l| l.gsub(/^ {0,10}/,'')}.join("\n") opts.banner.gsub!(/FRAMEWORKS/,Compass::Frameworks.pretty_print(true)) super end end class UnpackExtension < ProjectBase register :unpack def initialize(working_path, options) super assert_project_directory_exists! end def perform framework = Compass::Frameworks[options[:framework]] unless framework raise Compass::Error, "No extension named \"#{options[:framework]}\" was found." end files = Dir["#{framework.path}/**/*"] extension_dir = File.join(Compass.configuration.extensions_path, framework.name) FileUtils.rm_rf extension_dir FileUtils.mkdir_p extension_dir write_file File.join(extension_dir, "DO_NOT_MODIFY"), readme(framework) files.each do |f| next if File.directory?(f) ending = f[(framework.path.size+1)..-1] destination = File.join(extension_dir, ending) FileUtils.mkdir_p(File.dirname(destination)) copy f, destination end puts "\nYou have unpacked \"#{framework.name}\"" puts puts readme(framework) end def readme(framework) %Q{| This is a copy of the "#{framework.name}" extension. | | It now overrides the original which was found here: | | #{framework.path} | | Unpacking an extension is useful when you need to easily peruse the | extension's source. You might find yourself tempted to change the | stylesheets here. If you do this, you'll find it harder to take | updates from the original author. Sometimes this seems like a good | idea at the time, but in a few months, you'll probably regret it. | | In the future, if you take an update of this framework, you'll need to run | | compass unpack #{framework.name} | | again or remove this unpacked extension. |}.gsub(/^\s*\| ?/,"") end def skip_extension_discovery? true end class << self def option_parser(arguments) parser = Compass::Exec::CommandOptionParser.new(arguments) parser.extend(Compass::Exec::GlobalOptionsParser) parser.extend(Compass::Exec::ProjectOptionsParser) parser.extend(ExtensionOptionsParser) end def usage option_parser([]).to_s end def description(command) "Copy an extension into your extensions folder." end def parse!(arguments) parser = option_parser(arguments) parser.parse! parse_arguments!(parser, arguments) parser.options end def parse_arguments!(parser, arguments) if arguments.size == 1 parser.options[:framework] = arguments.shift elsif arguments.size == 0 raise Compass::Error, "Please specify an extension to unpack." else raise Compass::Error, "Too many arguments were specified." end end end end end end ================================================ FILE: cli/lib/compass/commands/update_project.rb ================================================ require 'compass/commands/project_base' require 'compass/compiler' module Compass module Commands module CompileProjectOptionsParser def set_options(opts) opts.banner = %Q{ Usage: compass compile [path/to/project] [path/to/project/src/file.sass ...] [options] Description: compile project at the path specified or the current directory if not specified. Options: }.split("\n").map{|l| l.gsub(/^ */,'')}.join("\n") opts.on("--[no-]sourcemap", "Generate a sourcemap during compilation.") do |sm| self.options[:sourcemap] = sm end opts.on("--time", "Display compilation times.") do self.options[:time] = true end opts.on("--debug-info", "Turns on sass's debuging information") do self.options[:debug_info]= true end opts.on("--no-debug-info", "Turns off sass's debuging information") do self.options[:debug_info]= false end super end end class UpdateProject < ProjectBase register :compile def initialize(working_path, options) super assert_project_directory_exists! end def perform compiler = new_compiler_instance check_for_sass_files!(compiler) prepare_project!(compiler) compiler.compile! if compiler.error_count > 0 compiler.logger.red do compiler.logger.log "Compilation failed in #{compiler.error_count} files." end failed! end end def prepare_project!(compiler) if options[:project_name] Compass.configuration.project_path = File.expand_path(options[:project_name]) end if config_file = new_config?(compiler) compiler.logger.record :modified, relativize(config_file) compiler.logger.record :clean, relativize(Compass.configuration.css_path) compiler.clean! end end # Determines if the configuration file is newer than any css file def new_config?(compiler) config_file = Compass.detect_configuration_file return false unless config_file config_mtime = File.mtime(config_file) compiler.file_list.each do |(_, css_filename, _)| return config_file if File.exists?(css_filename) && config_mtime > File.mtime(css_filename) end nil end def check_for_sass_files!(compiler) file_list = compiler.file_list if file_list.empty? message = "Compass can't find any Sass files to compile.\nIs your compass configuration correct?.\nIf you're trying to start a new project, you have left off the directory argument.\n" message << "Run \"compass -h\" to get help." raise Compass::Error, message elsif missing = file_list.find {|(sass_file, _, _)| !File.exist?(sass_file)} raise Compass::Error, "File not found: #{missing[0]}" end end def new_compiler_instance Compass::SassCompiler.new(compiler_options) end def compiler_options transfer_options(options, {}, :time, :debug_info, :only_sass_files, :force, :quiet) end def transfer_options(from, to, *keys) keys.each do |k| to[k] = from[k] unless from[k].nil? end to end class << self def option_parser(arguments) parser = Compass::Exec::CommandOptionParser.new(arguments) parser.extend(Compass::Exec::GlobalOptionsParser) parser.extend(Compass::Exec::ProjectOptionsParser) parser.extend(CompileProjectOptionsParser) end def usage option_parser([]).to_s end def primary; true; end def description(command) "Compile Sass stylesheets to CSS" end def parse!(arguments) parser = option_parser(arguments) parser.parse! parse_arguments!(parser, arguments) parser.options end def parse_arguments!(parser, arguments) if arguments.size > 0 parser.options[:project_name] = arguments.shift if File.directory?(arguments.first) unless arguments.empty? parser.options[:only_sass_files] = absolutize(*arguments) end end end def absolutize(*paths) paths.map {|path| File.expand_path(path) } end end end end end ================================================ FILE: cli/lib/compass/commands/validate_project.rb ================================================ require 'compass/commands/project_base' require 'compass/commands/update_project' module Compass module Commands module ValidationOptionsParser def set_options(opts) opts.banner = %Q{ Usage: compass validate [path/to/project] [options] Description: Compile project at the path specified or the current directory if not specified and then validate the generated CSS. Options: }.strip.split("\n").map{|l| l.gsub(/^ {0,10}/,'')}.join("\n") super end end class ValidateProject < ProjectBase register :validate def initialize(working_path, options) super assert_project_directory_exists! end def perform require 'compass/validator' UpdateProject.new(working_path, options).perform Dir.chdir Compass.configuration.project_path do Validator.new(project_css_subdirectory).validate() end end class << self def option_parser(arguments) parser = Compass::Exec::CommandOptionParser.new(arguments) parser.extend(Compass::Exec::GlobalOptionsParser) parser.extend(Compass::Exec::ProjectOptionsParser) parser.extend(ValidationOptionsParser) end def usage option_parser([]).to_s end def description(command) "Validate your generated css." end def parse!(arguments) parser = option_parser(arguments) parser.parse! parse_arguments!(parser, arguments) parser.options end def parse_arguments!(parser, arguments) if arguments.size == 1 parser.options[:project_name] = arguments.shift elsif arguments.size == 0 # default to the current directory. else raise Compass::Error, "Too many arguments were specified." end end end end end end ================================================ FILE: cli/lib/compass/commands/watch_project.rb ================================================ # encoding: UTF-8 require 'fileutils' require 'pathname' require 'compass/commands/update_project' require "compass/sass_compiler" module Compass module Commands module WatchProjectOptionsParser def set_options(opts) super opts.banner = %Q{ Usage: compass watch [path/to/project] [path/to/project/src/file.sass ...] [options] Description: watch the project for changes and recompile when they occur. Options: }.split("\n").map{|l| l.gsub(/^ */,'')}.join("\n") opts.on("--poll", :NONE, "Check periodically if there's been changes.") do self.options[:poll] = 1 # check every 1 second. end end end class WatchProject < UpdateProject register :watch attr_accessor :last_update_time, :last_sass_files def perform compiler = new_compiler_instance compiler.logger.time = true if options[:time] prepare_project!(compiler) compiler.logger.log ">>> #{compiler.logger.color(:green)}Compass is watching for changes.#{compiler.logger.color(:clear)} #{compiler.logger.color(:red)}Press Ctrl-C to Stop.#{compiler.logger.color(:clear)}" begin compiler.watch!(:additional_watch_paths => additional_watch_paths, &method(:notify_watches)) happy_styling!(compiler.logger) rescue Interrupt happy_styling!(compiler.logger) end end def happy_styling!(logger) logger.log "\n#{logger.color(:yellow)}★★★ #{logger.color(:blue)}Happy Styling!#{logger.color(:yellow)} ★★★#{logger.color(:clear)}" end def compiler_options super.merge(:poll => options[:poll], :full_exception => true) end def additional_watch_paths Compass.configuration.watches.map do |watch| pathname = Pathname.new(File.join(Compass.configuration.project_path, watch.glob)) real_path = nil pathname.ascend do |p| if p.exist? real_path = p break end end real_path end.compact.uniq end def notify_watches(modified, added, removed) project_path = Compass.configuration.project_path files = {:modified => modified, :added => added, :removed => removed} run_once, run_each = Compass.configuration.watches.partition {|w| w.run_once_per_changeset?} run_once.each do |watcher| if file = files.values.flatten.detect{|f| watcher.match?(f) } action = files.keys.detect{|k| files[k].include?(file) } watcher.run_callback(project_path, relative_to(file, project_path), action) end end run_each.each do |watcher| files.each do |action, list| list.each do |file| if watcher.match?(file) watcher.run_callback(project_path, relative_to(file, project_path), action) end end end end end def relative_to(f, dir) Pathname.new(f).relative_path_from(Pathname.new(dir)) rescue ArgumentError # does not share a common path. f end class << self def description(command) "Compile Sass stylesheets to CSS when they change" end def option_parser(arguments) parser = Compass::Exec::CommandOptionParser.new(arguments) parser.extend(Compass::Exec::GlobalOptionsParser) parser.extend(Compass::Exec::ProjectOptionsParser) parser.extend(CompileProjectOptionsParser) parser.extend(WatchProjectOptionsParser) end end end end end ================================================ FILE: cli/lib/compass/commands/write_configuration.rb ================================================ require 'compass/commands/project_base' module Compass module Commands module ConfigurationOptionsParser def set_options(opts) opts.banner = %Q{ Usage: compass config [path/to/config_file.rb] [options] Description: Generate a configuration file for the options specified. Compass will recognize configuration files in the following locations relative to the project root: * #{Compass::Configuration::Helpers::KNOWN_CONFIG_LOCATIONS.join(" * ")} Any other location, and you'll need to specify it when working with the command line tool using the -c option. Options: }.strip.split("\n").map{|l| l.gsub(/^ {0,10}/,'')}.join("\n") opts.on("--debug [PROPERTY]", "Debug your configuration by printing out details.") do |prop| self.options[:debug] = prop.nil? ? true : prop.to_sym end opts.on("-p PROPERTY", "--property PROPERTY", "Print out the value of a particular configuration property") do |prop| self.options[:display] = prop.to_sym end super end end class WriteConfiguration < ProjectBase register :config include InstallerCommand def initialize(working_path, options) super assert_project_directory_exists! end def add_project_configuration Compass.add_project_configuration end def perform if options[:display] if Compass.configuration.respond_to?(options[:display]) puts Compass.configuration.send(options[:display]) else raise Compass::Error, "ERROR: configuration property '#{options[:display]}' does not exist" end elsif options[:debug] puts "Configuration sources:" c = Compass.configuration while c print c.name c = c.inherited_data print ", " if c end print "\n" Compass.configuration.debug.each do |prop, values| if options[:debug].is_a?(Symbol) next unless prop == options[:debug] end puts "***** #{prop} = #{values.first[:resolved].inspect} *****" [:default, :value, :raw, :resolved].each do |kind| puts "#{kind}: " + values.inject([]){|m, v| m << v[kind]}.map{|v| v.nil? ? '-' : v.inspect}.join(", ") end end else config_file = options[:configuration_file] config_file ||= Compass.detect_configuration_file config_file ||= Compass::Configuration::Helpers::KNOWN_CONFIG_LOCATIONS.first directory File.dirname(config_file) installer.write_configuration_files(config_file) end end def installer_args [nil, project_directory, options] end def explicit_config_file_must_be_readable? false end class << self def option_parser(arguments) parser = Compass::Exec::CommandOptionParser.new(arguments) parser.extend(Compass::Exec::GlobalOptionsParser) parser.extend(Compass::Exec::ProjectOptionsParser) parser.extend(ConfigurationOptionsParser) end def usage option_parser([]).to_s end def description(command) "Generate a configuration file for the provided command line options." end def parse!(arguments) parser = option_parser(arguments) parser.parse! parse_arguments!(parser, arguments) parser.options end def parse_arguments!(parser, arguments) if arguments.size == 1 parser.options[:configuration_file] = arguments.shift elsif arguments.size == 0 # default to the current directory. else raise Compass::Error, "Too many arguments were specified." end end end end end end ================================================ FILE: cli/lib/compass/commands.rb ================================================ module Compass::Commands end require 'compass/commands/registry' %w(base project_base default help list_frameworks update_project watch_project create_project clean_project extension_command imports installer_command print_version project_stats stamp_pattern sprite validate_project write_configuration interactive unpack_extension ).each do |lib| require "compass/commands/#{lib}" end Compass.discover_extensions! ================================================ FILE: cli/lib/compass/compiler.rb ================================================ require 'pathname' module Compass class Compiler include Actions attr_accessor :working_path, :from, :to, :options, :sass_options, :staleness_checker, :importer def initialize(working_path, from, to, options) Compass::Deprecation.deprecated!(:compass_compiler_constructor, "Compass::Compiler is deprecated. Use Compass::SassCompiler instead.") self.working_path = working_path.to_s self.from, self.to = File.expand_path(from), to self.logger = options.delete(:logger) sass_opts = options.delete(:sass) || {} self.options = options self.sass_options = options.dup self.sass_options.delete(:quiet) self.sass_options.update(sass_opts) self.sass_options[:cache_location] ||= determine_cache_location self.sass_options[:filesystem_importer] ||= Sass::Importers::Filesystem self.sass_options[:importer] = self.importer = self.sass_options[:filesystem_importer].new(from) self.sass_options[:compass] ||= {} self.sass_options[:compass][:logger] = self.logger self.sass_options[:compass][:environment] = Compass.configuration.environment self.sass_options[:compass][:compiler_in_use] = true reset_staleness_checker! end def reset_staleness_checker! self.staleness_checker = nil #Sass::Plugin::StalenessChecker.dependencies_cache = {} self.staleness_checker = Sass::Plugin::StalenessChecker.new(sass_options) end def determine_cache_location Compass.configuration.cache_path || Sass::Plugin.options[:cache_location] || File.join(working_path, ".sass-cache") end def sass_files(options = {}) exclude_partials = options.fetch(:exclude_partials, true) @sass_files = self.options[:sass_files] || Dir.glob(separate("#{from}/**/#{'[^_]' if exclude_partials}*.s[ac]ss")) end def relative_stylesheet_name(sass_file) sass_file[(from.length + 1)..-1] end def stylesheet_name(sass_file) if sass_file.index(from) == 0 sass_file[(from.length + 1)..-6].sub(/\.css$/,'') else raise Compass::Error, "You must compile individual stylesheets from the project directory." end end def css_files @css_files ||= sass_files.map{|sass_file| corresponding_css_file(sass_file)} end def sourcemap_files @sourcemap_files ||= sass_files.map{|sass_file| corresponding_sourcemap_file(sass_file)} end def corresponding_css_file(sass_file) "#{to}/#{stylesheet_name(sass_file)}.css" end def corresponding_sourcemap_file(sass_file) "#{to}/#{stylesheet_name(sass_file)}.css.map" end def target_directories css_files.map{|css_file| File.dirname(css_file)}.uniq.sort.sort_by{|d| d.length } end # Returns the sass file that needs to be compiled, if any. def out_of_date? sass_files.zip(css_files).each do |sass_filename, css_filename| return sass_filename if needs_update?(css_filename, sass_filename) end false end def needs_update?(css_filename, sass_filename) staleness_checker.stylesheet_needs_update?(css_filename, File.expand_path(sass_filename), importer) end # Determines if the configuration file is newer than any css file def new_config? config_file = Compass.detect_configuration_file return false unless config_file config_mtime = File.mtime(config_file) css_files.each do |css_filename| return config_file if File.exists?(css_filename) && config_mtime > File.mtime(css_filename) end nil end def reset! reset_staleness_checker! @sass_files = nil @css_files = nil @sourcemap_files = nil end def clean! remove options[:cache_location] css_files.zip(sourcemap_files).each do |css_file, sourcemap_file| remove css_file remove sourcemap_file end end def run failure_count = 0 if new_config? # Wipe out the cache and force compilation if the configuration has changed. remove options[:cache_location] if options[:cache_location] options[:force] = true end # Make sure the target directories exist target_directories.each {|dir| directory dir} # Compile each sass file. result = timed do sass_files.zip(css_files, sourcemap_files).each do |sass_filename, css_filename, sourcemap_filename| begin compile_if_required sass_filename, css_filename, sourcemap_filename rescue Sass::SyntaxError => e failure_count += 1 handle_exception(sass_filename, css_filename, e) end end end if options[:time] puts "Compilation took #{(result.__duration * 1000).round / 1000.0}s" end return failure_count end def compile_if_required(sass_filename, css_filename, sourcemap_filename = nil) if should_compile?(sass_filename, css_filename, sourcemap_filename) compile sass_filename, css_filename, sourcemap_filename else logger.record :unchanged, basename(sass_filename) unless options[:quiet] remove(sourcemap_filename) if sourcemap_filename && !options[:sourcemap] end end def timed(timed_thing = lambda {|res| res}) start_time = Time.now res = yield end_time = Time.now has_duration = timed_thing.call(res) has_duration.instance_variable_set("@__duration", end_time - start_time) def has_duration.__duration @__duration end res end # Compile one Sass file def compile(sass_filename, css_filename, sourcemap_filename = nil) css_content, sourcemap = logger.red do timed(lambda {|r| r[0]}) do engine = engine(sass_filename, css_filename, sourcemap_filename) if sourcemap_filename && options[:sourcemap] engine.render_with_sourcemap(relative_path(css_filename, sourcemap_filename)) else [engine.render, nil] end end end duration = options[:time] ? "(#{(css_content.__duration * 1000).round / 1000.0}s)" : "" write_file(css_filename, css_content, options.merge(:force => true, :extra => duration), sass_options[:unix_newlines]) Compass.configuration.run_stylesheet_saved(css_filename) if sourcemap && sourcemap_filename sourcemap_content = sourcemap.to_json(:css_path => css_filename, :sourcemap_path => sourcemap_filename) write_file(sourcemap_filename, sourcemap_content, options.merge(:force => true), sass_options[:unix_newlines]) Compass.configuration.run_sourcemap_saved(sourcemap_filename) elsif sourcemap_filename && File.exist?(sourcemap_filename) remove sourcemap_filename Compass.configuration.run_sourcemap_removed(sourcemap_filename) end end def relative_path(from_path, to_path) Pathname.new(to_path).relative_path_from(Pathname.new(from_path).dirname).to_s end def should_compile?(sass_filename, css_filename, sourcemap_filename = nil) return true if css_filename && !File.exist?(css_filename) return true if sourcemap_filename && options[:sourcemap] && !File.exist?(sourcemap_filename) options[:force] || needs_update?(css_filename, sass_filename) || (options[:sourcemap] && needs_update?(sourcemap_filename, sass_filename)) end # A sass engine for compiling a single file. def engine(sass_filename, css_filename, sourcemap_filename = nil) syntax = (sass_filename =~ /\.(s[ac]ss)$/) && $1.to_sym || :sass opts = sass_options.merge(:filename => sass_filename, :css_filename => css_filename, :syntax => syntax, :sourcemap_filename => sourcemap_filename) Sass::Engine.new(open(sass_filename).read, opts) end # Place the syntax error into the target css file, # formatted to display in the browser (in development mode) # if there's an error. def handle_exception(sass_filename, css_filename, e) exception_file = basename(e.sass_filename || sass_filename) file = basename(sass_filename) exception_file = nil if exception_file == file formatted_error = "(Line #{e.sass_line}#{ " of #{exception_file}" if exception_file}: #{e.message})" logger.record :error, file, formatted_error Compass.configuration.run_stylesheet_error(sass_filename, formatted_error) write_file css_filename, error_contents(e, sass_filename), options.merge(:force => true), sass_options[:unix_newlines] end # Haml refactored this logic in 2.3, this is backwards compatibility for either one def error_contents(e, sass_filename) if show_full_exception? e.sass_template = sass_filename Sass::SyntaxError.exception_to_css(e) else header = Sass::SyntaxError.send(:header_string, e, 1) < e raise e if e.is_a? SystemExit if e.is_a?(::Compass::Error) || e.is_a?(OptionParser::ParseError) $stderr.puts e.message else ::Compass::Exec::Helpers.report_error(e, @options || {}) end return 1 end end protected def perform! $command = args.shift command_class = Compass::Commands[$command] unless command_class args.unshift($command) $command = "help" command_class = Compass::Commands::Default end @options = if command_class.respond_to?("parse_#{$command}!") command_class.send("parse_#{$command}!", args) else command_class.parse!(args) end cmd = command_class.new(Dir.getwd, @options) cmd.execute cmd.successful? ? 0 : 1 rescue OptionParser::ParseError => e puts "Error: #{e.message}" puts command_class.usage if command_class.respond_to?(:usage) end end end ================================================ FILE: cli/lib/compass/exec.rb ================================================ require 'compass/dependencies' require 'optparse' require 'compass/logger' require 'compass/errors' require 'compass/actions' require 'compass/installers' require 'compass/commands' require 'rbconfig' require 'pathname' begin require 'win32console' if RbConfig::CONFIG['host_os'] =~ /mswin|mingw/ rescue LoadError $boring = true end module Compass::Exec end %w(helpers sub_command_ui global_options_parser project_options_parser command_option_parser).each do |lib| require "compass/exec/#{lib}" end ================================================ FILE: cli/lib/compass/generated_version.rb ================================================ module Compass # This file intentionall does nothing. # The compass build scripts put the release VERSION constant here. end ================================================ FILE: cli/lib/compass/installers/bare_installer.rb ================================================ module Compass module Installers class BareInstaller < Base def completed_configuration nil end def init directory targetize("") directory targetize(Compass.configuration.sass_dir) end def prepare end def install config_file ||= targetize('config.rb') write_file config_file, config_contents end def config_contents project_path, Compass.configuration.project_path = Compass.configuration.project_path, nil Compass.configuration.serialize ensure Compass.configuration.project_path = project_path end def finalize(options = {}) puts <<-NEXTSTEPS ********************************************************************* Congratulations! Your compass project has been created. You may now add sass stylesheets to the #{Compass.configuration.sass_dir} subdirectory of your project. Sass files beginning with an underscore are called partials and won't be compiled to CSS, but they can be imported into other sass stylesheets. You can configure your project by editing the config.rb configuration file. You must compile your sass stylesheets into CSS when they change. This can be done in one of the following ways: 1. To compile on demand: compass compile [path/to/project] 2. To monitor your project for changes and automatically recompile: compass watch [path/to/project] More Resources: * Website: http://compass-style.org/ * Sass: http://sass-lang.com * Community: http://groups.google.com/group/compass-users/ NEXTSTEPS end end end end ================================================ FILE: cli/lib/compass/installers/base.rb ================================================ module Compass module Installers class Base include Actions attr_accessor :template_path, :target_path, :working_path attr_accessor :options def initialize(template_path, target_path, options = {}) @template_path = template_path @target_path = target_path @working_path = Dir.getwd @options = options self.logger = options[:logger] end [:css_dir, :sass_dir, :images_dir, :javascripts_dir, :http_stylesheets_path, :fonts_dir, :preferred_syntax].each do |dir| define_method dir do Compass.configuration.send(dir) end define_method "#{dir}_without_default" do Compass.configuration.send("#{dir}_without_default") end end # Runs the installer. # Every installer must conform to the installation strategy of prepare, install, and then finalize. # A default implementation is provided for each step. def run(run_options = {}) prepare unless run_options[:skip_preparation] install unless options[:prepare] finalize(options.merge(run_options)) unless options[:prepare] || run_options[:skip_finalization] end # The default prepare method -- it is a no-op. # Generally you would create required directories, etc. def prepare end # The install method override this to install def install raise "Not Yet Implemented" end # The default finalize method -- it is a no-op. # This could print out a message or something. def finalize(options = {}) end def compilation_required? false end def pattern_name_as_dir "#{options[:pattern_name]}/" if options[:pattern_name] end def self.installer(type, installer_opts = {}, &locator) locator ||= lambda{|to| to} loc_method = "install_location_for_#{type}".to_sym define_method("simple_#{loc_method}", locator) define_method(loc_method) do |to, options| if options[:like] && options[:like] != type send("install_location_for_#{options[:like]}", to, options) else send("simple_#{loc_method}", to) end end define_method "install_#{type}" do |from, to, options| from = templatize(from) to = targetize(send(loc_method, to, options)) is_binary = installer_opts[:binary] || options[:binary] if is_binary copy from, to, nil, is_binary else contents = File.new(from).read if options.delete(:erb) ctx = TemplateContext.ctx(:to => to, :options => options) contents = process_erb(contents, ctx) end write_file to, contents end end end installer :stylesheet do |to| "#{sass_dir}/#{pattern_name_as_dir}#{to}" end def install_stylesheet(from, to, options) from = templatize(from) to = targetize(install_location_for_stylesheet(to, options)) contents = File.new(from).read if options.delete(:erb) ctx = TemplateContext.ctx(:to => to, :options => options) contents = process_erb(contents, ctx) end if preferred_syntax.to_s != from[-4..-1] # logger.record :convert, basename(from) tree = Sass::Engine.new(contents, Compass.sass_engine_options.merge(:syntax => from[-4..-1].intern)).to_tree contents = tree.send("to_#{preferred_syntax}") to[-4..-1] = preferred_syntax.to_s end write_file to, contents end installer :css do |to| "#{css_dir}/#{to}" end installer :image, :binary => true do |to| "#{images_dir}/#{to}" end installer :javascript do |to| "#{javascripts_dir}/#{to}" end installer :font do |to| "#{fonts_dir}/#{to}" end installer :file do |to| "#{pattern_name_as_dir}#{to}" end installer :html do |to| "#{pattern_name_as_dir}#{to}" end def install_directory(from, to, options) d = if within = options[:within] if respond_to?(within) targetize("#{send(within)}/#{to}") else raise Compass::Error, "Unrecognized location: #{within}" end else targetize(to) end directory d end alias install_html_without_haml install_html def install_html(from, to, options) if to =~ /\.haml$/ require 'haml' to = to[0..-(".haml".length+1)] if respond_to?(:install_location_for_html) to = install_location_for_html(to, options) end contents = File.read(templatize(from)) if options.delete(:erb) ctx = TemplateContext.ctx(:to => to, :options => options) contents = process_erb(contents, ctx) end Compass.configure_sass_plugin! html = Haml::Engine.new(contents, :filename => templatize(from)).render write_file(targetize(to), html, options) else install_html_without_haml(from, to, options) end end # returns an absolute path given a path relative to the current installation target. # Paths can use unix style "/" and will be corrected for the current platform. def targetize(path) strip_trailing_separator File.join(target_path, separate(path)) end # returns an absolute path given a path relative to the current template. # Paths can use unix style "/" and will be corrected for the current platform. def templatize(path) strip_trailing_separator File.join(template_path, separate(path)) end # Emits an HTML fragment that can be used to link to the compiled css files def stylesheet_links "" end end end end require 'compass/installers/bare_installer' require 'compass/installers/manifest_installer' ================================================ FILE: cli/lib/compass/installers/manifest.rb ================================================ module Compass module Installers class Manifest include Enumerable # A Manifest entry class Entry < Struct.new(:type, :from, :options) def to options[:to] || from end end attr_reader :options def initialize(manifest_file = nil, options = {}) @entries = [] @options = options @generate_config = true @compile_after_generation = true parse(manifest_file) if manifest_file end def self.known_extensions @known_extensions ||= {} end def self.plural_types @plural_types ||= {} end def self.type(t, options = {}) Array(options[:extensions]).each do |ext| self.known_extensions[ext] = t end self.plural_types[options[:plural]] = t if options[:plural] eval <<-END def #{t}(from, options = {}) @entries << Entry.new(:#{t}, from, options) end def has_#{t}? @entries.detect {|e| e.type == :#{t}} end def each_#{t} @entries.select {|e| e.type == :#{t}}.each {|e| yield e} end END end type :stylesheet, :plural => :stylesheets, :extensions => %w(scss sass) type :image, :plural => :images, :extensions => %w(png gif jpg jpeg tiff gif) type :javascript, :plural => :javascripts, :extensions => %w(js) type :font, :plural => :fonts, :extensions => %w(eot otf woff ttf) type :html, :plural => :html, :extensions => %w(html haml) type :file, :plural => :files type :directory, :plural => :directories def discover(type) type = self.class.plural_types[type] || type dir = File.dirname(@manifest_file) Dir.glob("#{dir}/**/*").each do |file| next if /manifest\.rb/ =~ file short_name = file[(dir.length+1)..-1] options = {} ext = if File.extname(short_name) == ".erb" options[:erb] = true File.extname(short_name[0..-5]) else File.extname(short_name) end[1..-1] file_type = self.class.known_extensions[ext] file_type = :file if file_type.nil? file_type = :directory if File.directory?(file) if type == :all || type == file_type send(file_type, short_name, options) end end end def help(value = nil) if value @help = value else @help end end attr_reader :welcome_message_options def welcome_message(value = nil, options = {}) if value @welcome_message = value @welcome_message_options = options else @welcome_message end end def welcome_message_options @welcome_message_options || {} end def description(value = nil) if value @description = value else @description end end # Enumerates over the manifest files def each @entries.each {|e| yield e} end def generate_config? @generate_config end def compile? @compile_after_generation end protected def no_configuration_file! @generate_config = false end def skip_compilation! @compile_after_generation = false end def with_manifest(manifest_file) @manifest_file = manifest_file yield ensure @manifest_file = nil end # parses a manifest file which is a ruby script # evaluated in a Manifest instance context def parse(manifest_file) with_manifest(manifest_file) do if File.exists?(manifest_file) open(manifest_file) do |f| eval(f.read, instance_binding, manifest_file) end else eval("discover :all", instance_binding, manifest_file) end end end def instance_binding binding end end end end ================================================ FILE: cli/lib/compass/installers/manifest_installer.rb ================================================ module Compass module Installers class ManifestInstaller < Base attr_accessor :manifest def initialize(template_path, target_path, options = {}) super @manifest = Manifest.new(manifest_file, options) if template_path end def manifest_file @manifest_file ||= File.join(template_path, "manifest.rb") end # Initializes the project to work with compass def init dirs = manifest.map do |entry| unless entry.type == :directory loc = send("install_location_for_#{entry.type}", entry.to, entry.options) File.dirname(loc) end end.compact if manifest.has_stylesheet? dirs << sass_dir dirs << css_dir end dirs.uniq.sort.each do |dir| directory targetize(dir) end end # The default install method. Calls install_ methods in the order specified by the manifest. def install manifest.each do |entry| send("install_#{entry.type}", entry.from, entry.to, entry.options) end end def stylesheet_links html = "\n" manifest.each_stylesheet do |stylesheet| # Skip partials. next if File.basename(stylesheet.from)[0..0] == "_" media = if stylesheet.options[:media] %Q{ media="#{stylesheet.options[:media]}"} end ss_line = %Q{ } if stylesheet.options[:condition] ss_line = " " end html << ss_line + "\n" end html << "" end end end end ================================================ FILE: cli/lib/compass/installers/template_context.rb ================================================ module Compass module Installers class TemplateContext def self.ctx(*arguments) new(*arguments).send(:get_binding) end def initialize(template, locals = {}) @template = template @locals = locals end def http_stylesheets_path config.http_stylesheets_path || config.default_for(:http_stylesheets_path) || config.http_root_relative(config.css_dir) end Compass::Configuration::ATTRIBUTES.each do |attribute| unless instance_methods.include?(attribute.to_s) define_method attribute do config.send(attribute) || config.default_for(attribute) end end end def config Compass.configuration end alias configuration config protected def get_binding @locals.each do |k, v| eval("#{k} = v") end binding end end end end ================================================ FILE: cli/lib/compass/installers.rb ================================================ %w(manifest template_context base manifest_installer bare_installer).each do |f| require "compass/installers/#{f}" end ================================================ FILE: cli/lib/compass/logger.rb ================================================ module Compass class Logger COLORS = { :clear => 0, :red => 31, :green => 32, :yellow => 33, :blue => 34 } ACTION_COLORS = { :error => :red, :warning => :yellow, :info => :green, :compile => :green, :overwrite => :yellow, :modified => :yellow, :clean => :yellow, :write => :green, :create => :green, :remove => :yellow, :delete => :yellow, :deleted => :yellow, :created => :yellow, :exists => :green, :directory => :green, :identical => :green, :convert => :green, :unchanged => :yellow } DEFAULT_ACTIONS = ACTION_COLORS.keys ACTION_CAN_BE_QUIET = { :error => false, :warning => true, :info => true, :compile => true, :overwrite => true, :modified => true, :clean => true, :write => true, :create => true, :remove => true, :delete => true, :deleted => true, :created => true, :exists => true, :directory => true, :identical => true, :convert => true, :unchanged => true } attr_accessor :actions, :options, :time def initialize(*actions) self.options = actions.last.is_a?(Hash) ? actions.pop : {} @actions = DEFAULT_ACTIONS.dup @actions += actions end # Record an action that has occurred def record(action, *arguments) return if options[:quiet] && ACTION_CAN_BE_QUIET[action] msg = "" if time msg << Time.now.strftime("%I:%M:%S.%3N %p") end msg << color(ACTION_COLORS[action]) if Compass.configuration.color_output msg << "#{action_padding(action)}#{action}" msg << color(:clear) if Compass.configuration.color_output msg << " #{arguments.join(' ')}" log msg end def green wrap(:green) { yield } end def red wrap(:red) { yield } end def yellow wrap(:yellow) { yield } end def wrap(c, reset_to = :clear) $stderr.write(color(c)) $stdout.write(color(c)) yield ensure $stderr.write(color(reset_to)) $stdout.write(color(reset_to)) $stdout.flush end def color(c) if Compass.configuration.color_output && c && COLORS.has_key?(c.to_sym) if defined?($boring) && $boring "" else "\e[#{COLORS[c.to_sym]}m" end else "" end end # Emit a log message without a trailing newline def emit(msg) print msg $stdout.flush end # Emit a log message with a trailing newline def log(msg) puts msg $stdout.flush end # add padding to the left of an action that was performed. def action_padding(action) ' ' * [(max_action_length - action.to_s.length), 0].max end # the maximum length of all the actions known to the logger. def max_action_length @max_action_length ||= actions.inject(0){|memo, a| [memo, a.to_s.length].max} end end class NullLogger < Logger def record(*args) end def log(msg) end def emit(msg) end end end ================================================ FILE: cli/lib/compass/quick_cache.rb ================================================ module QuickCache # cache a value in memory for just a few seconds # This can speed up reads of values that change relatively infrequently # but might be read many times in a short burst of reads. def quick_cache(key, ttl = 1) @quick_cache ||= {} if @quick_cache[key] && @quick_cache[key].first > Time.now - ttl @quick_cache[key].last else (@quick_cache[key] = [Time.now, yield]).last end end end ================================================ FILE: cli/lib/compass/rails.rb ================================================ # Rails requires compass by requiring this file. require 'compass' ================================================ FILE: cli/lib/compass/sass_compiler.rb ================================================ require 'sass/plugin' class Compass::SassCompiler include Compass::Actions attr_writer :logger attr_reader :quiet attr_reader :error_count attr_accessor :config attr_accessor :display_compilation_times attr_accessor :working_path attr_accessor :only_sass_files def initialize(options = {}, config = Compass.configuration) options = options.dup self.config = config self.display_compilation_times = options.delete(:time) self.working_path = options.delete(:working_path) || Dir.pwd self.only_sass_files = options.delete(:only_sass_files) || [] @quiet = options[:quiet] plugin_options = config.to_sass_plugin_options.merge(options) if only_sass_files.any? plugin_options[:template_location] = [] plugin_options[:load_paths] = config.sass_load_paths end plugin_options[:always_update] = true if options.delete(:force) plugin_options[:compass] ||= {} plugin_options[:compass][:logger] = logger @compiler = Sass::Plugin::Compiler.new(plugin_options) @start_times = {} @error_count = 0 public_methods(true).grep(/^when_/).each do |callback| @compiler.send(callback.to_s.sub(/^when_/, 'on_')) {|*args| send(callback, *args) } end end def compile! @compiler.update_stylesheets(individual_files) end def watch!(options = {}, &block) skip_initial_update = options.fetch(:skip_initial_update, false) begin @compiler.watch(individual_files, options.merge(:skip_initial_update => skip_initial_update), &block) rescue Sass::SyntaxError => e skip_initial_update = true retry end end def individual_files only_sass_files.map {|sass_file| [sass_file, corresponding_css_file(sass_file)]} end def clean! @compiler.clean(individual_files) end def file_list @compiler.file_list(individual_files) end def when_updating_stylesheets(individual_files) @start_times = {} @error_count = 0 end def when_compilation_starting(sass_file, css, sourcemap) @start_times[sass_file] = Time.now end def when_template_created(sass_file) logger.record :created, relativize(sass_file) end def when_template_deleted(sass_file) logger.record :deleted, relativize(sass_file) end def when_template_modified(sass_file) logger.record :modified, relativize(sass_file) end def when_updated_stylesheet(sass_file, css, sourcemap) if css && display_compilation_times && @start_times[sass_file] duration = ((Time.now - @start_times[sass_file]) * 1000).round / 1000.0 logger.record :write, "#{relativize(css)} (#{duration}s)" else logger.record :write, relativize(css) if css end config.run_stylesheet_saved(css) if css logger.record :write, relativize(sourcemap) if sourcemap config.run_sourcemap_saved(sourcemap) if sourcemap end def when_creating_directory(dirname) logger.record :directory, relativize(dirname) end def when_deleting_css(filename) logger.record :delete, relativize(filename) config.run_stylesheet_removed(filename) if filename end def when_deleting_sourcemap(filename) logger.record :delete, relativize(filename) config.run_sourcemap_removed(filename) if filename end def when_compilation_error(error, sass_file, css_file, sourcemap_file) @error_count += 1 if error.respond_to?(:sass_filename) error_filename = error.sass_filename || sass_file if relativize(error_filename) == relativize(sass_file) logger.record :error, "#{relativize(sass_file)} (Line #{error.sass_line}: #{error.message})" else logger.record :error, "#{relativize(sass_file)} (Line #{error.sass_line} of #{relativize(error_filename)}: #{error.message})" end else logger.record :error, "#{relativize(sass_file)} (#{error.backtrace.first}: #{error.message})" end config.run_stylesheet_error(sass_file, error.message) end def logger @logger ||= Compass::Logger.new(:quiet => quiet) end def corresponding_css_file(sass_file) "#{config.css_path}/#{stylesheet_name(sass_file)}.css" end def stylesheet_name(sass_file) if sass_file.index(config.sass_path) == 0 sass_file[(config.sass_path.length + 1)..-6].sub(/\.css$/,'') else raise Compass::Error, "Individual stylesheets must be in the sass directory." end end def sass_files(options = {}) @compiler.template_location_array.map do |(sass_dir, css_dir)| glob = options[:include_partials] ? File.join("**","*.s[ac]ss*") : File.join("**","[^_]*.s[ac]ss*") Dir.glob(File.join(sass_dir, glob)) end.flatten end end ================================================ FILE: cli/lib/compass/sass_extensions/functions/sprites.rb ================================================ module Compass::SassExtensions::Functions::Sprites extend Compass::SassExtensions::Functions::SassDeclarationHelper extend Sass::Script::Value::Helpers include Sass::Script::Value::Helpers ZERO = number(0) BOOL_FALSE = bool(false) VALID_SELECTORS = %w(hover active target focus) # Provides a consistent interface for getting a variable in ruby # from a keyword argument hash that accounts for underscores/dash equivalence # and allows the caller to pass a symbol instead of a string. module VariableReader def get_var(variable_name) self[variable_name.to_s.gsub(/-/,"_")] end end # Returns the width of the generated sprite map def sprite_width(map, sprite=nil) verify_map(map, 'sprite-width') file = get_sprite_file(map, sprite) width, _ = image_dimensions(file) number(width, "px") end declare :sprite_width, [:map] declare :sprite_width, [:map, :sprite] # Returns the height of the generated sprite map def sprite_height(map, sprite=nil) verify_map(map, 'sprite-height') file = get_sprite_file(map, sprite) _, height = image_dimensions(file) number(height, "px") end declare :sprite_height, [:map] declare :sprite_height, [:map, :sprite] # Returns a list of all sprite names def sprite_names(map) verify_map(map, 'sprite-names') list(map.sprite_names.map { |f| identifier(f) }, :comma) end declare :sprite_names, [:map] # Returns the system path of the sprite file def sprite_path(map) verify_map(map, 'sprite-path') identifier(map.filename) end declare :sprite_path, [:map] # Returns the sprite file as an inline image # @include "icon/*.png"; # #{$icon-sprite-base-class} { # background-image: inline-sprite($icon-sprites); # } def inline_sprite(map) verify_map(map, "sprite-url") map.generate path = map.filename inline_image_string(data(path), compute_mime_type(path)) end declare :inline_sprite, [:map] # Creates a Compass::SassExtensions::Sprites::SpriteMap object. A sprite map, when used in a property is the same # as calling sprite-url. So the following background properties are equivalent: # # $icons: sprite-map("icons/*.png"); # background: sprite-url($icons) no-repeat; # background: $icons no-repeat; # # The sprite map object will generate the sprite map image, if necessary, # the first time it is converted to a url. Simply constructing it has no side-effects. def sprite_map(glob, kwargs = {}) kwargs.extend VariableReader Compass::SassExtensions::Sprites::SpriteMap.from_uri(glob, self, kwargs) end declare :sprite_map, [:glob], :var_kwargs => true # Returns the image and background position for use in a single shorthand property: # # $icons: sprite-map("icons/*.png"); // contains icons/new.png among others. # background: sprite($icons, new) no-repeat; # # Becomes: # # background: url('/images/icons.png?12345678') 0 -24px no-repeat; # # If the `use_percentages` parameter is passed as true, percentages will be # used to position the sprite. Example output: # # background: url('/images/icons.png?12345678') 0 50% no-repeat; # def sprite(map, sprite, offset_x = ZERO, offset_y = ZERO, use_percentages = BOOL_FALSE) sprite = convert_sprite_name(sprite) verify_map(map) verify_sprite(sprite) url = sprite_url(map) position = sprite_position(map, sprite, offset_x, offset_y, use_percentages) list([url] + position.value, :space) end declare :sprite, [:map, :sprite] declare :sprite, [:map, :sprite, :offset_x] declare :sprite, [:map, :sprite, :offset_x, :offset_y] declare :sprite, [:map, :sprite, :offset_x, :offset_y, :use_percentages] # Returns the name of a sprite map # The name is derived from the folder than contains the sprites. def sprite_map_name(map) verify_map(map, "sprite-map-name") identifier(map.name) end declare :sprite_name, [:sprite] # Returns the path to the original image file for the sprite with the given name def sprite_file(map, sprite) sprite = convert_sprite_name(sprite) verify_map(map, "sprite") verify_sprite(sprite) if image = map.image_for(sprite.value) image_path = Pathname.new(File.expand_path(image.file)) images_path = Pathname.new(File.expand_path(Compass.configuration.images_path)) quoted_string(image_path.relative_path_from(images_path).to_s) else missing_image!(map, sprite) end end declare :sprite_file, [:map, :sprite] # Returns boolean if sprite has a parent def sprite_does_not_have_parent(map, sprite) sprite = convert_sprite_name(sprite) verify_map map verify_sprite sprite bool(map.image_for(sprite.value).parent.nil?) end declare :sprite_does_not_have_parent, [:map, :sprite] #return the name of the selector file def sprite_selector_file(map, sprite, selector) sprite = convert_sprite_name(sprite) image = map.image_for(sprite) if map.send(:"has_#{selector.value}?", sprite.value) return identifier(image.send(selector.value).name) end raise Sass::SyntaxError, "Sprite: #{sprite.value} does not have a #{selector} state" end declare :sprite_selector_file, [:map, :sprite, :selector] # Returns boolean if sprite has the selector def sprite_has_selector(map, sprite, selector) sprite = convert_sprite_name(sprite) verify_map map verify_sprite sprite unless VALID_SELECTORS.include?(selector.value) raise Sass::SyntaxError, "Invalid Selctor did you mean one of: #{VALID_SELECTORS.join(', ')}" end bool map.send(:"has_#{selector.value}?", sprite.value) end declare :sprite_has_selector, [:map, :sprite, :selector] # Determines if the CSS selector is valid IDENTIFIER_RX = /\A#{Sass::SCSS::RX::IDENT}\Z/ def sprite_has_valid_selector(selector) unless selector.value =~ IDENTIFIER_RX raise Sass::SyntaxError, "#{selector} must be a legal css identifier" end bool true end # Returns a url to the sprite image. def sprite_url(map) verify_map(map, "sprite-url") map.generate generated_image_url(identifier("#{map.path}-s#{map.uniqueness_hash}.png")) end declare :sprite_url, [:map] # Returns the position for the original image in the sprite. # This is suitable for use as a value to background-position: # # $icons: sprite-map("icons/*.png"); # background-position: sprite-position($icons, new); # # Might generate something like: # # background-position: 0 -34px; # # You can adjust the background relative to this position by passing values for # `$offset-x` and `$offset-y`: # # $icons: sprite-map("icons/*.png"); # background-position: sprite-position($icons, new, 3px, -2px); # # Would change the above output to: # # background-position: 3px -36px; # # If you set the `use_percentages` parameter to true, the position will be # expressed in percentages. An example: # # background-position: sprite-position($icons, new, 0, 0, true); # # Would result in something like this: # # background-position: 0 42%; # def sprite_position(map, sprite = nil, offset_x = ZERO, offset_y = ZERO, use_percentages = BOOL_FALSE) assert_type offset_x, :Number assert_type offset_y, :Number sprite = convert_sprite_name(sprite) verify_map(map, "sprite-position") unless sprite.is_a?(Sass::Script::Value::String) || sprite.is_a?(Sass::Script::Value::Number) raise Sass::SyntaxError, %Q(The second argument to sprite-position must be a sprite name. See http://beta.compass-style.org/help/tutorials/spriting/ for more information.) end image = map.image_for(sprite.value) unless image missing_image!(map, sprite) end if use_percentages.value xdivis = map.width - image.width; x = (offset_x.value + image.left.to_f) / (xdivis.nonzero? || 1) * 100 x = x == 0 ? number(x) : number(x, "%") ydivis = map.height - image.height; y = (offset_y.value + image.top.to_f) / (ydivis.nonzero? || 1) * 100 y = y == 0 ? number(y) : number(y, "%") else if offset_x.unit_str == "%" x = offset_x # CE: Shouldn't this be a percentage of the total width? else x = offset_x.value - image.left x = x == 0 ? number(x) : number(x, "px") end y = offset_y.value - image.top y = y == 0 ? number(y) : number(y, "px") end list(x, y, :space) end declare :sprite_position, [:map] declare :sprite_position, [:map, :sprite] declare :sprite_position, [:map, :sprite, :offset_x] declare :sprite_position, [:map, :sprite, :offset_x, :offset_y] declare :sprite_position, [:map, :sprite, :offset_x, :offset_y, :use_percentages] protected def get_sprite_file(map, sprite=nil) if sprite map.image_for(sprite).file else map.filename end end def reversed_color_names if Sass::Script::Value::Color.const_defined?(:HTML4_COLORS_REVERSE) Sass::Script::Value::Color::HTML4_COLORS_REVERSE else Sass::Script::Value::Color::COLOR_NAMES_REVERSE end end def convert_sprite_name(sprite) case sprite when Sass::Script::Value::Color rgb = if reversed_color_names.keys.first.size == 3 sprite.rgb else # Sass 3.3 includes the alpha channel sprite.rgba end identifier(reversed_color_names[rgb]) when Sass::Script::Value::Bool identifier(sprite.to_s) else sprite end end def verify_map(map, error = "sprite") unless map.is_a?(Compass::SassExtensions::Sprites::SpriteMap) missing_sprite!(error) end end def verify_sprite(sprite) unless sprite.is_a?(Sass::Script::Value::String) || sprite.is_a?(Sass::Script::Value::Number) raise Sass::SyntaxError, %Q(The second argument to sprite() must be a sprite name. See http://beta.compass-style.org/help/tutorials/spriting/ for more information.) end end def missing_image!(map, sprite) raise Sass::SyntaxError, "No sprite called #{sprite} found in sprite map #{map.path}/#{map.name}. Did you mean one of: #{map.sprite_names.join(", ")}" end def missing_sprite!(function_name) raise Sass::SyntaxError, %Q(The first argument to #{function_name}() must be a sprite map. See http://beta.compass-style.org/help/tutorials/spriting/ for more information.) end end ================================================ FILE: cli/lib/compass/sass_extensions/functions.rb ================================================ module Compass::SassExtensions::Functions module SassDeclarationHelper def declare(*args) Sass::Script::Functions.declare(*args) end end end %w(sprites).each do |func| require "compass/sass_extensions/functions/#{func}" end module Sass::Script::Functions include Compass::SassExtensions::Functions::Sprites end ================================================ FILE: cli/lib/compass/sass_extensions/sprites/engines/chunky_png_engine.rb ================================================ begin require 'oily_png' rescue LoadError require 'chunky_png' end module Compass module SassExtensions module Sprites class ChunkyPngEngine < Compass::SassExtensions::Sprites::Engine def construct_sprite @canvas = ChunkyPNG::Image.new(width, height, ChunkyPNG::Color::TRANSPARENT) images.each do |image| input_png = begin ChunkyPNG::Image.from_file(image.file) rescue ChunkyPNG::SignatureMismatch raise Compass::SpriteException, "You have provided a file that does not have a PNG signature. Only PNG files are supported by the default sprite engine" end canvas.replace! input_png, image.left, image.top end end def save(filename) if canvas.nil? construct_sprite end canvas.save(filename, Compass.configuration.chunky_png_options) end end end end end ================================================ FILE: cli/lib/compass/sass_extensions/sprites/engines.rb ================================================ module Compass module SassExtensions module Sprites class Engine attr_accessor :width, :height, :images, :canvas def initialize(width, height, images) @width, @height, @images = width, height, images @canvas = nil end def construct_sprite raise ::Compass::Error, "You must implement construct_sprite" end def save(filename) raise ::Compass::Error, "You must implement save(filename)" end end end end end require 'compass/sass_extensions/sprites/engines/chunky_png_engine' ================================================ FILE: cli/lib/compass/sass_extensions/sprites/image.rb ================================================ module Compass module SassExtensions module Sprites class Image include Sass::Script::Value::Helpers ACTIVE = %r{[_-]active$} TARGET = %r{[_-]target$} HOVER = %r{[_-]hover$} FOCUS = %r{[_-]focus$} PARENT = %r{(.+)[-_](.+)$} REPEAT_X = 'repeat-x' REPEAT_Y = 'repeat-y' NO_REPEAT = 'no-repeat' VALID_REPEATS = [REPEAT_Y, REPEAT_X, NO_REPEAT] attr_reader :relative_file, :options, :base, :name attr_accessor :top, :left def initialize(base, relative_file, options) @base, @relative_file, @options = base, relative_file, options @left = @top = 0 @name = File.basename(relative_file, '.png') end # The Full path to the image def file @file ||= find_file end def find_file Compass.configuration.sprite_load_path.compact.each do |path| f = File.join(path, relative_file) if File.exists?(f) return f end end end # Width of the image def width dimensions.first end def size @size ||= File.size(file) end # Height of the image def height dimensions.last end def get_var_file(var) options.get_var "#{base.name}_#{name}_#{var}" end # Value of $#{name}-repeat or $repeat def repeat @repeat ||= begin rep = (get_var_file("repeat") || options.get_var("repeat") || identifier(NO_REPEAT)).value unless VALID_REPEATS.include? rep raise SpriteException, "Invalid option for repeat \"#{rep}\" - valid options are #{VALID_REPEATS.join(', ')}" end rep end end def repeat_x? repeat == REPEAT_X end def repeat_y? repeat == REPEAT_Y end def no_repeat? repeat == NO_REPEAT end # Value of $#{name}-position or $position defaults to 0px def position @position ||= get_var_file("position") || options.get_var("position") || number(0, "px") end # Offset within the sprite def offset @offset ||= (position.unitless? || position.unit_str == "px") ? position.value : 0 end # Spacing between this image and the next def spacing @spacing ||= (get_var_file("spacing") || options.get_var("spacing") || number(0, 'px')).value end # MD5 hash of this file def digest Digest::MD5.file(file).hexdigest end # mtime of this file def mtime File.mtime(file) end # Is hover selector def hover? name =~ HOVER end # Hover selector Image object if exsists def hover base.get_magic_selector_image(name, 'hover') end # Is target selector def target? name =~ TARGET end # Target selector Image object if exsists def target base.get_magic_selector_image(name, 'target') end # Is active selector def active? name =~ ACTIVE end # Active selector Image object if exsists def active base.get_magic_selector_image(name, 'active') end # Is active selector def focus? name =~ FOCUS end # Active selector Image object if exsists def focus base.get_magic_selector_image(name, 'focus') end def parent if [hover?, target?, active?, focus?].any? PARENT.match name base.image_for($1) end end private def dimensions @dimensions ||= Compass::Core::SassExtensions::Functions::ImageSize::ImageProperties.new(file).size end end end end end ================================================ FILE: cli/lib/compass/sass_extensions/sprites/image_methods.rb ================================================ module Compass module SassExtensions module Sprites module ImageMethods # Fetches the Sprite::Image object for the supplied name def image_for(name) if name.is_a?(Sass::Script::Value::String) name = name.value end name = name.to_s @images.detect { |img| img.name.downcase == name.downcase} end # Returns true if the image name has a hover selector image def has_hover?(name) !get_magic_selector_image(name, 'hover').nil? end # Returns true if the image name has a target selector image def has_target?(name) !get_magic_selector_image(name, 'target').nil? end # Returns true if the image name has a focus selector image def has_focus?(name) !get_magic_selector_image(name, 'focus').nil? end # Returns true if the image name has an active selector image def has_active?(name) !get_magic_selector_image(name, 'active').nil? end SEPERATORS = ['_', '-'] def get_magic_selector_image(name, selector) SEPERATORS.each do |seperator| file = image_for("#{name}#{seperator}#{selector}") return file if !file.nil? end nil end # Return and array of image names that make up this sprite def sprite_names image_names.map { |f| File.basename(f, '.png') } end end end end end ================================================ FILE: cli/lib/compass/sass_extensions/sprites/image_row.rb ================================================ require 'forwardable' module Compass module SassExtensions module Sprites class ImageRow extend Forwardable attr_reader :images, :max_width def_delegators :@images, :last, :delete, :empty?, :length def initialize(max_width) @images = [] @max_width = max_width end def add(image) return false if !will_fit?(image) @images << image true end alias :<< :add def height images.map(&:height).max end def width images.map(&:width).max end def total_width images.inject(0) {|sum, img| sum + img.width } end def efficiency 1 - (total_width.to_f / max_width.to_f) end def will_fit?(image) (total_width + image.width) <= max_width end end end end end ================================================ FILE: cli/lib/compass/sass_extensions/sprites/images.rb ================================================ module Compass module SassExtensions module Sprites class Images < Array def sort_by!(method) invert = false if method.to_s[0] == '!'[0] # have todo this for 1.8.7 compat method = method.to_s[1..-1] invert = true end method = method.to_sym self.sort! do |a, b| unless a.send(method) == b.send(method) a.send(method) <=> b.send(method) else other = ([:size, :name] - [method]).first a.send(other) <=> b.send(other) end end self.reverse! if invert end end end end end ================================================ FILE: cli/lib/compass/sass_extensions/sprites/layout/diagonal.rb ================================================ module Compass module SassExtensions module Sprites module Layout class Diagonal < SpriteLayout def layout! calculate_width! calculate_height! calculate_positions! end private # ===========================================================================================> def calculate_width! @width = @images.inject(0) {|sum, img| sum + img.width} end def calculate_height! @height = @images.inject(0) {|sum, img| sum + img.height} end def calculate_positions! previous = nil @images.each_with_index do |image, index| if previous.nil? previous = image image.top = @height - image.height image.left = 0 next end image.top = previous.top - image.height image.left = previous.left + previous.width previous = image end end end end end end end ================================================ FILE: cli/lib/compass/sass_extensions/sprites/layout/horizontal.rb ================================================ module Compass module SassExtensions module Sprites module Layout class Horizontal < SpriteLayout def layout! calculate_height! calculate_width! calculate_positions! tile_images_that_repeat! end private # ===========================================================================================> def calculate_height! @height = @images.map {|image| image.height + image.offset}.max if repeating_images? calculate_repeat_extra_height! end @height end def calculate_width! @width = @images.inject(0) { |sum, image| sum += (image.width + image.spacing) } end def repeating_images? @repeating_images ||= @images.any?(&:repeat_y?) end def calculate_repeat_extra_height! m = @images.inject(1) {|m,img| img.repeat_y? ? m.lcm(img.height) : m } remainder = @height % m @height += (m - remainder) unless remainder.zero? end def calculate_positions! @images.each_with_index do |image, index| image.top = image.position.unit_str == '%' ? (@height - image.height) * (image.position.value / 100.0) : image.position.value next if index == 0 last_image = @images[index-1] image.left = last_image.left + last_image.width + [image.spacing, last_image.spacing].max end end def tile_images_that_repeat! return unless repeating_images? @images.map {|img| img if img.repeat_y?}.compact.each do |image| y = (image.top + image.height) while y < @height do begin img = image.dup img.top = y.to_i @images << img y += image.height end end #while end end end end end end end ================================================ FILE: cli/lib/compass/sass_extensions/sprites/layout/smart.rb ================================================ module Compass module SassExtensions module Sprites module Layout class Smart < SpriteLayout def layout! calculate_positions! end private # ===========================================================================================> def calculate_positions! fitter = ::Compass::SassExtensions::Sprites::RowFitter.new(@images) current_y = 0 fitter.fit!.each do |row| current_x = 0 row.images.each_with_index do |image, index| image.left = current_x image.top = current_y current_x += image.width end current_y += row.height end @width = fitter.width @height = fitter.height end end end end end end ================================================ FILE: cli/lib/compass/sass_extensions/sprites/layout/vertical.rb ================================================ module Compass module SassExtensions module Sprites module Layout class Vertical < SpriteLayout def layout! calculate_width! calculate_positions! calculate_height! tile_images_that_repeat! end private # ===========================================================================================> def calculate_width! @width = @images.map { |image| image.width + image.offset }.max if repeating_images? calculate_repeat_extra_width! end @width end def calculate_height! last = @images.last @height = last.top + last.height end def repeating_images? @repeating_images ||= @images.any?(&:repeat_x?) end def calculate_repeat_extra_width! m = @images.inject(1) {|m,img| img.repeat_x? ? m.lcm(img.width) : m } remainder = @width % m @width += (m - remainder) unless remainder.zero? end def calculate_positions! @images.each_with_index do |image, index| image.left = (image.position.unit_str == "%" ? (@width - image.width) * (image.position.value / 100.0) : image.position.value).to_i next if index == 0 last_image = @images[index-1] image.top = last_image.top + last_image.height + [image.spacing, last_image.spacing].max end #each_with_index end #method def tile_images_that_repeat! return unless repeating_images? @images.map {|img| img if img.repeat_x?}.compact.each do |image| x = image.left - (image.left / image.width).ceil * image.width while x < @width do begin img = image.dup img.top = image.top img.left = x.to_i @images << img x += image.width end #begin end #while end #map end #method end #Vertical end #Layout end #Sprites end #SassExtensions end #Compass ================================================ FILE: cli/lib/compass/sass_extensions/sprites/layout.rb ================================================ require 'rational' module Compass module SassExtensions module Sprites module Layout class SpriteLayout attr_reader :images, :options attr_accessor :height, :width def initialize(images, kwargs={}) @images = images @options = kwargs @height = 0 @width = 0 layout! end def layout! raise Compass::SpriteException, "You must impliment layout!" end def properties if @width.zero? raise Compass::SpriteException, "You must set the width fetching the properties" end if @height.zero? raise Compass::SpriteException, "You must set the height fetching the properties" end [@images, @width, @height] end end end end end end ================================================ FILE: cli/lib/compass/sass_extensions/sprites/layout_methods.rb ================================================ module Compass module SassExtensions module Sprites module LayoutMethods HORIZONTAL = 'horizontal' DIAGONAL = 'diagonal' SMART = 'smart' VERTICAL = 'vertical' def smart? layout == SMART end def horizontal? layout == HORIZONTAL end def diagonal? layout == DIAGONAL end def vertical? layout == VERTICAL end def layout @layout ||= @kwargs.get_var('layout').value end # Calculates the overal image dimensions # collects image sizes and input parameters for each sprite def compute_image_positions! case layout when SMART require 'compass/sass_extensions/sprites/layout/smart' @images, @width, @height = Layout::Smart.new(@images, @kwargs).properties when DIAGONAL require 'compass/sass_extensions/sprites/layout/diagonal' @images, @width, @height = Layout::Diagonal.new(@images, @kwargs).properties when HORIZONTAL require 'compass/sass_extensions/sprites/layout/horizontal' @images, @width, @height = Layout::Horizontal.new(@images, @kwargs).properties else require 'compass/sass_extensions/sprites/layout/vertical' @images, @width, @height = Layout::Vertical.new(@images, @kwargs).properties end end end end end end ================================================ FILE: cli/lib/compass/sass_extensions/sprites/row_fitter.rb ================================================ require 'forwardable' module Compass module SassExtensions module Sprites class RowFitter extend Forwardable attr_reader :images, :rows def_delegators :rows, :[] def initialize(images) @images = images.sort do |a,b| if a.height == b.height b.width <=> a.width else a.height <=> b.height end end @rows = [] end def fit!(style = :scan) send("#{style}_fit") @rows end def width @width ||= @images.collect(&:width).max end def height @height ||= @rows.inject(0) {|sum, row| sum += row.height} end def efficiency @rows.inject(0) { |sum, row| sum += row.efficiency } ** @rows.length end private def new_row(image = nil) row = Compass::SassExtensions::Sprites::ImageRow.new(width) row.add(image) if image row end def fast_fit row = new_row @images.each do |image| if !row.add(image) @rows << row row = new_row(image) end end @rows << row end def scan_fit fast_fit moved_images = [] begin removed = false catch :done do @rows.each do |row| (@rows - [ row ]).each do |other_row| other_row.images.each do |image| if !moved_images.include?(image) if row.will_fit?(image) other_row.delete(image) row << image @rows.delete(other_row) if other_row.empty? removed = true moved_images << image throw :done end end end end end end end while removed end end end end end ================================================ FILE: cli/lib/compass/sass_extensions/sprites/sprite_map.rb ================================================ module Compass module SassExtensions module Sprites class SpriteMap < Sass::Script::Value::Base attr_accessor :image_names, :path, :name, :map, :kwargs attr_accessor :images, :width, :height, :engine include SpriteMethods include ImageMethods include LayoutMethods include Sass::Script::Value::Helpers # Initialize a new sprite object from a relative file path # the path is relative to the images_path confguration option def self.from_uri(uri, context, kwargs) uri = uri.value path, name = Compass::SpriteImporter.path_and_name(uri) files = Compass::SpriteImporter.files(uri) sprites = files.map do |sprite| relative_name(sprite) end new(sprites, path, name, context, kwargs) end def self.relative_name(sprite) sprite = File.expand_path(sprite) Compass.configuration.sprite_load_path.each do |path| path_with_slash = "#{File.expand_path(path)}/" if sprite.include?(path_with_slash) return sprite.gsub(path_with_slash, '') end end end def initialize(sprites, path, name, context, kwargs) @image_names = sprites @path = path @name = name @kwargs = kwargs @kwargs['cleanup'] ||= bool(true) @kwargs['layout'] ||= identifier('vertical') @kwargs['sort_by'] ||= identifier('none') @images = nil @width = nil @height = nil @engine = nil @evaluation_context = context compute_image_metadata! end def sort_method @kwargs['sort_by'].value end def inspect puts 'images' @images.each do |img| puts img.file end puts "options" @kwargs.each do |k,v| puts "#{k}:#{v}" end end def to_s(kwargs = self.kwargs) sprite_url(self).value end def respond_to?(meth) super || @evaluation_context.respond_to?(meth) end def method_missing(meth, *args, &block) if @evaluation_context.respond_to?(meth) @evaluation_context.send(meth, *args, &block) else super end end private def modulize @modulize ||= Compass::configuration.sprite_engine.to_s.scan(/([^_.]+)/).flatten.map {|chunk| "#{chunk[0].chr.upcase}#{chunk[1..-1]}" }.join end end end end end ================================================ FILE: cli/lib/compass/sass_extensions/sprites/sprite_methods.rb ================================================ module Compass module SassExtensions module Sprites module SpriteMethods # Changing this string will invalidate all previously generated sprite images. # We should do so only when the packing algorithm changes SPRITE_VERSION = "2" # Calculates the overal image dimensions # collects image sizes and input parameters for each sprite # Calculates the height def compute_image_metadata! @width = 0 init_images compute_image_positions! init_engine end def init_engine @engine = eval("::Compass::SassExtensions::Sprites::#{modulize}Engine.new(nil, nil, nil)") @engine.width = @width @engine.height = @height @engine.images = @images end # Creates the Sprite::Image objects for each image and calculates the width def init_images @images = Images.new image_names.each do |relative_file| @images << Image.new(self, relative_file, kwargs) end unless sort_method == 'none' @images.sort_by! sort_method end end def name_and_hash "#{path}-s#{uniqueness_hash}.png" end # The on-the-disk filename of the sprite def filename File.join(Compass.configuration.generated_images_path, name_and_hash) end def relativize(path) Pathname.new(path).relative_path_from(Pathname.new(Dir.pwd)).to_s rescue path end # Generate a sprite image if necessary def generate if generation_required? if kwargs.get_var('cleanup').value cleanup_old_sprites end engine.construct_sprite Compass.configuration.run_sprite_generated(engine.canvas) save! else log :unchanged, filename end end def cleanup_old_sprites Sass::Util.glob(File.join(Compass.configuration.generated_images_path, "#{path}-s*.png")).each do |file| log :remove, file FileUtils.rm file Compass.configuration.run_sprite_removed(file) end end # Does this sprite need to be generated def generation_required? !File.exists?(filename) || outdated? || options[:force] end # Returns the uniqueness hash for this sprite object def uniqueness_hash @uniqueness_hash ||= begin sum = Digest::MD5.new sum << SPRITE_VERSION sum << path sum << layout images.each do |image| [:relative_file, :height, :width, :repeat, :spacing, :position, :digest].each do |attr| sum << image.send(attr).to_s end end sum.hexdigest[0...10] end @uniqueness_hash end # Saves the sprite engine def save! FileUtils.mkdir_p(File.dirname(filename)) saved = engine.save(filename) log :create, filename Compass.configuration.run_sprite_saved(filename) @mtime = nil if saved saved end # All the full-path filenames involved in this sprite def image_filenames @images.map(&:file) end # Checks whether this sprite is outdated def outdated? if File.exists?(filename) return @images.any? {|image| image.mtime.to_i > self.mtime.to_i } end true end # Mtime of the sprite file def mtime @mtime ||= File.mtime(filename) end # Calculate the size of the sprite def size [width, height] end def log(action, filename, *extra) if options[:compass] && options[:compass][:logger] && !options[:quiet] options[:compass][:logger].record(action, relativize(filename), *extra) end end end end end end ================================================ FILE: cli/lib/compass/sass_extensions/sprites.rb ================================================ require 'digest/md5' require 'compass/sprite_importer' module Compass module SassExtensions module Sprites end end end require 'compass/sass_extensions/sprites/images' require 'compass/sass_extensions/sprites/layout' require 'compass/sass_extensions/sprites/image_row' require 'compass/sass_extensions/sprites/row_fitter' require 'compass/sass_extensions/sprites/image' require 'compass/sass_extensions/sprites/layout_methods' require 'compass/sass_extensions/sprites/sprite_methods' require 'compass/sass_extensions/sprites/image_methods' require 'compass/sass_extensions/sprites/sprite_map' require 'compass/sass_extensions/sprites/engines' ================================================ FILE: cli/lib/compass/sass_extensions.rb ================================================ unless Sass::Script::Functions.methods.grep(/\Adeclare\Z/).any? raise LoadError, "It looks like you've got an incompatible version of Sass. This often happens when you have an old haml gem installed. Please upgrade Haml to v3.1 or above." end module Compass::SassExtensions end require 'compass/sass_extensions/functions' require 'compass/sass_extensions/sprites' ================================================ FILE: cli/lib/compass/sprite_importer/binding.rb ================================================ require 'ostruct' module Compass module Sprites class Binding < OpenStruct def get_binding binding end end end end ================================================ FILE: cli/lib/compass/sprite_importer/content.erb ================================================ @import "compass/utilities/sprites/base"; // General Sprite Defaults // You can override them before you import this file. $<%= name %>-sprite-dimensions : false !default; $<%= name %>-use-percentages : false !default; $<%= name %>-position : 0% !default; $<%= name %>-spacing : 0 !default; $<%= name %>-repeat : no-repeat !default; $<%= name %>-prefix : '' !default; $<%= name %>-clean-up : true !default; $<%= name %>-layout : vertical !default; $<%= name %>-inline : false !default; $<%= name %>-sort-by : 'none' !default; $<%= name %>-class-separator : $default-sprite-separator !default; $<%= name %>-sprite-base-class : ".<%= name %>#{$<%= name %>-class-separator}sprite" !default; <% if skip_overrides %> $<%= name %>-sprites: sprite-map("<%= uri %>", $layout: $<%= name %>-layout, $cleanup: $<%= name %>-clean-up, $spacing: $<%= name %>-spacing, $position : $<%= name %>-position); <% else %> // These variables control the generated sprite output // You can override them selectively before you import this file. <% sprite_names.each do |sprite_name| %> $<%= name %>-<%= sprite_name %>-position: $<%= name %>-position !default; $<%= name %>-<%= sprite_name %>-spacing: $<%= name %>-spacing !default; $<%= name %>-<%= sprite_name %>-repeat: $<%= name %>-repeat !default; <% end %> $<%= name %>-sprites: sprite-map("<%= uri %>", <% sprite_names.each do |sprite_name| %> $<%= name %>-<%= sprite_name %>-position: $<%= name %>-<%= sprite_name %>-position, $<%= name %>-<%= sprite_name %>-spacing: $<%= name %>-<%= sprite_name %>-spacing, $<%= name %>-<%= sprite_name %>-repeat: $<%= name %>-<%= sprite_name %>-repeat, <% end %> $layout : $<%= name %>-layout, $cleanup : $<%= name %>-clean-up, $spacing : $<%= name %>-spacing, $position : $<%= name %>-position, $sort-by : $<%= name %>-sort-by ); <% end %> // All sprites should extend this class // The <%= name %>-sprite mixin will do so for you. @if $<%= name %>-inline { #{$<%= name %>-sprite-base-class} { background-image: inline-sprite($<%= name %>-sprites); } } @else { #{$<%= name %>-sprite-base-class} { background-image: sprite-url($<%= name %>-sprites); background-repeat: no-repeat; } } //sass functions to return the dimensions of a sprite image as units <% [:width, :height].each do |dimension| %> @function <%= name %>-sprite-<%= dimension %>($name) { @return sprite-<%= dimension %>($<%= name %>-sprites, $name); } <% end %> // Use this to set the dimensions of an element // based on the size of the original image. @mixin <%= name %>-sprite-dimensions($name) { @include sprite-dimensions($<%= name %>-sprites, $name) } // Move the background position to display the sprite. @mixin <%= name %>-sprite-position($name, $offset-x: 0, $offset-y: 0, $use-percentages: $<%= name %>-use-percentages) { @include sprite-background-position($<%= name %>-sprites, $name, $offset-x, $offset-y, $use-percentages) } // Extends the sprite base class and set the background position for the desired sprite. // It will also apply the image dimensions if $dimensions is true. @mixin <%= name %>-sprite($name, $dimensions: $<%= name %>-sprite-dimensions, $offset-x: 0, $offset-y: 0, $use-percentages: $<%= name %>-use-percentages, $separator: $<%= name %>-class-separator) { @extend #{$<%= name %>-sprite-base-class}; @include sprite($<%= name %>-sprites, $name, $dimensions, $offset-x, $offset-y, $use-percentages, $separator: $separator); } @mixin <%= name %>-sprites($sprite-names, $dimensions: $<%= name %>-sprite-dimensions, $prefix: sprite-map-name($<%= name %>-sprites), $offset-x: 0, $offset-y: 0, $use-percentages: $<%= name %>-use-percentages, $separator: $<%= name %>-class-separator) { @include sprites($<%= name %>-sprites, $sprite-names, $<%= name %>-sprite-base-class, $dimensions, $prefix, $offset-x, $offset-y, $use-percentages, $separator: $separator) } // Generates a class for each sprited image. @mixin all-<%= name %>-sprites($dimensions: $<%= name %>-sprite-dimensions, $prefix: sprite-map-name($<%= name %>-sprites), $offset-x: 0, $offset-y: 0, $use-percentages: $<%= name %>-use-percentages, $separator: $<%= name %>-class-separator) { @include <%= name %>-sprites(<%= sprite_names.join(" ") %>, $dimensions, $prefix, $offset-x, $offset-y, $use-percentages, $separator: $separator); } ================================================ FILE: cli/lib/compass/sprite_importer.rb ================================================ require 'erb' require 'compass/sprite_importer/binding' module Compass class SpriteImporter < Sass::Importers::Base VAILD_FILE_NAME = /\A#{Sass::SCSS::RX::IDENT}\Z/ SPRITE_IMPORTER_REGEX = %r{((.+/)?([^\*.]+))/(.+?)\.png} VALID_EXTENSIONS = ['.png'] TEMPLATE_FOLDER = File.join(File.expand_path('../', __FILE__), 'sprite_importer') CONTENT_TEMPLATE_FILE = File.join(TEMPLATE_FOLDER, 'content.erb') CONTENT_TEMPLATE = ERB.new(File.read(CONTENT_TEMPLATE_FILE)) # finds all sprite files def self.find_all_sprite_map_files(path) hex = "[0-9a-f]" glob = "*-s#{hex*10}{#{VALID_EXTENSIONS.join(",")}}" Sass::Util.glob(File.join(path, "**", glob)) end def find(uri, options) if uri =~ SPRITE_IMPORTER_REGEX return self.class.sass_engine(uri, self.class.sprite_name(uri), self, options) end nil end def find_relative(uri, base, options) nil end def to_s self.class.name end def hash self.class.name.hash end def eql?(other) other.class == self.class end def mtime(uri, options) self.class.files(uri).sort.inject(Time.at(0)) do |max_time, file| (t = File.mtime(file)) > max_time ? t : max_time end end def key(uri, options={}) [self.class.name + ":sprite:" + File.dirname(File.expand_path(uri)), File.basename(uri)] end def public_url(*args) nil end def self.path_and_name(uri) if uri =~ SPRITE_IMPORTER_REGEX [$1, $3] else raise Compass::Error, "invalid sprite path" end end # Name of this spite def self.sprite_name(uri) _, name = path_and_name(uri) name end # The on-disk location of this sprite def self.path(uri) path, _ = path_and_name(uri) path end # Returns the Glob of image files for the uri def self.files(uri) Compass.configuration.sprite_load_path.compact.each do |folder| files = Sass::Util.glob(File.join(folder, uri)).sort next if files.empty? return files end path = Compass.configuration.sprite_load_path.to_a.join(', ') raise Compass::SpriteException, %Q{No files were found in the load path matching "#{uri}". Your current load paths are: #{path}} end # Returns an Array of image names without the file extension def self.sprite_names(uri) files(uri).collect do |file| File.basename(file, '.png') end end # Returns the sass_options for this sprite def self.sass_options(uri, importer, options) options.merge!(:filename => uri.gsub(%r{\*/},"*\\/"), :syntax => :scss, :importer => importer) end # Returns a Sass::Engine for this sprite object def self.sass_engine(uri, name, importer, options) content = content_for_images(uri, name, options[:skip_overrides]) Sass::Engine.new(content, sass_options(uri, importer, options)) end # Generates the Sass for this sprite file def self.content_for_images(uri, name, skip_overrides = false) binder = Compass::Sprites::Binding.new(:name => name, :uri => uri, :skip_overrides => skip_overrides, :sprite_names => sprite_names(uri), :files => files(uri)) CONTENT_TEMPLATE.result(binder.get_binding) end end end ================================================ FILE: cli/lib/compass/stats.rb ================================================ module Compass module Stats class StatsVisitor attr_accessor :rule_count, :prop_count, :mixin_def_count, :mixin_count def initialize self.rule_count = 0 self.prop_count = 0 self.mixin_def_count = 0 self.mixin_count = 0 end def visit(node) self.prop_count += 1 if node.is_a?(Sass::Tree::PropNode) && !node.children.any? if node.is_a?(Sass::Tree::RuleNode) self.rule_count += node.rule.reject{|r| r.is_a?(Sass::Script::Tree::Node)}.map{|r| r.split(/,/)}.flatten.compact.size end self.mixin_def_count += 1 if node.is_a?(Sass::Tree::MixinDefNode) self.mixin_count += 1 if node.is_a?(Sass::Tree::MixinNode) end def up(node) end def down(node) end def import?(node) return false full_filename = node.send(:import) full_filename != Compass.deprojectize(full_filename) end end class CssFile attr_accessor :path, :css attr_accessor :selector_count, :prop_count attr_accessor :file_size def initialize(path) require 'css_parser' self.path = path self.css = CssParser::Parser.new self.css.add_block!(contents) self.selector_count = 0 self.prop_count = 0 end def contents @contents ||= File.read(path) end def lines contents.inject(0){|m,c| m + 1 } end def analyze! self.file_size = File.size(path) css.each_selector do |selector, declarations, specificity| sels = selector.split(/,/).size props = declarations.split(/;/).size self.selector_count += sels self.prop_count += props end end end class SassFile attr_accessor :path attr_reader :visitor attr_accessor :file_size def initialize(path) self.path = path end def contents @contents ||= File.read(path) end def tree opts = Compass.configuration.to_sass_engine_options opts[:syntax] = path[-4..-1].to_sym @tree = Sass::Engine.new(contents, opts).to_tree end def visit_tree! @visitor = StatsVisitor.new tree.visit_depth_first(@visitor) @visitor end def analyze! self.file_size = File.size(path) visit_tree! end def lines contents.inject(0){|m,c| m + 1 } end def rule_count visitor.rule_count end def prop_count visitor.prop_count end def mixin_def_count visitor.mixin_def_count end def mixin_count visitor.mixin_count end end end end ================================================ FILE: cli/lib/compass/test_case.rb ================================================ module Compass # Write your unit test like this if you want to make sure all your stylesheets compile. # # require 'compass/test_case' # class StylesheetsTest < Compass::TestCase # def test_stylesheets # my_sass_files.each do |sass_file| # assert_compiles(sass_file) do |result| # assert_not_blank result # end # end # end # protected # def my_sass_files # Dir.glob(File.expand_path(File.join(File.dirname(__FILE__), "../..", "app/stylesheets/**/[^_]*.sass"))) # end # end class TestCase < (defined?(ActiveSupport::TestCase) ? ActiveSupport::TestCase : Test::Unit::TestCase) def setup super @last_compile = nil end def compile(stylesheet) input = open(stylesheet) template = input.read() input.close() @last_compile = ::Sass::Engine.new(template, ::Sass::Plugin.engine_options(:filename => stylesheet)).render yield @last_compile if block_given? end def assert_compiles(stylesheet, &block) compile(stylesheet, &block) end end end ================================================ FILE: cli/lib/compass/validator.rb ================================================ begin require 'rubygems' require 'compass-validator' rescue LoadError => e if e.message =~ /core_ext/ raise Compass::MissingDependency, <<-ERRORMSG The Compass CSS Validator is out of date. Please upgrade it: sudo gem install compass-validator --version ">= 3.0.1" ERRORMSG else raise Compass::MissingDependency, <<-ERRORMSG The Compass CSS Validator could not be loaded. Please install it: sudo gem install compass-validator ERRORMSG end end ================================================ FILE: cli/lib/compass/version.rb ================================================ require 'compass/generated_version' module Compass module Version def scope(file) # :nodoc: File.join(File.dirname(__FILE__), '..', '..', file) end def parse_version(version, name) nil_or_int = lambda{|i| i.nil? ? nil : i.to_i} segments = version.split(".") { :string => version, :name => name, :major => nil_or_int.call(segments.shift), :minor => nil_or_int.call(segments.shift), :patch => nil_or_int.call(segments.shift), :state => segments.shift, :iteration => nil_or_int.call(segments.shift) } end # Returns a hash representing the version. # The :major, :minor, and :teeny keys have their respective numbers. # The :string key contains a human-readable string representation of the version. # The :rev key will have the current revision hash. # # This method swiped from Haml and then modified, some credit goes to Nathan Weizenbaum def version Compass::VERSION_DETAILS end end extend Compass::Version unless defined?(::Compass::VERSION) VERSION = File.read(scope("VERSION")).strip VERSION_NAME = File.read(scope("VERSION_NAME")).strip end VERSION_DETAILS = parse_version(VERSION, VERSION_NAME) end ================================================ FILE: cli/lib/compass.rb ================================================ module Compass end %w(core deprecation dependencies sass_extensions version errors quick_cache logger actions ).each do |lib| require "compass/#{lib}" end require 'sass/callbacks' module Compass def base_directory File.expand_path(File.join(File.dirname(__FILE__), '..')) end def lib_directory File.expand_path(File.join(File.dirname(__FILE__))) end module_function :base_directory, :lib_directory extend QuickCache end %w(configuration/helpers configuration/comments configuration/serialization configuration/file_data app_integration compiler sprite_importer ).each do |lib| require "compass/#{lib}" end ================================================ FILE: cli/test/fixtures/extensions/only_stylesheets/compass_init.rb ================================================ Compass::Frameworks.register("only-stylesheets", :stylesheets_dir => File.join(File.dirname(__FILE__),"scss")) ================================================ FILE: cli/test/fixtures/extensions/only_stylesheets/scss/only_stylesheets/foo.scss ================================================ @mixin only-stylesheets { color: red; } ================================================ FILE: cli/test/fixtures/fonts/bgrove.base64.txt ================================================ AAEAAAAOAIAAAwBgRkZUTVRX4doAAEkcAAAAHE9TLzJXOYGVAAABaAAAAFZjbWFwo9b83AAAA5wAAAGCY3Z0IAAhAnkAAAUgAAAABGdhc3D//wADAABJFAAAAAhnbHlmHjQt6QAABhQAADqcaGVhZO/rWMkAAADsAAAANmhoZWEG3gJsAAABJAAAACRobXR44bASCgAAAcAAAAHca2VybgkODBcAAECwAAACpmxvY2FEK1KSAAAFJAAAAPBtYXhwAMYAngAAAUgAAAAgbmFtZXbvKHoAAENYAAAD/3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0ZXJuYXRlLjI2NQ9XX2FsdGVybmF0ZS4yNjYPTV9hbHRlcm5hdGUuMjY3AAAAAf//AAIAAAABAAAAAMbCNwkAAAAAxr0CEAAAAADG2KjA ================================================ FILE: cli/test/fixtures/stylesheets/busted_font_urls/config.rb ================================================ # Require any additional compass plugins here. project_type = :stand_alone css_dir = "tmp" sass_dir = "sass" fonts_dir = "fonts" output_style = :compact # To enable relative image paths using the images_url() function: # http_images_path = :relative http_fonts_path = "/fonts" line_comments = false asset_cache_buster do |path, file| pathname = Pathname.new(path) dirname = pathname.dirname basename = pathname.basename(pathname.extname) extname = pathname.extname case pathname.basename(pathname.extname).to_s when "grid" new_path = "#{dirname}/#{basename}-BUSTED#{extname}" {:path => new_path, :query => nil} when "feed" "query_string" when "dk" {:query => "query_string"} end end asset_host do |path| "http://assets%d.example.com" % (path.size % 4) end ================================================ FILE: cli/test/fixtures/stylesheets/busted_font_urls/css/screen.css ================================================ .showgrid { font-family: url('http://assets3.example.com/fonts/grid-BUSTED.ttf'); } .no-buster { font-family: url('http://assets3.example.com/fonts/grid.ttf'); } .buster-by-default { font-family: url('http://assets3.example.com/fonts/grid-BUSTED.ttf'); } .feed { font-family: url('http://assets3.example.com/fonts/feed.ttf?query_string'); } .dk { font-family: url('http://assets1.example.com/fonts/sub/dk.ttf?query_string'); } ================================================ FILE: cli/test/fixtures/stylesheets/busted_font_urls/sass/screen.sass ================================================ .showgrid font-family: font-url("grid.ttf", $only-path: false, $cache-buster: true) .no-buster font-family: font-url("grid.ttf", $only-path: false, $cache-buster: false) .buster-by-default font-family: font-url("grid.ttf") .feed font-family: font-url("feed.ttf", $only-path: false, $cache-buster: true) .dk font-family: font-url("sub/dk.ttf", $only-path: false, $cache-buster: true) ================================================ FILE: cli/test/fixtures/stylesheets/busted_image_urls/config.rb ================================================ # Require any additional compass plugins here. project_type = :stand_alone css_dir = "tmp" sass_dir = "sass" images_dir = "images" output_style = :compact # To enable relative image paths using the images_url() function: # http_images_path = :relative http_images_path = "/images" line_comments = false asset_cache_buster do |path, file| pathname = Pathname.new(path) case pathname.basename(pathname.extname).to_s when "grid" new_path = "%s/%s-BUSTED%s" % [pathname.dirname, pathname.basename(pathname.extname), pathname.extname] {:path => new_path, :query => nil} when "feed" "query_string" when "dk" {:query => "query_string"} end end asset_host do |path| "http://assets%d.example.com" % (path.size % 4) end ================================================ FILE: cli/test/fixtures/stylesheets/busted_image_urls/css/screen.css ================================================ .showgrid { background-image: url('http://assets0.example.com/images/grid-BUSTED.png'); } .inlinegrid { background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAUEAYAAACv1qP4AAAABmJLR0T///////8JWPfcAAAACXBIWXMAAABIAAAASABGyWs+AAAAZ0lEQVRYw+3QwQ2AIBAFUTEUwI3+uzN7gDscsIgxEuO8An52J11X73OudfxMraXkzHfO3Y98nQEhA0IGhAwIGRAyIGRAyICQASEDQgaEDAgZEDIgZEDIgJABoZzSGK3tPuN9ERFP7Nw4fg+c5g8V1wAAAABJRU5ErkJggg=='); } .no-buster { background-image: url('http://assets0.example.com/images/grid.png'); } .feed { background-image: url('http://assets0.example.com/images/feed.png?query_string'); } .dk { background-image: url('http://assets0.example.com/images/flags/dk.png?query_string'); } ================================================ FILE: cli/test/fixtures/stylesheets/busted_image_urls/sass/screen.sass ================================================ .showgrid background-image: image-url("grid.png") .inlinegrid background-image: inline-image("grid.png") .no-buster background-image: image-url("grid.png", $only-path: false, $cache-buster: false) .feed background-image: image-url("feed.png") .dk background-image: image-url("flags/dk.png") ================================================ FILE: cli/test/fixtures/stylesheets/compass/config.rb ================================================ # Require any additional compass plugins here. require 'true' require 'compass/import-once/activate' project_type = :stand_alone css_dir = "tmp" sass_dir = "sass" images_dir = "images" output_style = :nested # To enable relative image paths using the images_url() function: # http_images_path = :relative http_images_path = "/images" line_comments = false asset_cache_buster do |path, file| "busted=true" end disable_warnings = true ================================================ FILE: cli/test/fixtures/stylesheets/compass/css/animation-with-legacy-ie.css ================================================ @-moz-keyframes test { 0%, 100% { opacity: 1; } 50% { opacity: 0; } } @-webkit-keyframes test { 0%, 100% { opacity: 1; } 50% { opacity: 0; } } @keyframes test { 0%, 100% { opacity: 1; } 50% { opacity: 0; } } .animation { -moz-animation: test; -webkit-animation: test; animation: test; } ================================================ FILE: cli/test/fixtures/stylesheets/compass/css/animation.css ================================================ @-moz-keyframes test { 0%, 100% { background-color: red; } 50% { background-color: blue; } } @-webkit-keyframes test { 0%, 100% { background-color: red; } 50% { background-color: blue; } } @keyframes test { 0%, 100% { background-color: red; } 50% { background-color: blue; } } .animation { -moz-animation: test; -webkit-animation: test; animation: test; } ================================================ FILE: cli/test/fixtures/stylesheets/compass/css/appearance.css ================================================ .searchfield { -moz-appearance: searchfield; -webkit-appearance: searchfield; } ================================================ FILE: cli/test/fixtures/stylesheets/compass/css/background-clip.css ================================================ .background-clip { -moz-background-clip: border; -o-background-clip: border-box; -webkit-background-clip: border; background-clip: border-box; } .background-clip-multiple { -moz-background-clip: border, padding, content; -o-background-clip: border-box, padding-box, content-box; -webkit-background-clip: border, padding, content; background-clip: border-box, padding-box, content-box; } ================================================ FILE: cli/test/fixtures/stylesheets/compass/css/background-origin.css ================================================ .background-origin { -moz-background-origin: border; -o-background-origin: border-box; -webkit-background-origin: border; background-origin: border-box; } .background-origin-multiple { -moz-background-origin: border, padding, content; -o-background-origin: border-box, padding-box, content-box; -webkit-background-origin: border, padding, content; background-origin: border-box, padding-box, content-box; } ================================================ FILE: cli/test/fixtures/stylesheets/compass/css/background-size.css ================================================ .background-size-default { -moz-background-size: 100% auto; -o-background-size: 100% auto; -webkit-background-size: 100% auto; background-size: 100% auto; } .background-size-single { -moz-background-size: 50% 25%; -o-background-size: 50% 25%; -webkit-background-size: 50% 25%; background-size: 50% 25%; } .background-size-multiple { -moz-background-size: 4em 3em, 100% auto, 50%; -o-background-size: 4em 3em, 100% auto, 50%; -webkit-background-size: 4em 3em, 100% auto, 50%; background-size: 4em 3em, 100% auto, 50%; } ================================================ FILE: cli/test/fixtures/stylesheets/compass/css/border_radius.css ================================================ .simple { -moz-border-radius: 4px / 4px; -webkit-border-radius: 4px 4px; border-radius: 4px / 4px; } .compound { -moz-border-radius: 2px 5px / 3px 6px; -webkit-border-radius: 2px 3px; border-radius: 2px 5px / 3px 6px; } .crazy { -moz-border-radius: 1px 3px 5px 7px / 2px 4px 6px 8px; -webkit-border-radius: 1px 2px; border-radius: 1px 3px 5px 7px / 2px 4px 6px 8px; } ================================================ FILE: cli/test/fixtures/stylesheets/compass/css/box-sizing.css ================================================ .div { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; } .div { -moz-box-sizing: content-box; -webkit-box-sizing: content-box; box-sizing: content-box; } .div { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; } ================================================ FILE: cli/test/fixtures/stylesheets/compass/css/box.css ================================================ .hbox { display: -webkit-box; display: -moz-box; display: -ms-box; display: box; -webkit-box-orient: horizontal; -moz-box-orient: horizontal; -ms-box-orient: horizontal; box-orient: horizontal; -webkit-box-align: stretch; -moz-box-align: stretch; -ms-box-align: stretch; box-align: stretch; } .hbox > * { -webkit-box-flex: 0; -moz-box-flex: 0; -ms-box-flex: 0; box-flex: 0; } .vbox { display: -webkit-box; display: -moz-box; display: -ms-box; display: box; -webkit-box-orient: vertical; -moz-box-orient: vertical; -ms-box-orient: vertical; box-orient: vertical; -webkit-box-align: stretch; -moz-box-align: stretch; -ms-box-align: stretch; box-align: stretch; } .vbox > * { -webkit-box-flex: 0; -moz-box-flex: 0; -ms-box-flex: 0; box-flex: 0; } .spacer { -webkit-box-flex: 1; -moz-box-flex: 1; -ms-box-flex: 1; box-flex: 1; } .reverse { -webkit-box-direction: reverse; -moz-box-direction: reverse; -ms-box-direction: reverse; box-direction: reverse; } .box-flex-0 { -webkit-box-flex: 0; -moz-box-flex: 0; -ms-box-flex: 0; box-flex: 0; } .box-flex-1 { -webkit-box-flex: 1; -moz-box-flex: 1; -ms-box-flex: 1; box-flex: 1; } .box-flex-2 { -webkit-box-flex: 2; -moz-box-flex: 2; -ms-box-flex: 2; box-flex: 2; } .box-flex-group-0 { -webkit-box-flex-group: 0; -moz-box-flex-group: 0; -ms-box-flex-group: 0; box-flex-group: 0; } .box-flex-group-1 { -webkit-box-flex-group: 1; -moz-box-flex-group: 1; -ms-box-flex-group: 1; box-flex-group: 1; } .box-flex-group-2 { -webkit-box-flex-group: 2; -moz-box-flex-group: 2; -ms-box-flex-group: 2; box-flex-group: 2; } .start { -webkit-box-pack: start; -moz-box-pack: start; -ms-box-pack: start; box-pack: start; } .end { -webkit-box-pack: end; -moz-box-pack: end; -ms-box-pack: end; box-pack: end; } .center { -webkit-box-pack: center; -moz-box-pack: center; -ms-box-pack: center; box-pack: center; } ================================================ FILE: cli/test/fixtures/stylesheets/compass/css/box_shadow.css ================================================ .no-box-shadow { -moz-box-shadow: none; -webkit-box-shadow: none; box-shadow: none; } .box-shadow { -moz-box-shadow: 0px 0px 5px #333333, 2px 2px 5px #222222; -webkit-box-shadow: 0px 0px 5px #333333, 2px 2px 5px #222222; box-shadow: 0px 0px 5px #333333, 2px 2px 5px #222222; } .single-box-shadow { -moz-box-shadow: 0px 5px #333333; -webkit-box-shadow: 0px 5px #333333; box-shadow: 0px 5px #333333; } .multiple-box-shadows { -moz-box-shadow: 0px 0px 5px #333333, 2px 2px 5px #222222; -webkit-box-shadow: 0px 0px 5px #333333, 2px 2px 5px #222222; box-shadow: 0px 0px 5px #333333, 2px 2px 5px #222222; } .legacy-single-box-shadow { -moz-box-shadow: 0px 5px blue; -webkit-box-shadow: 0px 5px blue; box-shadow: 0px 5px blue; } ================================================ FILE: cli/test/fixtures/stylesheets/compass/css/brightness.css ================================================ .black-is-0-percent { brightness: 0%; } .white-is-100-percent { brightness: 100%; } .green-is-58-point-7-percent { brightness: 58.7%; } .blue-is-11-point-4-percent { brightness: 11.4%; } .red-is-29-point-9-percent { brightness: 29.9%; } ================================================ FILE: cli/test/fixtures/stylesheets/compass/css/browser-support.css ================================================ .android { versions: "2.1", "2.2", "2.3", "3", "4", "4.1", "4.2-4.3", "4.4", "4.4.3"; background-img-opts: -webkit; background-img-opts-unprefixed-at: "3"; border-image: -webkit; border-image-unprefixed-at: "4.4"; border-radius: -webkit; border-radius-unprefixed-at: "2.2"; css-animation: -webkit; css-appearance: -webkit; css-boxshadow: -webkit; css-boxshadow-unprefixed-at: "4"; css-canvas: -webkit; css-filters: -webkit; css-gradients: -webkit; css-gradients-unprefixed-at: "4.4"; css-masks: -webkit; css-placeholder: -webkit; css-reflections: -webkit; css-repeating-gradients: -webkit; css-repeating-gradients-unprefixed-at: "4.4"; css-transitions: -webkit; css-transitions-unprefixed-at: "4.4"; css3-boxsizing: -webkit; css3-boxsizing-unprefixed-at: "4"; font-feature: -webkit; intrinsic-width: -webkit; multicolumn: -webkit; text-stroke: -webkit; transforms2d: -webkit; transforms3d: -webkit; user-select-none: -webkit; } .android-chrome { versions: "36"; css-animation: -webkit; css-appearance: -webkit; css-canvas: -webkit; css-filters: -webkit; css-masks: -webkit; css-placeholder: -webkit; css-reflections: -webkit; font-feature: -webkit; intrinsic-width: -webkit; multicolumn: -webkit; text-stroke: -webkit; transforms3d: -webkit; user-select-none: -webkit; } .android-firefox { versions: "31"; css-appearance: -moz; css-hyphens: -moz; css-placeholder: -moz; css3-tabsize: -moz; font-feature: -moz; intrinsic-width: -moz; multicolumn: -moz; text-decoration: -moz; text-size-adjust: -moz; user-select-none: -moz; } .blackberry { versions: "7", "10"; border-image: -webkit; border-image-unprefixed-at: "10"; calc: -webkit; css-animation: -webkit; css-appearance: -webkit; css-boxshadow: -webkit; css-boxshadow-unprefixed-at: "10"; css-canvas: -webkit; css-filters: -webkit; css-gradients: -webkit; css-masks: -webkit; css-placeholder: -webkit; css-reflections: -webkit; css-repeating-gradients: -webkit; css-transitions: -webkit; css3-boxsizing: -webkit; css3-boxsizing-unprefixed-at: "10"; flexbox: -webkit; font-feature: -webkit; intrinsic-width: -webkit; multicolumn: -webkit; text-stroke: -webkit; transforms2d: -webkit; transforms3d: -webkit; user-select-none: -webkit; } .chrome { versions: "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39"; border-image: -webkit; border-image-unprefixed-at: "16"; border-radius: -webkit; border-radius-unprefixed-at: "5"; calc: -webkit; calc-unprefixed-at: "26"; css-animation: -webkit; css-appearance: -webkit; css-boxshadow: -webkit; css-boxshadow-unprefixed-at: "10"; css-canvas: -webkit; css-filters: -webkit; css-gradients: -webkit; css-gradients-unprefixed-at: "26"; css-masks: -webkit; css-placeholder: -webkit; css-reflections: -webkit; css-regions: -webkit; css-regions-unprefixed-at: "19"; css-repeating-gradients: -webkit; css-repeating-gradients-unprefixed-at: "26"; css-transitions: -webkit; css-transitions-unprefixed-at: "26"; css3-boxsizing: -webkit; css3-boxsizing-unprefixed-at: "10"; flexbox: -webkit; flexbox-unprefixed-at: "29"; font-feature: -webkit; intrinsic-width: -webkit; multicolumn: -webkit; text-stroke: -webkit; transforms2d: -webkit; transforms2d-unprefixed-at: "36"; transforms3d: -webkit; transforms3d-unprefixed-at: "36"; user-select-none: -webkit; } .firefox { versions: "2", "3", "3.5", "3.6", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", "32", "33", "34"; background-img-opts: -moz; background-img-opts-unprefixed-at: "4"; border-image: -moz; border-image-unprefixed-at: "15"; border-radius: -moz; border-radius-unprefixed-at: "4"; calc: -moz; calc-unprefixed-at: "16"; css-animation: -moz; css-animation-unprefixed-at: "16"; css-appearance: -moz; css-boxshadow: -moz; css-boxshadow-unprefixed-at: "4"; css-gradients: -moz; css-gradients-unprefixed-at: "16"; css-hyphens: -moz; css-placeholder: -moz; css-repeating-gradients: -moz; css-repeating-gradients-unprefixed-at: "16"; css-resize: prefix-no-longer-needed; css-resize-unprefixed-at: "5"; css-selection: -moz; css-transitions: -moz; css-transitions-unprefixed-at: "16"; css3-boxsizing: -moz; css3-boxsizing-unprefixed-at: "29"; css3-tabsize: -moz; font-feature: -moz; font-feature-unprefixed-at: "32"; inline-block: prefix-no-longer-needed; inline-block-unprefixed-at: "3"; intrinsic-width: -moz; multicolumn: -moz; text-decoration: -moz; transforms2d: -moz; transforms2d-unprefixed-at: "16"; transforms3d: -moz; transforms3d-unprefixed-at: "16"; user-select-none: -moz; } .ie { versions: "5.5", "6", "7", "8", "9", "10", "11"; css-grid: -ms; css-hyphens: -ms; css-placeholder: -ms; css-regions: -ms; transforms2d: -ms; transforms2d-unprefixed-at: "10"; user-select-none: -ms; } .ie-mobile { versions: "10"; css-grid: -ms; css-placeholder: -ms; css-regions: -ms; text-size-adjust: -ms; user-select-none: -ms; } .ios-safari { versions: "3.2", "4.0-4.1", "4.2-4.3", "5.0-5.1", "6.0-6.1", "7.0-7.1", "8"; border-image: -webkit; border-image-unprefixed-at: "6.0-6.1"; border-radius: -webkit; border-radius-unprefixed-at: "4.0-4.1"; calc: -webkit; calc-unprefixed-at: "7.0-7.1"; css-animation: -webkit; css-appearance: -webkit; css-boxshadow: -webkit; css-boxshadow-unprefixed-at: "5.0-5.1"; css-canvas: -webkit; css-filters: -webkit; css-gradients: -webkit; css-gradients-unprefixed-at: "7.0-7.1"; css-hyphens: -webkit; css-masks: -webkit; css-placeholder: -webkit; css-reflections: -webkit; css-regions: -webkit; css-repeating-gradients: -webkit; css-repeating-gradients-unprefixed-at: "7.0-7.1"; css-shapes: prefix-no-longer-needed; css-sticky: -webkit; css-transitions: -webkit; css-transitions-unprefixed-at: "7.0-7.1"; css3-boxsizing: -webkit; css3-boxsizing-unprefixed-at: "5.0-5.1"; flexbox: -webkit; intrinsic-width: -webkit; multicolumn: -webkit; text-size-adjust: -webkit; text-stroke: -webkit; transforms2d: -webkit; transforms3d: -webkit; user-select-none: -webkit; } .opera { versions: "9.5-9.6", "10.0-10.1", "10.5", "10.6", "11", "11.1", "11.5", "11.6", "12", "12.1", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24"; background-img-opts: -webkit; background-img-opts-unprefixed-at: "10.5"; border-image: -webkit; border-image-unprefixed-at: "15"; css-animation: -webkit; css-appearance: -webkit; css-canvas: -webkit; css-filters: -webkit; css-gradients: -webkit; css-gradients-unprefixed-at: "12.1"; css-masks: -webkit; css-placeholder: -webkit; css-reflections: -webkit; css-repeating-gradients: -webkit; css-repeating-gradients-unprefixed-at: "12.1"; css-transitions: -webkit; css-transitions-unprefixed-at: "12.1"; css3-tabsize: prefix-no-longer-needed; css3-tabsize-unprefixed-at: "15"; flexbox: -webkit; flexbox-unprefixed-at: "17"; font-feature: -webkit; intrinsic-width: -webkit; multicolumn: -webkit; object-fit: prefix-no-longer-needed; object-fit-unprefixed-at: "15"; text-overflow: prefix-no-longer-needed; text-overflow-unprefixed-at: "11"; text-stroke: -webkit; transforms2d: -webkit; transforms2d-unprefixed-at: "23"; transforms3d: -webkit; transforms3d-unprefixed-at: "23"; user-select-none: -webkit; } .opera-mini { versions: "5.0-7.0"; text-overflow: -o; } .opera-mobile { versions: "10", "11.5", "12", "12.1", "22"; border-image: -o; border-image-unprefixed-at: "22"; css-animation: prefix-no-longer-needed; css-appearance: prefix-no-longer-needed; css-canvas: prefix-no-longer-needed; css-filters: prefix-no-longer-needed; css-gradients: prefix-no-longer-needed; css-gradients-unprefixed-at: "12.1"; css-masks: prefix-no-longer-needed; css-placeholder: prefix-no-longer-needed; css-reflections: prefix-no-longer-needed; css-repeating-gradients: prefix-no-longer-needed; css-repeating-gradients-unprefixed-at: "12.1"; css-transitions: -o; css-transitions-unprefixed-at: "12.1"; css3-tabsize: -o; css3-tabsize-unprefixed-at: "22"; font-feature: prefix-no-longer-needed; intrinsic-width: prefix-no-longer-needed; multicolumn: prefix-no-longer-needed; object-fit: -o; object-fit-unprefixed-at: "22"; text-overflow: -o; text-overflow-unprefixed-at: "12.1"; text-stroke: prefix-no-longer-needed; transforms2d: prefix-no-longer-needed; transforms3d: prefix-no-longer-needed; user-select-none: prefix-no-longer-needed; } .safari { versions: "3.1", "3.2", "4", "5", "5.1", "6", "6.1", "7", "8"; border-image: -webkit; border-image-unprefixed-at: "6"; border-radius: -webkit; border-radius-unprefixed-at: "5"; calc: -webkit; calc-unprefixed-at: "6.1"; css-animation: -webkit; css-appearance: -webkit; css-boxshadow: -webkit; css-boxshadow-unprefixed-at: "5.1"; css-canvas: -webkit; css-filters: -webkit; css-gradients: -webkit; css-gradients-unprefixed-at: "6.1"; css-hyphens: -webkit; css-masks: -webkit; css-placeholder: -webkit; css-reflections: -webkit; css-regions: -webkit; css-repeating-gradients: -webkit; css-repeating-gradients-unprefixed-at: "6.1"; css-shapes: prefix-no-longer-needed; css-sticky: -webkit; css-transitions: -webkit; css-transitions-unprefixed-at: "6.1"; css3-boxsizing: -webkit; css3-boxsizing-unprefixed-at: "5.1"; flexbox: -webkit; intrinsic-width: -webkit; multicolumn: -webkit; text-stroke: -webkit; transforms2d: -webkit; transforms3d: -webkit; user-select-none: -webkit; } ================================================ FILE: cli/test/fixtures/stylesheets/compass/css/color.css ================================================ .handles-null { content: "there should be no property below this one"; } .contrasts-light { background-color: #eeeeee; color: black; } .contrasts-dark { background-color: #222222; color: white; } .contrasts-light-with-contrast-color-override { background-color: #eeeeee; color: red; } .contrasts-dark-with-contrast-color-override { background-color: #222222; color: yellow; } ================================================ FILE: cli/test/fixtures/stylesheets/compass/css/columns.css ================================================ .columns { -moz-columns: 20em 5; -webkit-columns: 20em 5; columns: 20em 5; } .column-count { -moz-column-count: 5; -webkit-column-count: 5; column-count: 5; } .column-gap { -moz-column-gap: 10px; -webkit-column-gap: 10px; column-gap: 10px; } .column-width { -moz-column-width: 90px; -webkit-column-width: 90px; column-width: 90px; } .column-span { -moz-column-span: all; -webkit-column-span: all; column-span: all; } .column-rule-width { -moz-rule-width: 1px; -webkit-rule-width: 1px; rule-width: 1px; } .column-rule-style { -moz-rule-style: dotted; -webkit-rule-style: dotted; rule-style: dotted; } .column-rule-color { -moz-rule-color: blue; -webkit-rule-color: blue; rule-color: blue; } .column-rule { -moz-column-rule: 1px solid blue; -webkit-column-rule: 1px solid blue; column-rule: 1px solid blue; } .column-rule-spaced { -moz-column-rule: 1px solid blue; -webkit-column-rule: 1px solid blue; column-rule: 1px solid blue; } .column-break-before { -moz-page-break-before: always; -webkit-column-break-before: always; break-before: always; } .column-break-after { -moz-page-break-after: always; -webkit-column-break-after: always; break-after: always; } .column-break-inside { -moz-page-break-inside: auto; -webkit-column-break-inside: auto; break-inside: auto; } .column-count { -moz-column-count: 5; -webkit-column-count: 5; column-count: 5; } .column-gap { -moz-column-gap: 10px; -webkit-column-gap: 10px; column-gap: 10px; } .column-width { -moz-column-width: 90px; -webkit-column-width: 90px; column-width: 90px; } .column-rule-width { -moz-rule-width: 1px; -webkit-rule-width: 1px; rule-width: 1px; } .column-rule-style { -moz-rule-style: dotted; -webkit-rule-style: dotted; rule-style: dotted; } .column-rule-color { -moz-rule-color: blue; -webkit-rule-color: blue; rule-color: blue; } .column-rule { -moz-column-rule: 1px solid blue; -webkit-column-rule: 1px solid blue; column-rule: 1px solid blue; } .column-rule-spaced { -moz-column-rule: 1px solid blue; -webkit-column-rule: 1px solid blue; column-rule: 1px solid blue; } .column-break-before { -moz-page-break-before: always; -webkit-column-break-before: always; break-before: always; } .column-break-after { -moz-page-break-after: always; -webkit-column-break-after: always; break-after: always; } .column-break-inside { -moz-page-break-inside: auto; -webkit-column-break-inside: auto; break-inside: auto; } .column-break-before-shortcut { -moz-page-break-before: always; -webkit-column-break-before: always; break-before: always; } .column-break-after-shortcut { -moz-page-break-after: always; -webkit-column-break-after: always; break-after: always; } .column-break-inside-shortcut { -moz-page-break-inside: auto; -webkit-column-break-inside: auto; break-inside: auto; } ================================================ FILE: cli/test/fixtures/stylesheets/compass/css/filters.css ================================================ .blur { /* Capability css-filters is not prefixed with -moz because 0% of users are affected which is less than the threshold of 0.1. */ /* Capability css-filters is not prefixed with -ms because 0% of users are affected which is less than the threshold of 0.1. */ /* Capability css-filters is not prefixed with -o because 0% of users are affected which is less than the threshold of 0.1. */ /* Capability css-filters is prefixed with -webkit because 50.0928% of users need it which is more than the threshold of 0.1%. */ /* Creating new -webkit context. */ -webkit-filter: blur(5px); filter: blur(5px); } .brightness { /* Capability css-filters is not prefixed with -moz because 0% of users are affected which is less than the threshold of 0.1. */ /* Capability css-filters is not prefixed with -ms because 0% of users are affected which is less than the threshold of 0.1. */ /* Capability css-filters is not prefixed with -o because 0% of users are affected which is less than the threshold of 0.1. */ /* Capability css-filters is prefixed with -webkit because 50.0928% of users need it which is more than the threshold of 0.1%. */ /* Creating new -webkit context. */ -webkit-filter: brightness(0.2); filter: brightness(0.2); } .hue-rotate { /* Capability css-filters is not prefixed with -moz because 0% of users are affected which is less than the threshold of 0.1. */ /* Capability css-filters is not prefixed with -ms because 0% of users are affected which is less than the threshold of 0.1. */ /* Capability css-filters is not prefixed with -o because 0% of users are affected which is less than the threshold of 0.1. */ /* Capability css-filters is prefixed with -webkit because 50.0928% of users need it which is more than the threshold of 0.1%. */ /* Creating new -webkit context. */ -webkit-filter: hue-rotate(20deg); filter: hue-rotate(20deg); } .contrast { /* Capability css-filters is not prefixed with -moz because 0% of users are affected which is less than the threshold of 0.1. */ /* Capability css-filters is not prefixed with -ms because 0% of users are affected which is less than the threshold of 0.1. */ /* Capability css-filters is not prefixed with -o because 0% of users are affected which is less than the threshold of 0.1. */ /* Capability css-filters is prefixed with -webkit because 50.0928% of users need it which is more than the threshold of 0.1%. */ /* Creating new -webkit context. */ -webkit-filter: contrast(150%); filter: contrast(150%); } .grayscale { /* Capability css-filters is not prefixed with -moz because 0% of users are affected which is less than the threshold of 0.1. */ /* Capability css-filters is not prefixed with -ms because 0% of users are affected which is less than the threshold of 0.1. */ /* Capability css-filters is not prefixed with -o because 0% of users are affected which is less than the threshold of 0.1. */ /* Capability css-filters is prefixed with -webkit because 50.0928% of users need it which is more than the threshold of 0.1%. */ /* Creating new -webkit context. */ -webkit-filter: grayscale(150%); filter: grayscale(150%); } .sepia { /* Capability css-filters is not prefixed with -moz because 0% of users are affected which is less than the threshold of 0.1. */ /* Capability css-filters is not prefixed with -ms because 0% of users are affected which is less than the threshold of 0.1. */ /* Capability css-filters is not prefixed with -o because 0% of users are affected which is less than the threshold of 0.1. */ /* Capability css-filters is prefixed with -webkit because 50.0928% of users need it which is more than the threshold of 0.1%. */ /* Creating new -webkit context. */ -webkit-filter: sepia(150%); filter: sepia(150%); } ================================================ FILE: cli/test/fixtures/stylesheets/compass/css/flexbox.css ================================================ .display { display: -webkit-flex; display: flex; } .flex-direction { -webkit-flex-direction: row-reverse; flex-direction: row-reverse; } .flex-wrap { -webkit-flex-wrap: wrap-reverse; flex-wrap: wrap-reverse; } .flex-flow { -webkit-flex-flow: row-reverse wrap-reverse; flex-flow: row-reverse wrap-reverse; } .order { -webkit-order: 1; order: 1; } .flex { -webkit-flex: 1 0 auto; flex: 1 0 auto; } .flex-grow { -webkit-flex-grow: 1; flex-grow: 1; } .flex-shrink { -webkit-flex-shrink: 1; flex-shrink: 1; } .flex-basis { -webkit-flex-basis: auto; flex-basis: auto; } .justify-content { -webkit-justify-content: flex-start; justify-content: flex-start; } .align-items { -webkit-align-items: flex-start; align-items: flex-start; } .align-self { -webkit-align-self: flex-start; align-self: flex-start; } .align-content { -webkit-align-content: flex-start; align-content: flex-start; } .flexbox { display: -webkit-flex; -webkit-flex-direction: row-reverse; -webkit-flex-wrap: wrap-reverse; -webkit-flex-flow: row-reverse wrap-reverse; -webkit-order: 1; -webkit-flex: 1 0 auto; -webkit-flex-grow: 1; -webkit-flex-shrink: 0; -webkit-flex-basis: auto; -webkit-justify-content: flex-start; -webkit-align-items: flex-start; -webkit-align-self: flex-start; -webkit-align-content: flex-start; display: flex; flex-direction: row-reverse; flex-wrap: wrap-reverse; flex-flow: row-reverse wrap-reverse; order: 1; flex: 1 0 auto; flex-grow: 1; flex-shrink: 0; flex-basis: auto; justify-content: flex-start; align-items: flex-start; align-self: flex-start; align-content: flex-start; } .flexbox-2 { display: -ms-flexbox; -ms-flex-flow: row-reverse; -ms-flex-order: 1; } .flexbox-1 { display: -moz-box; -moz-box-orient: vertical; -moz-box-ordinal-group: 1; -moz-box-flex: 1; display: -webkit-box; -webkit-box-orient: vertical; -webkit-box-ordinal-group: 1; -webkit-box-flex: 1; } ================================================ FILE: cli/test/fixtures/stylesheets/compass/css/fonts.css ================================================ @font-face { font-family: "font1"; src: url('/fonts/font1.eot?busted=true'); src: url('/fonts/font1.eot?&busted=true#iefix') format('embedded-opentype'), url('/fonts/font1.woff?busted=true') format('woff'); } @font-face { font-family: "Issue1491"; src: url('/fonts/font1.eot?busted=true'); src: url('/fonts/font1.eot?&busted=true#iefix') format("embedded-opentype"), url('/fonts/font1.woff?busted=true') format("woff"); } ================================================ FILE: cli/test/fixtures/stylesheets/compass/css/force-wrap.css ================================================ pre { white-space: pre; white-space: pre-wrap; white-space: pre-line; white-space: -pre-wrap; white-space: -o-pre-wrap; white-space: -moz-pre-wrap; white-space: -hp-pre-wrap; word-wrap: break-word; } ================================================ FILE: cli/test/fixtures/stylesheets/compass/css/gradients.css ================================================ .bg-shortcut-simple-image { background: white url("foo.png"); } .bg-shortcut-linear-gradient { background: white url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuMCIgeTE9IjAuMCIgeDI9IjEuMCIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2RkZGRkZCIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2FhYWFhYSIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background: white -webkit-gradient(linear, 0% 0%, 100% 100%, color-stop(0%, #dddddd), color-stop(100%, #aaaaaa)); background: white -moz-linear-gradient(top left, #dddddd, #aaaaaa); background: white -webkit-linear-gradient(top left, #dddddd, #aaaaaa); background: white linear-gradient(to bottom right, #dddddd, #aaaaaa); } .bg-shortcut-radial-gradient { background: white url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PHJhZGlhbEdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgY3g9IjUwJSIgY3k9IjUwJSIgcj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2RkZGRkZCIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2FhYWFhYSIvPjwvcmFkaWFsR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background: white -moz-radial-gradient(center center, #dddddd, #aaaaaa 100px); background: white -webkit-radial-gradient(center center, #dddddd, #aaaaaa 100px); background: white radial-gradient(center center, #dddddd, #aaaaaa 100px); } .bg-linear-gradient-angle-svg { background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjEuMCIgeTE9IjEuMCIgeDI9IjAuMCIgeTI9IjAuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzAwMDBmZiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzAwMDAwMCIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background-size: 100%; background-image: -moz-linear-gradient(135deg, #0000ff, #000000); background-image: -webkit-linear-gradient(135deg, #0000ff, #000000); background-image: linear-gradient(-45deg, #0000ff, #000000); } .bg-linear-gradient-angle2-svg { background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuMCIgeTE9IjAuMCIgeDI9IjEuMCIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzAwMDBmZiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzAwMDAwMCIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background-size: 100%; background-image: -webkit-gradient(linear, 0% 0%, 100% 100%, color-stop(0%, #0000ff), color-stop(100%, #000000)); background-image: -moz-linear-gradient(top left, #0000ff, #000000); background-image: -webkit-linear-gradient(top left, #0000ff, #000000); background-image: linear-gradient(to bottom right, #0000ff, #000000); } .bg-all-gradient-types-with-simplification { background: #ffcc00; background: url('/images/4x6.png?busted=true'), url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuMCIgeTE9IjAuMCIgeDI9IjEuMCIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2RkZGRkZCIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2FhYWFhYSIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='), url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PHJhZGlhbEdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgY3g9IjUwJSIgY3k9IjUwJSIgcj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2RkZGRkZCIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2FhYWFhYSIvPjwvcmFkaWFsR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='), #ffcc00; background: url('/images/4x6.png?busted=true'), -webkit-gradient(linear, 0% 0%, 100% 100%, color-stop(0%, #dddddd), color-stop(100%, #aaaaaa)), radial-gradient(center center, #dddddd, #aaaaaa 100px), #ffcc00; background: url('/images/4x6.png?busted=true'), -moz-linear-gradient(top left, #dddddd, #aaaaaa), -moz-radial-gradient(center center, #dddddd, #aaaaaa 100px), #ffcc00; background: url('/images/4x6.png?busted=true'), -webkit-linear-gradient(top left, #dddddd, #aaaaaa), -webkit-radial-gradient(center center, #dddddd, #aaaaaa 100px), #ffcc00; background: url('/images/4x6.png?busted=true'), linear-gradient(to bottom right, #dddddd, #aaaaaa), radial-gradient(center center, #dddddd, #aaaaaa 100px), #ffcc00; } .bg-simple-image { background-image: url("foo.png"); } .bg-linear-gradient { background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuMCIgeTE9IjAuMCIgeDI9IjEuMCIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2RkZGRkZCIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2FhYWFhYSIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background-size: 100%; background-image: -webkit-gradient(linear, 0% 0%, 100% 100%, color-stop(0%, #dddddd), color-stop(100%, #aaaaaa)); background-image: -moz-linear-gradient(top left, #dddddd, #aaaaaa); background-image: -webkit-linear-gradient(top left, #dddddd, #aaaaaa); background-image: linear-gradient(to bottom right, #dddddd, #aaaaaa); } .bg-linear-gradient-pixel-stop-from-top { background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIyNSUiIHN0b3AtY29sb3I9IiNkZGRkZGQiLz48c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNhYWFhYWEiLz48L2xpbmVhckdyYWRpZW50PjwvZGVmcz48cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWxsPSJ1cmwoI2dyYWQpIiAvPjwvc3ZnPiA='); background-size: 100%; background-image: -webkit-gradient(linear, 50% 0%, 50% 40, color-stop(25%, #dddddd), color-stop(100%, #aaaaaa)); background-image: -moz-linear-gradient(top, #dddddd 10px, #aaaaaa 40px); background-image: -webkit-linear-gradient(top, #dddddd 10px, #aaaaaa 40px); background-image: linear-gradient(to bottom, #dddddd 10px, #aaaaaa 40px); } .bg-linear-gradient-pixel-stop-from-left { background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuMCIgeTE9IjAuNSIgeDI9IjEuMCIgeTI9IjAuNSI+PHN0b3Agb2Zmc2V0PSIyNSUiIHN0b3AtY29sb3I9IiNkZGRkZGQiLz48c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNhYWFhYWEiLz48L2xpbmVhckdyYWRpZW50PjwvZGVmcz48cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWxsPSJ1cmwoI2dyYWQpIiAvPjwvc3ZnPiA='); background-size: 100%; background-image: -webkit-gradient(linear, 0% 50%, 40 50%, color-stop(25%, #dddddd), color-stop(100%, #aaaaaa)); background-image: -moz-linear-gradient(left, #dddddd 10px, #aaaaaa 40px); background-image: -webkit-linear-gradient(left, #dddddd 10px, #aaaaaa 40px); background-image: linear-gradient(to right, #dddddd 10px, #aaaaaa 40px); } .transparent-in-linear-gradient { background-image: white url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuMCIgeTE9IjAuMCIgeDI9IjEuMCIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzAwMDAwMCIgc3RvcC1vcGFjaXR5PSIwLjAiLz48c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNhYWFhYWEiLz48L2xpbmVhckdyYWRpZW50PjwvZGVmcz48cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWxsPSJ1cmwoI2dyYWQpIiAvPjwvc3ZnPiA='); background-size: 100%; background-image: white -webkit-gradient(linear, 0% 0%, 100% 100%, color-stop(0%, rgba(0, 0, 0, 0)), color-stop(100%, #aaaaaa)); background-image: white -moz-linear-gradient(top left, rgba(0, 0, 0, 0), #aaaaaa); background-image: white -webkit-linear-gradient(top left, rgba(0, 0, 0, 0), #aaaaaa); background-image: white linear-gradient(to bottom right, rgba(0, 0, 0, 0), #aaaaaa); } .currentColor-in-linear-gradient { background-image: white url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuMCIgeTE9IjAuMCIgeDI9IjEuMCIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzAwMDAwMCIgc3RvcC1vcGFjaXR5PSIwLjAiLz48c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9ImN1cnJlbnRDb2xvciIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background-size: 100%; background-image: white -webkit-gradient(linear, 0% 0%, 100% 100%, color-stop(0%, rgba(0, 0, 0, 0)), color-stop(100%, currentColor)); background-image: white -moz-linear-gradient(top left, rgba(0, 0, 0, 0), currentColor); background-image: white -webkit-linear-gradient(top left, rgba(0, 0, 0, 0), currentColor); background-image: white linear-gradient(to bottom right, rgba(0, 0, 0, 0), currentColor); } .rgba-in-linear-gradient { background-image: white url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuMCIgeTE9IjAuMCIgeDI9IjEuMCIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZmZmZmZiIgc3RvcC1vcGFjaXR5PSIwLjgiLz48c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiMwMDAwMDAiIHN0b3Atb3BhY2l0eT0iMC4xIi8+PC9saW5lYXJHcmFkaWVudD48L2RlZnM+PHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgZmlsbD0idXJsKCNncmFkKSIgLz48L3N2Zz4g'); background-size: 100%; background-image: white -webkit-gradient(linear, 0% 0%, 100% 100%, color-stop(0%, rgba(255, 255, 255, 0.8)), color-stop(100%, rgba(0, 0, 0, 0.1))); background-image: white -moz-linear-gradient(top left, rgba(255, 255, 255, 0.8), rgba(0, 0, 0, 0.1)); background-image: white -webkit-linear-gradient(top left, rgba(255, 255, 255, 0.8), rgba(0, 0, 0, 0.1)); background-image: white linear-gradient(to bottom right, rgba(255, 255, 255, 0.8), rgba(0, 0, 0, 0.1)); } .bg-radial-gradient { background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PHJhZGlhbEdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgY3g9IjUwJSIgY3k9IjUwJSIgcj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2RkZGRkZCIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzAwMDAwMCIgc3RvcC1vcGFjaXR5PSIwLjAiLz48L3JhZGlhbEdyYWRpZW50PjwvZGVmcz48cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWxsPSJ1cmwoI2dyYWQpIiAvPjwvc3ZnPiA='); background-size: 100%; background-image: -moz-radial-gradient(center center, #dddddd, rgba(0, 0, 0, 0) 100px); background-image: -webkit-radial-gradient(center center, #dddddd, rgba(0, 0, 0, 0) 100px); background-image: radial-gradient(center center, #dddddd, rgba(0, 0, 0, 0) 100px); } .currentColor-in-radial-gradient { background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PHJhZGlhbEdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgY3g9IjUwJSIgY3k9IjUwJSIgcj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iY3VycmVudENvbG9yIi8+PHN0b3Agb2Zmc2V0PSIxMDAlIiBzdG9wLWNvbG9yPSIjMDAwMDAwIiBzdG9wLW9wYWNpdHk9IjAuMCIvPjwvcmFkaWFsR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background-size: 100%; background-image: -moz-radial-gradient(center center, currentColor, rgba(0, 0, 0, 0) 100px); background-image: -webkit-radial-gradient(center center, currentColor, rgba(0, 0, 0, 0) 100px); background-image: radial-gradient(center center, currentColor, rgba(0, 0, 0, 0) 100px); } .bg-linear-gradient-with-angle { background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjEuMCIgeTE9IjEuMCIgeDI9IjAuMCIgeTI9IjAuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2RkZGRkZCIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2FhYWFhYSIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background-size: 100%; background-image: -moz-linear-gradient(135deg, #dddddd, #aaaaaa); background-image: -webkit-linear-gradient(135deg, #dddddd, #aaaaaa); background-image: linear-gradient(-45deg, #dddddd, #aaaaaa); } .bg-radial-gradient-with-angle-and-shape { background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PHJhZGlhbEdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgY3g9ImVsbGlwc2UiIGN5PSJjb3ZlciIgcj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2RkZGRkZCIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2FhYWFhYSIvPjwvcmFkaWFsR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background-size: 100%; background-image: -moz-radial-gradient(ellipse cover, #dddddd, #aaaaaa 100px); background-image: -webkit-radial-gradient(ellipse cover, #dddddd, #aaaaaa 100px); background-image: radial-gradient(ellipse cover, #dddddd, #aaaaaa 100px); } .bg-all-gradient-types { background-image: url('/images/4x6.png?busted=true'), url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuMCIgeTE9IjAuMCIgeDI9IjEuMCIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2RkZGRkZCIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2FhYWFhYSIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='), url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PHJhZGlhbEdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgY3g9IjUwJSIgY3k9IjUwJSIgcj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2RkZGRkZCIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2FhYWFhYSIvPjwvcmFkaWFsR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background-size: 100%; background-image: url('/images/4x6.png?busted=true'), -webkit-gradient(linear, 0% 0%, 100% 100%, color-stop(0%, #dddddd), color-stop(100%, #aaaaaa)), radial-gradient(center center, #dddddd, #aaaaaa 100px); background-image: url('/images/4x6.png?busted=true'), -moz-linear-gradient(top left, #dddddd, #aaaaaa), -moz-radial-gradient(center center, #dddddd, #aaaaaa 100px); background-image: url('/images/4x6.png?busted=true'), -webkit-linear-gradient(top left, #dddddd, #aaaaaa), -webkit-radial-gradient(center center, #dddddd, #aaaaaa 100px); background-image: url('/images/4x6.png?busted=true'), linear-gradient(to bottom right, #dddddd, #aaaaaa), radial-gradient(center center, #dddddd, #aaaaaa 100px); } .border-image-gradient { -moz-border-image: -moz-radial-gradient(#00ff00, #ff0000 100px) 100 stretch; -moz-border-image: radial-gradient(#00ff00, #ff0000 100px) 100 stretch; -o-border-image: radial-gradient(#00ff00, #ff0000 100px) 100 stretch; -webkit-border-image: -webkit-radial-gradient(#00ff00, #ff0000 100px) 100 stretch; -webkit-border-image: radial-gradient(#00ff00, #ff0000 100px) 100 stretch; border-image: -moz-radial-gradient(#00ff00, #ff0000 100px) 100 stretch; border-image: -webkit-radial-gradient(#00ff00, #ff0000 100px) 100 stretch; border-image: radial-gradient(#00ff00, #ff0000 100px) 100 stretch; } .direct-list-image-plain { list-style-image: url('/images/4x6.png?busted=true'); } .shorthand-list-image-plain { list-style: outside url('/images/4x6.png?busted=true'); } .direct-list-image-with-gradient { list-style-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PHJhZGlhbEdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgY3g9IjUwJSIgY3k9IjUwJSIgcj0iMTAlIj48c3RvcCBvZmZzZXQ9IjAlIiBzdG9wLWNvbG9yPSIjMDBmZjAwIi8+PHN0b3Agb2Zmc2V0PSIxMDAlIiBzdG9wLWNvbG9yPSIjZmYwMDAwIi8+PC9yYWRpYWxHcmFkaWVudD48L2RlZnM+PHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgZmlsbD0idXJsKCNncmFkKSIgLz48L3N2Zz4g'); list-style-image: -moz-radial-gradient(#00ff00, #ff0000 10px); list-style-image: -webkit-radial-gradient(#00ff00, #ff0000 10px); list-style-image: radial-gradient(#00ff00, #ff0000 10px); } .shorthand-list-image-with-gradient { list-style: outside url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PHJhZGlhbEdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgY3g9IjUwJSIgY3k9IjUwJSIgcj0iMTAlIj48c3RvcCBvZmZzZXQ9IjAlIiBzdG9wLWNvbG9yPSIjMDBmZjAwIi8+PHN0b3Agb2Zmc2V0PSIxMDAlIiBzdG9wLWNvbG9yPSIjZmYwMDAwIi8+PC9yYWRpYWxHcmFkaWVudD48L2RlZnM+PHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgZmlsbD0idXJsKCNncmFkKSIgLz48L3N2Zz4g'); list-style: outside -moz-radial-gradient(#00ff00, #ff0000 10px); list-style: outside -webkit-radial-gradient(#00ff00, #ff0000 10px); list-style: outside radial-gradient(#00ff00, #ff0000 10px); } .content-plain { content: "asdf"; } .content-with-gradient { content: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PHJhZGlhbEdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgY3g9IjUwJSIgY3k9IjUwJSIgcj0iMTAlIj48c3RvcCBvZmZzZXQ9IjAlIiBzdG9wLWNvbG9yPSIjMDBmZjAwIi8+PHN0b3Agb2Zmc2V0PSIxMDAlIiBzdG9wLWNvbG9yPSIjZmYwMDAwIi8+PC9yYWRpYWxHcmFkaWVudD48L2RlZnM+PHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgZmlsbD0idXJsKCNncmFkKSIgLz48L3N2Zz4g'); content: -moz-radial-gradient(#00ff00, #ff0000 10px); content: -webkit-radial-gradient(#00ff00, #ff0000 10px); content: radial-gradient(#00ff00, #ff0000 10px); } .bg-linear-gradient-no-position { background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #dddddd), color-stop(100%, #aaaaaa)); background-image: -moz-linear-gradient(#dddddd, #aaaaaa); background-image: -webkit-linear-gradient(#dddddd, #aaaaaa); background-image: linear-gradient(#dddddd, #aaaaaa); } .bg-radial-gradient-no-position { background-image: -moz-radial-gradient(#dddddd, #aaaaaa 100px); background-image: -webkit-radial-gradient(#dddddd, #aaaaaa 100px); background-image: radial-gradient(#dddddd, #aaaaaa 100px); } .image-fallback { background-image: image(-moz-radial-gradient(#dddddd, #aaaaaa 100px), url('/images/4x6.png?busted=true'), #cc0000); background-image: -webkit-image(-webkit-radial-gradient(#dddddd, #aaaaaa 100px), url('/images/4x6.png?busted=true'), #cc0000); background-image: image(radial-gradient(#dddddd, #aaaaaa 100px), url('/images/4x6.png?busted=true'), #cc0000); } .cross-fade { background-image: cross-fade(-moz-radial-gradient(#dddddd, #aaaaaa 100px), url('/images/4x6.png?busted=true')); background-image: -webkit-cross-fade(-webkit-radial-gradient(#dddddd, #aaaaaa 100px), url('/images/4x6.png?busted=true')); background-image: cross-fade(radial-gradient(#dddddd, #aaaaaa 100px), url('/images/4x6.png?busted=true')); } .unknown-function-wrapper { background: foo(-moz-radial-gradient(#dddddd, #aaaaaa 100px)); background: foo(-webkit-radial-gradient(#dddddd, #aaaaaa 100px)); background: foo(radial-gradient(#dddddd, #aaaaaa 100px)); } .ie-horizontal-filter { *zoom: 1; filter: progid:DXImageTransform.Microsoft.gradient(gradientType=1, startColorstr='#FFFFFFFF', endColorstr='#FF000000'); } .ie-vertical-filter { *zoom: 1; filter: progid:DXImageTransform.Microsoft.gradient(gradientType=0, startColorstr='#FFFFFFFF', endColorstr='#FF000000'); } .ie-alpha-filter { *zoom: 1; filter: progid:DXImageTransform.Microsoft.gradient(gradientType=0, startColorstr='#FFFFFFFF', endColorstr='#00FFFFFF'); } .linear-gradient-new { background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ff0000), color-stop(100%, #88aa44)); background: -moz-linear-gradient(top, #ff0000 0%, #88aa44 100%); background: -webkit-linear-gradient(top, #ff0000 0%, #88aa44 100%); background: linear-gradient(to bottom, #ff0000 0%, #88aa44 100%); } .linear-gradient-old { background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ff0000), color-stop(100%, #88aa44)); background: -moz-linear-gradient(top, #ff0000 0%, #88aa44 100%); background: -webkit-linear-gradient(top, #ff0000 0%, #88aa44 100%); background: linear-gradient(to bottom, #ff0000 0%, #88aa44 100%); } .linear-gradient-unknown-new { background: -moz-linear-gradient(330deg, #ff0000 0%, #88aa44 100%); background: -webkit-linear-gradient(330deg, #ff0000 0%, #88aa44 100%); background: linear-gradient(120deg, #ff0000 0%, #88aa44 100%); } .linear-gradient-unknown-old { background: -moz-linear-gradient(120deg, #ff0000 0%, #88aa44 100%); background: -webkit-linear-gradient(120deg, #ff0000 0%, #88aa44 100%); background: linear-gradient(330deg, #ff0000 0%, #88aa44 100%); } ================================================ FILE: cli/test/fixtures/stylesheets/compass/css/grid_background.css ================================================ .baseline { background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjEuMCIgeDI9IjAuNSIgeTI9IjAuMCI+PHN0b3Agb2Zmc2V0PSI1JSIgc3RvcC1jb2xvcj0iIzAwMDAwMCIgc3RvcC1vcGFjaXR5PSIwLjUiLz48c3RvcCBvZmZzZXQ9IjUlIiBzdG9wLWNvbG9yPSIjMDAwMDAwIiBzdG9wLW9wYWNpdHk9IjAuMCIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background-size: 100%; background-image: -webkit-gradient(linear, 50% 100%, 50% 0%, color-stop(5%, rgba(0, 0, 0, 0.5)), color-stop(5%, rgba(0, 0, 0, 0))); background-image: -moz-linear-gradient(bottom, rgba(0, 0, 0, 0.5) 5%, rgba(0, 0, 0, 0) 5%); background-image: -webkit-linear-gradient(bottom, rgba(0, 0, 0, 0.5) 5%, rgba(0, 0, 0, 0) 5%); background-image: linear-gradient(to top, rgba(0, 0, 0, 0.5) 5%, rgba(0, 0, 0, 0) 5%); -moz-background-size: 100% 1.5em; -o-background-size: 100% 1.5em; -webkit-background-size: 100% 1.5em; background-size: 100% 1.5em; background-position: left top; } .columns { background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuMCIgeTE9IjAuNSIgeDI9IjEuMCIgeTI9IjAuNSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzAwMDAwMCIgc3RvcC1vcGFjaXR5PSIwLjAiLz48c3RvcCBvZmZzZXQ9IjAlIiBzdG9wLWNvbG9yPSIjNzk3OWU1IiBzdG9wLW9wYWNpdHk9IjAuMjUiLz48c3RvcCBvZmZzZXQ9IjMuMTI1JSIgc3RvcC1jb2xvcj0iIzRmNGZkZCIgc3RvcC1vcGFjaXR5PSIwLjI1Ii8+PHN0b3Agb2Zmc2V0PSIzLjEyNSUiIHN0b3AtY29sb3I9IiMwMDAwMDAiIHN0b3Atb3BhY2l0eT0iMC4wIi8+PHN0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wvc3ZnPiA='); background-size: 100%; background-image: -webkit-gradient(linear, 0% 50%, 960 50%, color-stop(0%, rgba(0, 0, 0, 0)), color-stop(0%, rgba(121, 121, 229, 0.25)), color-stop(3.125%, rgba(79, 79, 221, 0.25)), color-stop(3.125%, rgba(0, 0, 0, 0)), color-stop(4.16667%, rgba(0, 0, 0, 0)), color-stop(4.16667%, rgba(121, 121, 229, 0.25)), color-stop(7.29167%, rgba(79, 79, 221, 0.25)), color-stop(7.29167%, rgba(0, 0, 0, 0)), color-stop(8.33333%, rgba(0, 0, 0, 0)), color-stop(8.33333%, rgba(121, 121, 229, 0.25)), color-stop(11.45833%, rgba(79, 79, 221, 0.25)), color-stop(11.45833%, rgba(0, 0, 0, 0)), color-stop(12.5%, rgba(0, 0, 0, 0)), color-stop(12.5%, rgba(121, 121, 229, 0.25)), color-stop(15.625%, rgba(79, 79, 221, 0.25)), color-stop(15.625%, rgba(0, 0, 0, 0)), color-stop(16.66667%, rgba(0, 0, 0, 0)), color-stop(16.66667%, rgba(121, 121, 229, 0.25)), color-stop(19.79167%, rgba(79, 79, 221, 0.25)), color-stop(19.79167%, rgba(0, 0, 0, 0)), color-stop(20.83333%, rgba(0, 0, 0, 0)), color-stop(20.83333%, rgba(121, 121, 229, 0.25)), color-stop(23.95833%, rgba(79, 79, 221, 0.25)), color-stop(23.95833%, rgba(0, 0, 0, 0)), color-stop(25%, rgba(0, 0, 0, 0)), color-stop(25%, rgba(121, 121, 229, 0.25)), color-stop(28.125%, rgba(79, 79, 221, 0.25)), color-stop(28.125%, rgba(0, 0, 0, 0)), color-stop(29.16667%, rgba(0, 0, 0, 0)), color-stop(29.16667%, rgba(121, 121, 229, 0.25)), color-stop(32.29167%, rgba(79, 79, 221, 0.25)), color-stop(32.29167%, rgba(0, 0, 0, 0)), color-stop(33.33333%, rgba(0, 0, 0, 0)), color-stop(33.33333%, rgba(121, 121, 229, 0.25)), color-stop(36.45833%, rgba(79, 79, 221, 0.25)), color-stop(36.45833%, rgba(0, 0, 0, 0)), color-stop(37.5%, rgba(0, 0, 0, 0)), color-stop(37.5%, rgba(121, 121, 229, 0.25)), color-stop(40.625%, rgba(79, 79, 221, 0.25)), color-stop(40.625%, rgba(0, 0, 0, 0)), color-stop(41.66667%, rgba(0, 0, 0, 0)), color-stop(41.66667%, rgba(121, 121, 229, 0.25)), color-stop(44.79167%, rgba(79, 79, 221, 0.25)), color-stop(44.79167%, rgba(0, 0, 0, 0)), color-stop(45.83333%, rgba(0, 0, 0, 0)), color-stop(45.83333%, rgba(121, 121, 229, 0.25)), color-stop(48.95833%, rgba(79, 79, 221, 0.25)), color-stop(48.95833%, rgba(0, 0, 0, 0)), color-stop(50%, rgba(0, 0, 0, 0)), color-stop(50%, rgba(121, 121, 229, 0.25)), color-stop(53.125%, rgba(79, 79, 221, 0.25)), color-stop(53.125%, rgba(0, 0, 0, 0)), color-stop(54.16667%, rgba(0, 0, 0, 0)), color-stop(54.16667%, rgba(121, 121, 229, 0.25)), color-stop(57.29167%, rgba(79, 79, 221, 0.25)), color-stop(57.29167%, rgba(0, 0, 0, 0)), color-stop(58.33333%, rgba(0, 0, 0, 0)), color-stop(58.33333%, rgba(121, 121, 229, 0.25)), color-stop(61.45833%, rgba(79, 79, 221, 0.25)), color-stop(61.45833%, rgba(0, 0, 0, 0)), color-stop(62.5%, rgba(0, 0, 0, 0)), color-stop(62.5%, rgba(121, 121, 229, 0.25)), color-stop(65.625%, rgba(79, 79, 221, 0.25)), color-stop(65.625%, rgba(0, 0, 0, 0)), color-stop(66.66667%, rgba(0, 0, 0, 0)), color-stop(66.66667%, rgba(121, 121, 229, 0.25)), color-stop(69.79167%, rgba(79, 79, 221, 0.25)), color-stop(69.79167%, rgba(0, 0, 0, 0)), color-stop(70.83333%, rgba(0, 0, 0, 0)), color-stop(70.83333%, rgba(121, 121, 229, 0.25)), color-stop(73.95833%, rgba(79, 79, 221, 0.25)), color-stop(73.95833%, rgba(0, 0, 0, 0)), color-stop(75%, rgba(0, 0, 0, 0)), color-stop(75%, rgba(121, 121, 229, 0.25)), color-stop(78.125%, rgba(79, 79, 221, 0.25)), color-stop(78.125%, rgba(0, 0, 0, 0)), color-stop(79.16667%, rgba(0, 0, 0, 0)), color-stop(79.16667%, rgba(121, 121, 229, 0.25)), color-stop(82.29167%, rgba(79, 79, 221, 0.25)), color-stop(82.29167%, rgba(0, 0, 0, 0)), color-stop(83.33333%, rgba(0, 0, 0, 0)), color-stop(83.33333%, rgba(121, 121, 229, 0.25)), color-stop(86.45833%, rgba(79, 79, 221, 0.25)), color-stop(86.45833%, rgba(0, 0, 0, 0)), color-stop(87.5%, rgba(0, 0, 0, 0)), color-stop(87.5%, rgba(121, 121, 229, 0.25)), color-stop(90.625%, rgba(79, 79, 221, 0.25)), color-stop(90.625%, rgba(0, 0, 0, 0)), color-stop(91.66667%, rgba(0, 0, 0, 0)), color-stop(91.66667%, rgba(121, 121, 229, 0.25)), color-stop(94.79167%, rgba(79, 79, 221, 0.25)), color-stop(94.79167%, rgba(0, 0, 0, 0)), color-stop(95.83333%, rgba(0, 0, 0, 0)), color-stop(95.83333%, rgba(121, 121, 229, 0.25)), color-stop(98.95833%, rgba(79, 79, 221, 0.25)), color-stop(98.95833%, rgba(0, 0, 0, 0)), color-stop(100%, rgba(0, 0, 0, 0))); background-image: -moz-linear-gradient(left, rgba(0, 0, 0, 0) 0px, rgba(121, 121, 229, 0.25) 0px, rgba(79, 79, 221, 0.25) 30px, rgba(0, 0, 0, 0) 30px, rgba(0, 0, 0, 0) 40px, rgba(121, 121, 229, 0.25) 40px, rgba(79, 79, 221, 0.25) 70px, rgba(0, 0, 0, 0) 70px, rgba(0, 0, 0, 0) 80px, rgba(121, 121, 229, 0.25) 80px, rgba(79, 79, 221, 0.25) 110px, rgba(0, 0, 0, 0) 110px, rgba(0, 0, 0, 0) 120px, rgba(121, 121, 229, 0.25) 120px, rgba(79, 79, 221, 0.25) 150px, rgba(0, 0, 0, 0) 150px, rgba(0, 0, 0, 0) 160px, rgba(121, 121, 229, 0.25) 160px, rgba(79, 79, 221, 0.25) 190px, rgba(0, 0, 0, 0) 190px, rgba(0, 0, 0, 0) 200px, rgba(121, 121, 229, 0.25) 200px, rgba(79, 79, 221, 0.25) 230px, rgba(0, 0, 0, 0) 230px, rgba(0, 0, 0, 0) 240px, rgba(121, 121, 229, 0.25) 240px, rgba(79, 79, 221, 0.25) 270px, rgba(0, 0, 0, 0) 270px, rgba(0, 0, 0, 0) 280px, rgba(121, 121, 229, 0.25) 280px, rgba(79, 79, 221, 0.25) 310px, rgba(0, 0, 0, 0) 310px, rgba(0, 0, 0, 0) 320px, rgba(121, 121, 229, 0.25) 320px, rgba(79, 79, 221, 0.25) 350px, rgba(0, 0, 0, 0) 350px, rgba(0, 0, 0, 0) 360px, rgba(121, 121, 229, 0.25) 360px, rgba(79, 79, 221, 0.25) 390px, rgba(0, 0, 0, 0) 390px, rgba(0, 0, 0, 0) 400px, rgba(121, 121, 229, 0.25) 400px, rgba(79, 79, 221, 0.25) 430px, rgba(0, 0, 0, 0) 430px, rgba(0, 0, 0, 0) 440px, rgba(121, 121, 229, 0.25) 440px, rgba(79, 79, 221, 0.25) 470px, rgba(0, 0, 0, 0) 470px, rgba(0, 0, 0, 0) 480px, rgba(121, 121, 229, 0.25) 480px, rgba(79, 79, 221, 0.25) 510px, rgba(0, 0, 0, 0) 510px, rgba(0, 0, 0, 0) 520px, rgba(121, 121, 229, 0.25) 520px, rgba(79, 79, 221, 0.25) 550px, rgba(0, 0, 0, 0) 550px, rgba(0, 0, 0, 0) 560px, rgba(121, 121, 229, 0.25) 560px, rgba(79, 79, 221, 0.25) 590px, rgba(0, 0, 0, 0) 590px, rgba(0, 0, 0, 0) 600px, rgba(121, 121, 229, 0.25) 600px, rgba(79, 79, 221, 0.25) 630px, rgba(0, 0, 0, 0) 630px, rgba(0, 0, 0, 0) 640px, rgba(121, 121, 229, 0.25) 640px, rgba(79, 79, 221, 0.25) 670px, rgba(0, 0, 0, 0) 670px, rgba(0, 0, 0, 0) 680px, rgba(121, 121, 229, 0.25) 680px, rgba(79, 79, 221, 0.25) 710px, rgba(0, 0, 0, 0) 710px, rgba(0, 0, 0, 0) 720px, rgba(121, 121, 229, 0.25) 720px, rgba(79, 79, 221, 0.25) 750px, rgba(0, 0, 0, 0) 750px, rgba(0, 0, 0, 0) 760px, rgba(121, 121, 229, 0.25) 760px, rgba(79, 79, 221, 0.25) 790px, rgba(0, 0, 0, 0) 790px, rgba(0, 0, 0, 0) 800px, rgba(121, 121, 229, 0.25) 800px, rgba(79, 79, 221, 0.25) 830px, rgba(0, 0, 0, 0) 830px, rgba(0, 0, 0, 0) 840px, rgba(121, 121, 229, 0.25) 840px, rgba(79, 79, 221, 0.25) 870px, rgba(0, 0, 0, 0) 870px, rgba(0, 0, 0, 0) 880px, rgba(121, 121, 229, 0.25) 880px, rgba(79, 79, 221, 0.25) 910px, rgba(0, 0, 0, 0) 910px, rgba(0, 0, 0, 0) 920px, rgba(121, 121, 229, 0.25) 920px, rgba(79, 79, 221, 0.25) 950px, rgba(0, 0, 0, 0) 950px, rgba(0, 0, 0, 0) 960px); background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, 0) 0px, rgba(121, 121, 229, 0.25) 0px, rgba(79, 79, 221, 0.25) 30px, rgba(0, 0, 0, 0) 30px, rgba(0, 0, 0, 0) 40px, rgba(121, 121, 229, 0.25) 40px, rgba(79, 79, 221, 0.25) 70px, rgba(0, 0, 0, 0) 70px, rgba(0, 0, 0, 0) 80px, rgba(121, 121, 229, 0.25) 80px, rgba(79, 79, 221, 0.25) 110px, rgba(0, 0, 0, 0) 110px, rgba(0, 0, 0, 0) 120px, rgba(121, 121, 229, 0.25) 120px, rgba(79, 79, 221, 0.25) 150px, rgba(0, 0, 0, 0) 150px, rgba(0, 0, 0, 0) 160px, rgba(121, 121, 229, 0.25) 160px, rgba(79, 79, 221, 0.25) 190px, rgba(0, 0, 0, 0) 190px, rgba(0, 0, 0, 0) 200px, rgba(121, 121, 229, 0.25) 200px, rgba(79, 79, 221, 0.25) 230px, rgba(0, 0, 0, 0) 230px, rgba(0, 0, 0, 0) 240px, rgba(121, 121, 229, 0.25) 240px, rgba(79, 79, 221, 0.25) 270px, rgba(0, 0, 0, 0) 270px, rgba(0, 0, 0, 0) 280px, rgba(121, 121, 229, 0.25) 280px, rgba(79, 79, 221, 0.25) 310px, rgba(0, 0, 0, 0) 310px, rgba(0, 0, 0, 0) 320px, rgba(121, 121, 229, 0.25) 320px, rgba(79, 79, 221, 0.25) 350px, rgba(0, 0, 0, 0) 350px, rgba(0, 0, 0, 0) 360px, rgba(121, 121, 229, 0.25) 360px, rgba(79, 79, 221, 0.25) 390px, rgba(0, 0, 0, 0) 390px, rgba(0, 0, 0, 0) 400px, rgba(121, 121, 229, 0.25) 400px, rgba(79, 79, 221, 0.25) 430px, rgba(0, 0, 0, 0) 430px, rgba(0, 0, 0, 0) 440px, rgba(121, 121, 229, 0.25) 440px, rgba(79, 79, 221, 0.25) 470px, rgba(0, 0, 0, 0) 470px, rgba(0, 0, 0, 0) 480px, rgba(121, 121, 229, 0.25) 480px, rgba(79, 79, 221, 0.25) 510px, rgba(0, 0, 0, 0) 510px, rgba(0, 0, 0, 0) 520px, rgba(121, 121, 229, 0.25) 520px, rgba(79, 79, 221, 0.25) 550px, rgba(0, 0, 0, 0) 550px, rgba(0, 0, 0, 0) 560px, rgba(121, 121, 229, 0.25) 560px, rgba(79, 79, 221, 0.25) 590px, rgba(0, 0, 0, 0) 590px, rgba(0, 0, 0, 0) 600px, rgba(121, 121, 229, 0.25) 600px, rgba(79, 79, 221, 0.25) 630px, rgba(0, 0, 0, 0) 630px, rgba(0, 0, 0, 0) 640px, rgba(121, 121, 229, 0.25) 640px, rgba(79, 79, 221, 0.25) 670px, rgba(0, 0, 0, 0) 670px, rgba(0, 0, 0, 0) 680px, rgba(121, 121, 229, 0.25) 680px, rgba(79, 79, 221, 0.25) 710px, rgba(0, 0, 0, 0) 710px, rgba(0, 0, 0, 0) 720px, rgba(121, 121, 229, 0.25) 720px, rgba(79, 79, 221, 0.25) 750px, rgba(0, 0, 0, 0) 750px, rgba(0, 0, 0, 0) 760px, rgba(121, 121, 229, 0.25) 760px, rgba(79, 79, 221, 0.25) 790px, rgba(0, 0, 0, 0) 790px, rgba(0, 0, 0, 0) 800px, rgba(121, 121, 229, 0.25) 800px, rgba(79, 79, 221, 0.25) 830px, rgba(0, 0, 0, 0) 830px, rgba(0, 0, 0, 0) 840px, rgba(121, 121, 229, 0.25) 840px, rgba(79, 79, 221, 0.25) 870px, rgba(0, 0, 0, 0) 870px, rgba(0, 0, 0, 0) 880px, rgba(121, 121, 229, 0.25) 880px, rgba(79, 79, 221, 0.25) 910px, rgba(0, 0, 0, 0) 910px, rgba(0, 0, 0, 0) 920px, rgba(121, 121, 229, 0.25) 920px, rgba(79, 79, 221, 0.25) 950px, rgba(0, 0, 0, 0) 950px, rgba(0, 0, 0, 0) 960px); background-image: linear-gradient(to right, rgba(0, 0, 0, 0) 0px, rgba(121, 121, 229, 0.25) 0px, rgba(79, 79, 221, 0.25) 30px, rgba(0, 0, 0, 0) 30px, rgba(0, 0, 0, 0) 40px, rgba(121, 121, 229, 0.25) 40px, rgba(79, 79, 221, 0.25) 70px, rgba(0, 0, 0, 0) 70px, rgba(0, 0, 0, 0) 80px, rgba(121, 121, 229, 0.25) 80px, rgba(79, 79, 221, 0.25) 110px, rgba(0, 0, 0, 0) 110px, rgba(0, 0, 0, 0) 120px, rgba(121, 121, 229, 0.25) 120px, rgba(79, 79, 221, 0.25) 150px, rgba(0, 0, 0, 0) 150px, rgba(0, 0, 0, 0) 160px, rgba(121, 121, 229, 0.25) 160px, rgba(79, 79, 221, 0.25) 190px, rgba(0, 0, 0, 0) 190px, rgba(0, 0, 0, 0) 200px, rgba(121, 121, 229, 0.25) 200px, rgba(79, 79, 221, 0.25) 230px, rgba(0, 0, 0, 0) 230px, rgba(0, 0, 0, 0) 240px, rgba(121, 121, 229, 0.25) 240px, rgba(79, 79, 221, 0.25) 270px, rgba(0, 0, 0, 0) 270px, rgba(0, 0, 0, 0) 280px, rgba(121, 121, 229, 0.25) 280px, rgba(79, 79, 221, 0.25) 310px, rgba(0, 0, 0, 0) 310px, rgba(0, 0, 0, 0) 320px, rgba(121, 121, 229, 0.25) 320px, rgba(79, 79, 221, 0.25) 350px, rgba(0, 0, 0, 0) 350px, rgba(0, 0, 0, 0) 360px, rgba(121, 121, 229, 0.25) 360px, rgba(79, 79, 221, 0.25) 390px, rgba(0, 0, 0, 0) 390px, rgba(0, 0, 0, 0) 400px, rgba(121, 121, 229, 0.25) 400px, rgba(79, 79, 221, 0.25) 430px, rgba(0, 0, 0, 0) 430px, rgba(0, 0, 0, 0) 440px, rgba(121, 121, 229, 0.25) 440px, rgba(79, 79, 221, 0.25) 470px, rgba(0, 0, 0, 0) 470px, rgba(0, 0, 0, 0) 480px, rgba(121, 121, 229, 0.25) 480px, rgba(79, 79, 221, 0.25) 510px, rgba(0, 0, 0, 0) 510px, rgba(0, 0, 0, 0) 520px, rgba(121, 121, 229, 0.25) 520px, rgba(79, 79, 221, 0.25) 550px, rgba(0, 0, 0, 0) 550px, rgba(0, 0, 0, 0) 560px, rgba(121, 121, 229, 0.25) 560px, rgba(79, 79, 221, 0.25) 590px, rgba(0, 0, 0, 0) 590px, rgba(0, 0, 0, 0) 600px, rgba(121, 121, 229, 0.25) 600px, rgba(79, 79, 221, 0.25) 630px, rgba(0, 0, 0, 0) 630px, rgba(0, 0, 0, 0) 640px, rgba(121, 121, 229, 0.25) 640px, rgba(79, 79, 221, 0.25) 670px, rgba(0, 0, 0, 0) 670px, rgba(0, 0, 0, 0) 680px, rgba(121, 121, 229, 0.25) 680px, rgba(79, 79, 221, 0.25) 710px, rgba(0, 0, 0, 0) 710px, rgba(0, 0, 0, 0) 720px, rgba(121, 121, 229, 0.25) 720px, rgba(79, 79, 221, 0.25) 750px, rgba(0, 0, 0, 0) 750px, rgba(0, 0, 0, 0) 760px, rgba(121, 121, 229, 0.25) 760px, rgba(79, 79, 221, 0.25) 790px, rgba(0, 0, 0, 0) 790px, rgba(0, 0, 0, 0) 800px, rgba(121, 121, 229, 0.25) 800px, rgba(79, 79, 221, 0.25) 830px, rgba(0, 0, 0, 0) 830px, rgba(0, 0, 0, 0) 840px, rgba(121, 121, 229, 0.25) 840px, rgba(79, 79, 221, 0.25) 870px, rgba(0, 0, 0, 0) 870px, rgba(0, 0, 0, 0) 880px, rgba(121, 121, 229, 0.25) 880px, rgba(79, 79, 221, 0.25) 910px, rgba(0, 0, 0, 0) 910px, rgba(0, 0, 0, 0) 920px, rgba(121, 121, 229, 0.25) 920px, rgba(79, 79, 221, 0.25) 950px, rgba(0, 0, 0, 0) 950px, rgba(0, 0, 0, 0) 960px); background-position: left top; } .combined { background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjEuMCIgeDI9IjAuNSIgeTI9IjAuMCI+PHN0b3Agb2Zmc2V0PSI1JSIgc3RvcC1jb2xvcj0iIzAwMDAwMCIgc3RvcC1vcGFjaXR5PSIwLjUiLz48c3RvcCBvZmZzZXQ9IjUlIiBzdG9wLWNvbG9yPSIjMDAwMDAwIiBzdG9wLW9wYWNpdHk9IjAuMCIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='), url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPH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ijk1LjgzMzMzJSIgc3RvcC1jb2xvcj0iIzAwMDAwMCIgc3RvcC1vcGFjaXR5PSIwLjAiLz48c3RvcCBvZmZzZXQ9Ijk1LjgzMzMzJSIgc3RvcC1jb2xvcj0iIzc5NzllNSIgc3RvcC1vcGFjaXR5PSIwLjI1Ii8+PHN0b3Agb2Zmc2V0PSI5OC45NTgzMyUiIHN0b3AtY29sb3I9IiM0ZjRmZGQiIHN0b3Atb3BhY2l0eT0iMC4yNSIvPjxzdG9wIG9mZnNldD0iOTguOTU4MzMlIiBzdG9wLWNvbG9yPSIjMDAwMDAwIiBzdG9wLW9wYWNpdHk9IjAuMCIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzAwMDAwMCIgc3RvcC1vcGFjaXR5PSIwLjAiLz48L2xpbmVhckdyYWRpZW50PjwvZGVmcz48cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWxsPSJ1cmwoI2dyYWQpIiAvPjwvc3ZnPiA='); background-size: 100%; background-image: -webkit-gradient(linear, 50% 100%, 50% 0%, color-stop(5%, rgba(0, 0, 0, 0.5)), color-stop(5%, rgba(0, 0, 0, 0))), -webkit-gradient(linear, 0% 50%, 960 50%, color-stop(0%, rgba(0, 0, 0, 0)), color-stop(0%, rgba(121, 121, 229, 0.25)), color-stop(3.125%, rgba(79, 79, 221, 0.25)), color-stop(3.125%, rgba(0, 0, 0, 0)), color-stop(4.16667%, rgba(0, 0, 0, 0)), color-stop(4.16667%, rgba(121, 121, 229, 0.25)), color-stop(7.29167%, rgba(79, 79, 221, 0.25)), color-stop(7.29167%, rgba(0, 0, 0, 0)), color-stop(8.33333%, rgba(0, 0, 0, 0)), color-stop(8.33333%, rgba(121, 121, 229, 0.25)), color-stop(11.45833%, rgba(79, 79, 221, 0.25)), color-stop(11.45833%, rgba(0, 0, 0, 0)), color-stop(12.5%, rgba(0, 0, 0, 0)), color-stop(12.5%, rgba(121, 121, 229, 0.25)), color-stop(15.625%, rgba(79, 79, 221, 0.25)), color-stop(15.625%, rgba(0, 0, 0, 0)), color-stop(16.66667%, rgba(0, 0, 0, 0)), color-stop(16.66667%, rgba(121, 121, 229, 0.25)), color-stop(19.79167%, rgba(79, 79, 221, 0.25)), color-stop(19.79167%, rgba(0, 0, 0, 0)), color-stop(20.83333%, rgba(0, 0, 0, 0)), color-stop(20.83333%, rgba(121, 121, 229, 0.25)), color-stop(23.95833%, rgba(79, 79, 221, 0.25)), color-stop(23.95833%, rgba(0, 0, 0, 0)), color-stop(25%, rgba(0, 0, 0, 0)), color-stop(25%, rgba(121, 121, 229, 0.25)), color-stop(28.125%, rgba(79, 79, 221, 0.25)), color-stop(28.125%, rgba(0, 0, 0, 0)), color-stop(29.16667%, rgba(0, 0, 0, 0)), color-stop(29.16667%, rgba(121, 121, 229, 0.25)), color-stop(32.29167%, rgba(79, 79, 221, 0.25)), color-stop(32.29167%, rgba(0, 0, 0, 0)), color-stop(33.33333%, rgba(0, 0, 0, 0)), color-stop(33.33333%, rgba(121, 121, 229, 0.25)), color-stop(36.45833%, rgba(79, 79, 221, 0.25)), color-stop(36.45833%, rgba(0, 0, 0, 0)), color-stop(37.5%, rgba(0, 0, 0, 0)), color-stop(37.5%, rgba(121, 121, 229, 0.25)), color-stop(40.625%, rgba(79, 79, 221, 0.25)), color-stop(40.625%, rgba(0, 0, 0, 0)), color-stop(41.66667%, rgba(0, 0, 0, 0)), color-stop(41.66667%, rgba(121, 121, 229, 0.25)), color-stop(44.79167%, rgba(79, 79, 221, 0.25)), color-stop(44.79167%, rgba(0, 0, 0, 0)), color-stop(45.83333%, rgba(0, 0, 0, 0)), color-stop(45.83333%, rgba(121, 121, 229, 0.25)), color-stop(48.95833%, rgba(79, 79, 221, 0.25)), color-stop(48.95833%, rgba(0, 0, 0, 0)), color-stop(50%, rgba(0, 0, 0, 0)), color-stop(50%, rgba(121, 121, 229, 0.25)), color-stop(53.125%, rgba(79, 79, 221, 0.25)), color-stop(53.125%, rgba(0, 0, 0, 0)), color-stop(54.16667%, rgba(0, 0, 0, 0)), color-stop(54.16667%, rgba(121, 121, 229, 0.25)), color-stop(57.29167%, rgba(79, 79, 221, 0.25)), color-stop(57.29167%, rgba(0, 0, 0, 0)), color-stop(58.33333%, rgba(0, 0, 0, 0)), color-stop(58.33333%, rgba(121, 121, 229, 0.25)), color-stop(61.45833%, rgba(79, 79, 221, 0.25)), color-stop(61.45833%, rgba(0, 0, 0, 0)), color-stop(62.5%, rgba(0, 0, 0, 0)), color-stop(62.5%, rgba(121, 121, 229, 0.25)), color-stop(65.625%, rgba(79, 79, 221, 0.25)), color-stop(65.625%, rgba(0, 0, 0, 0)), color-stop(66.66667%, rgba(0, 0, 0, 0)), color-stop(66.66667%, rgba(121, 121, 229, 0.25)), color-stop(69.79167%, rgba(79, 79, 221, 0.25)), color-stop(69.79167%, rgba(0, 0, 0, 0)), color-stop(70.83333%, rgba(0, 0, 0, 0)), color-stop(70.83333%, rgba(121, 121, 229, 0.25)), color-stop(73.95833%, rgba(79, 79, 221, 0.25)), color-stop(73.95833%, rgba(0, 0, 0, 0)), color-stop(75%, rgba(0, 0, 0, 0)), color-stop(75%, rgba(121, 121, 229, 0.25)), color-stop(78.125%, rgba(79, 79, 221, 0.25)), color-stop(78.125%, rgba(0, 0, 0, 0)), color-stop(79.16667%, rgba(0, 0, 0, 0)), color-stop(79.16667%, rgba(121, 121, 229, 0.25)), color-stop(82.29167%, rgba(79, 79, 221, 0.25)), color-stop(82.29167%, rgba(0, 0, 0, 0)), color-stop(83.33333%, rgba(0, 0, 0, 0)), color-stop(83.33333%, rgba(121, 121, 229, 0.25)), color-stop(86.45833%, rgba(79, 79, 221, 0.25)), color-stop(86.45833%, rgba(0, 0, 0, 0)), color-stop(87.5%, rgba(0, 0, 0, 0)), color-stop(87.5%, rgba(121, 121, 229, 0.25)), color-stop(90.625%, rgba(79, 79, 221, 0.25)), color-stop(90.625%, rgba(0, 0, 0, 0)), color-stop(91.66667%, rgba(0, 0, 0, 0)), color-stop(91.66667%, rgba(121, 121, 229, 0.25)), color-stop(94.79167%, rgba(79, 79, 221, 0.25)), color-stop(94.79167%, rgba(0, 0, 0, 0)), color-stop(95.83333%, rgba(0, 0, 0, 0)), color-stop(95.83333%, rgba(121, 121, 229, 0.25)), color-stop(98.95833%, rgba(79, 79, 221, 0.25)), color-stop(98.95833%, rgba(0, 0, 0, 0)), color-stop(100%, rgba(0, 0, 0, 0))); background-image: -moz-linear-gradient(bottom, rgba(0, 0, 0, 0.5) 5%, rgba(0, 0, 0, 0) 5%), -moz-linear-gradient(left, rgba(0, 0, 0, 0) 0px, rgba(121, 121, 229, 0.25) 0px, rgba(79, 79, 221, 0.25) 30px, rgba(0, 0, 0, 0) 30px, rgba(0, 0, 0, 0) 40px, rgba(121, 121, 229, 0.25) 40px, rgba(79, 79, 221, 0.25) 70px, rgba(0, 0, 0, 0) 70px, rgba(0, 0, 0, 0) 80px, rgba(121, 121, 229, 0.25) 80px, rgba(79, 79, 221, 0.25) 110px, rgba(0, 0, 0, 0) 110px, rgba(0, 0, 0, 0) 120px, rgba(121, 121, 229, 0.25) 120px, rgba(79, 79, 221, 0.25) 150px, rgba(0, 0, 0, 0) 150px, rgba(0, 0, 0, 0) 160px, rgba(121, 121, 229, 0.25) 160px, rgba(79, 79, 221, 0.25) 190px, rgba(0, 0, 0, 0) 190px, rgba(0, 0, 0, 0) 200px, rgba(121, 121, 229, 0.25) 200px, rgba(79, 79, 221, 0.25) 230px, rgba(0, 0, 0, 0) 230px, rgba(0, 0, 0, 0) 240px, rgba(121, 121, 229, 0.25) 240px, rgba(79, 79, 221, 0.25) 270px, rgba(0, 0, 0, 0) 270px, rgba(0, 0, 0, 0) 280px, rgba(121, 121, 229, 0.25) 280px, rgba(79, 79, 221, 0.25) 310px, rgba(0, 0, 0, 0) 310px, rgba(0, 0, 0, 0) 320px, rgba(121, 121, 229, 0.25) 320px, rgba(79, 79, 221, 0.25) 350px, rgba(0, 0, 0, 0) 350px, rgba(0, 0, 0, 0) 360px, rgba(121, 121, 229, 0.25) 360px, rgba(79, 79, 221, 0.25) 390px, rgba(0, 0, 0, 0) 390px, rgba(0, 0, 0, 0) 400px, rgba(121, 121, 229, 0.25) 400px, rgba(79, 79, 221, 0.25) 430px, rgba(0, 0, 0, 0) 430px, rgba(0, 0, 0, 0) 440px, rgba(121, 121, 229, 0.25) 440px, rgba(79, 79, 221, 0.25) 470px, rgba(0, 0, 0, 0) 470px, rgba(0, 0, 0, 0) 480px, rgba(121, 121, 229, 0.25) 480px, rgba(79, 79, 221, 0.25) 510px, rgba(0, 0, 0, 0) 510px, rgba(0, 0, 0, 0) 520px, rgba(121, 121, 229, 0.25) 520px, rgba(79, 79, 221, 0.25) 550px, rgba(0, 0, 0, 0) 550px, rgba(0, 0, 0, 0) 560px, rgba(121, 121, 229, 0.25) 560px, rgba(79, 79, 221, 0.25) 590px, rgba(0, 0, 0, 0) 590px, rgba(0, 0, 0, 0) 600px, rgba(121, 121, 229, 0.25) 600px, rgba(79, 79, 221, 0.25) 630px, rgba(0, 0, 0, 0) 630px, rgba(0, 0, 0, 0) 640px, rgba(121, 121, 229, 0.25) 640px, rgba(79, 79, 221, 0.25) 670px, rgba(0, 0, 0, 0) 670px, rgba(0, 0, 0, 0) 680px, rgba(121, 121, 229, 0.25) 680px, rgba(79, 79, 221, 0.25) 710px, rgba(0, 0, 0, 0) 710px, rgba(0, 0, 0, 0) 720px, rgba(121, 121, 229, 0.25) 720px, rgba(79, 79, 221, 0.25) 750px, rgba(0, 0, 0, 0) 750px, rgba(0, 0, 0, 0) 760px, rgba(121, 121, 229, 0.25) 760px, rgba(79, 79, 221, 0.25) 790px, rgba(0, 0, 0, 0) 790px, rgba(0, 0, 0, 0) 800px, rgba(121, 121, 229, 0.25) 800px, rgba(79, 79, 221, 0.25) 830px, rgba(0, 0, 0, 0) 830px, rgba(0, 0, 0, 0) 840px, rgba(121, 121, 229, 0.25) 840px, rgba(79, 79, 221, 0.25) 870px, rgba(0, 0, 0, 0) 870px, rgba(0, 0, 0, 0) 880px, rgba(121, 121, 229, 0.25) 880px, rgba(79, 79, 221, 0.25) 910px, rgba(0, 0, 0, 0) 910px, rgba(0, 0, 0, 0) 920px, rgba(121, 121, 229, 0.25) 920px, rgba(79, 79, 221, 0.25) 950px, rgba(0, 0, 0, 0) 950px, rgba(0, 0, 0, 0) 960px); background-image: -webkit-linear-gradient(bottom, rgba(0, 0, 0, 0.5) 5%, rgba(0, 0, 0, 0) 5%), -webkit-linear-gradient(left, rgba(0, 0, 0, 0) 0px, rgba(121, 121, 229, 0.25) 0px, rgba(79, 79, 221, 0.25) 30px, rgba(0, 0, 0, 0) 30px, rgba(0, 0, 0, 0) 40px, rgba(121, 121, 229, 0.25) 40px, rgba(79, 79, 221, 0.25) 70px, rgba(0, 0, 0, 0) 70px, rgba(0, 0, 0, 0) 80px, rgba(121, 121, 229, 0.25) 80px, rgba(79, 79, 221, 0.25) 110px, rgba(0, 0, 0, 0) 110px, rgba(0, 0, 0, 0) 120px, rgba(121, 121, 229, 0.25) 120px, rgba(79, 79, 221, 0.25) 150px, rgba(0, 0, 0, 0) 150px, rgba(0, 0, 0, 0) 160px, rgba(121, 121, 229, 0.25) 160px, rgba(79, 79, 221, 0.25) 190px, rgba(0, 0, 0, 0) 190px, rgba(0, 0, 0, 0) 200px, rgba(121, 121, 229, 0.25) 200px, rgba(79, 79, 221, 0.25) 230px, rgba(0, 0, 0, 0) 230px, rgba(0, 0, 0, 0) 240px, rgba(121, 121, 229, 0.25) 240px, rgba(79, 79, 221, 0.25) 270px, rgba(0, 0, 0, 0) 270px, rgba(0, 0, 0, 0) 280px, rgba(121, 121, 229, 0.25) 280px, rgba(79, 79, 221, 0.25) 310px, rgba(0, 0, 0, 0) 310px, rgba(0, 0, 0, 0) 320px, rgba(121, 121, 229, 0.25) 320px, rgba(79, 79, 221, 0.25) 350px, rgba(0, 0, 0, 0) 350px, rgba(0, 0, 0, 0) 360px, rgba(121, 121, 229, 0.25) 360px, rgba(79, 79, 221, 0.25) 390px, rgba(0, 0, 0, 0) 390px, rgba(0, 0, 0, 0) 400px, rgba(121, 121, 229, 0.25) 400px, rgba(79, 79, 221, 0.25) 430px, rgba(0, 0, 0, 0) 430px, rgba(0, 0, 0, 0) 440px, rgba(121, 121, 229, 0.25) 440px, rgba(79, 79, 221, 0.25) 470px, rgba(0, 0, 0, 0) 470px, rgba(0, 0, 0, 0) 480px, rgba(121, 121, 229, 0.25) 480px, rgba(79, 79, 221, 0.25) 510px, rgba(0, 0, 0, 0) 510px, rgba(0, 0, 0, 0) 520px, rgba(121, 121, 229, 0.25) 520px, rgba(79, 79, 221, 0.25) 550px, rgba(0, 0, 0, 0) 550px, rgba(0, 0, 0, 0) 560px, rgba(121, 121, 229, 0.25) 560px, rgba(79, 79, 221, 0.25) 590px, rgba(0, 0, 0, 0) 590px, rgba(0, 0, 0, 0) 600px, rgba(121, 121, 229, 0.25) 600px, rgba(79, 79, 221, 0.25) 630px, rgba(0, 0, 0, 0) 630px, rgba(0, 0, 0, 0) 640px, rgba(121, 121, 229, 0.25) 640px, rgba(79, 79, 221, 0.25) 670px, rgba(0, 0, 0, 0) 670px, rgba(0, 0, 0, 0) 680px, rgba(121, 121, 229, 0.25) 680px, rgba(79, 79, 221, 0.25) 710px, rgba(0, 0, 0, 0) 710px, rgba(0, 0, 0, 0) 720px, rgba(121, 121, 229, 0.25) 720px, rgba(79, 79, 221, 0.25) 750px, rgba(0, 0, 0, 0) 750px, rgba(0, 0, 0, 0) 760px, rgba(121, 121, 229, 0.25) 760px, rgba(79, 79, 221, 0.25) 790px, rgba(0, 0, 0, 0) 790px, rgba(0, 0, 0, 0) 800px, rgba(121, 121, 229, 0.25) 800px, rgba(79, 79, 221, 0.25) 830px, rgba(0, 0, 0, 0) 830px, rgba(0, 0, 0, 0) 840px, rgba(121, 121, 229, 0.25) 840px, rgba(79, 79, 221, 0.25) 870px, rgba(0, 0, 0, 0) 870px, rgba(0, 0, 0, 0) 880px, rgba(121, 121, 229, 0.25) 880px, rgba(79, 79, 221, 0.25) 910px, rgba(0, 0, 0, 0) 910px, rgba(0, 0, 0, 0) 920px, rgba(121, 121, 229, 0.25) 920px, rgba(79, 79, 221, 0.25) 950px, rgba(0, 0, 0, 0) 950px, rgba(0, 0, 0, 0) 960px); background-image: linear-gradient(to top, rgba(0, 0, 0, 0.5) 5%, rgba(0, 0, 0, 0) 5%), linear-gradient(to right, rgba(0, 0, 0, 0) 0px, rgba(121, 121, 229, 0.25) 0px, rgba(79, 79, 221, 0.25) 30px, rgba(0, 0, 0, 0) 30px, rgba(0, 0, 0, 0) 40px, rgba(121, 121, 229, 0.25) 40px, rgba(79, 79, 221, 0.25) 70px, rgba(0, 0, 0, 0) 70px, rgba(0, 0, 0, 0) 80px, rgba(121, 121, 229, 0.25) 80px, rgba(79, 79, 221, 0.25) 110px, rgba(0, 0, 0, 0) 110px, rgba(0, 0, 0, 0) 120px, rgba(121, 121, 229, 0.25) 120px, rgba(79, 79, 221, 0.25) 150px, rgba(0, 0, 0, 0) 150px, rgba(0, 0, 0, 0) 160px, rgba(121, 121, 229, 0.25) 160px, rgba(79, 79, 221, 0.25) 190px, rgba(0, 0, 0, 0) 190px, rgba(0, 0, 0, 0) 200px, rgba(121, 121, 229, 0.25) 200px, rgba(79, 79, 221, 0.25) 230px, rgba(0, 0, 0, 0) 230px, rgba(0, 0, 0, 0) 240px, rgba(121, 121, 229, 0.25) 240px, rgba(79, 79, 221, 0.25) 270px, rgba(0, 0, 0, 0) 270px, rgba(0, 0, 0, 0) 280px, rgba(121, 121, 229, 0.25) 280px, rgba(79, 79, 221, 0.25) 310px, rgba(0, 0, 0, 0) 310px, rgba(0, 0, 0, 0) 320px, rgba(121, 121, 229, 0.25) 320px, rgba(79, 79, 221, 0.25) 350px, rgba(0, 0, 0, 0) 350px, rgba(0, 0, 0, 0) 360px, rgba(121, 121, 229, 0.25) 360px, rgba(79, 79, 221, 0.25) 390px, rgba(0, 0, 0, 0) 390px, rgba(0, 0, 0, 0) 400px, rgba(121, 121, 229, 0.25) 400px, rgba(79, 79, 221, 0.25) 430px, rgba(0, 0, 0, 0) 430px, rgba(0, 0, 0, 0) 440px, rgba(121, 121, 229, 0.25) 440px, rgba(79, 79, 221, 0.25) 470px, rgba(0, 0, 0, 0) 470px, rgba(0, 0, 0, 0) 480px, rgba(121, 121, 229, 0.25) 480px, rgba(79, 79, 221, 0.25) 510px, rgba(0, 0, 0, 0) 510px, rgba(0, 0, 0, 0) 520px, rgba(121, 121, 229, 0.25) 520px, rgba(79, 79, 221, 0.25) 550px, rgba(0, 0, 0, 0) 550px, rgba(0, 0, 0, 0) 560px, rgba(121, 121, 229, 0.25) 560px, rgba(79, 79, 221, 0.25) 590px, rgba(0, 0, 0, 0) 590px, rgba(0, 0, 0, 0) 600px, rgba(121, 121, 229, 0.25) 600px, rgba(79, 79, 221, 0.25) 630px, rgba(0, 0, 0, 0) 630px, rgba(0, 0, 0, 0) 640px, rgba(121, 121, 229, 0.25) 640px, rgba(79, 79, 221, 0.25) 670px, rgba(0, 0, 0, 0) 670px, rgba(0, 0, 0, 0) 680px, rgba(121, 121, 229, 0.25) 680px, rgba(79, 79, 221, 0.25) 710px, rgba(0, 0, 0, 0) 710px, rgba(0, 0, 0, 0) 720px, rgba(121, 121, 229, 0.25) 720px, rgba(79, 79, 221, 0.25) 750px, rgba(0, 0, 0, 0) 750px, rgba(0, 0, 0, 0) 760px, rgba(121, 121, 229, 0.25) 760px, rgba(79, 79, 221, 0.25) 790px, rgba(0, 0, 0, 0) 790px, rgba(0, 0, 0, 0) 800px, rgba(121, 121, 229, 0.25) 800px, rgba(79, 79, 221, 0.25) 830px, rgba(0, 0, 0, 0) 830px, rgba(0, 0, 0, 0) 840px, rgba(121, 121, 229, 0.25) 840px, rgba(79, 79, 221, 0.25) 870px, rgba(0, 0, 0, 0) 870px, rgba(0, 0, 0, 0) 880px, rgba(121, 121, 229, 0.25) 880px, rgba(79, 79, 221, 0.25) 910px, rgba(0, 0, 0, 0) 910px, rgba(0, 0, 0, 0) 920px, rgba(121, 121, 229, 0.25) 920px, rgba(79, 79, 221, 0.25) 950px, rgba(0, 0, 0, 0) 950px, rgba(0, 0, 0, 0) 960px); -moz-background-size: 100% 1.5em, auto; -o-background-size: 100% 1.5em, auto; -webkit-background-size: 100% 1.5em, auto; background-size: 100% 1.5em, auto; background-position: left top; } .percent-baseline { background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjEuMCIgeDI9IjAuNSIgeTI9IjAuMCI+PHN0b3Agb2Zmc2V0PSI1JSIgc3RvcC1jb2xvcj0iIzAwMDAwMCIgc3RvcC1vcGFjaXR5PSIwLjUiLz48c3RvcCBvZmZzZXQ9IjUlIiBzdG9wLWNvbG9yPSIjMDAwMDAwIiBzdG9wLW9wYWNpdHk9IjAuMCIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background-size: 100%; background-image: -webkit-gradient(linear, 50% 100%, 50% 0%, color-stop(5%, rgba(0, 0, 0, 0.5)), color-stop(5%, rgba(0, 0, 0, 0))); background-image: -moz-linear-gradient(bottom, rgba(0, 0, 0, 0.5) 5%, rgba(0, 0, 0, 0) 5%); background-image: -webkit-linear-gradient(bottom, rgba(0, 0, 0, 0.5) 5%, rgba(0, 0, 0, 0) 5%); background-image: linear-gradient(to top, rgba(0, 0, 0, 0.5) 5%, rgba(0, 0, 0, 0) 5%); -moz-background-size: 100% 1.5em; -o-background-size: 100% 1.5em; -webkit-background-size: 100% 1.5em; background-size: 100% 1.5em; background-position: left top; } .percent-columns { background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuMCIgeTE9IjAuNSIgeDI9IjEuMCIgeTI9IjAuNSI+PHN0b3Agb2Zmc2V0PSIxMSUiIHN0b3AtY29sb3I9IiMwMDAwMDAiIHN0b3Atb3BhY2l0eT0iMC4wIi8+PHN0b3Agb2Zmc2V0PSIxMSUiIHN0b3AtY29sb3I9IiM3OTc5ZTUiIHN0b3Atb3BhY2l0eT0iMC4yNSIvPjxzdG9wIG9mZnNldD0iMTYlIiBzdG9wLWNvbG9yPSIjNGY0ZmRkIiBzdG9wLW9wYWNpdHk9IjAuMjUiLz48c3RvcCBvZmZzZXQ9IjE2JSIgc3RvcC1jb2xvcj0iIzAwMDAwMCIgc3RvcC1vcGFjaXR5PSIwLjAiLz48c3RvcCBvZmZzZXQ9IjE3JSIgc3RvcC1jb2xvcj0iIzAwMDAwMCIgc3RvcC1vcGFjaXR5PSIwLjAiLz48c3RvcCBvZmZzZXQ9IjE3JSIgc3RvcC1jb2xvcj0iIzc5NzllNSIgc3RvcC1vcGFjaXR5PSIwLjI1Ii8+PHN0b3Agb2Zmc2V0PSIyMiUiIHN0b3AtY29sb3I9IiM0ZjRmZGQiIHN0b3Atb3BhY2l0eT0iMC4yNSIvPjxzdG9wIG9mZnNldD0iMjIlIiBzdG9wLWNvbG9yPSIjMDAwMDAwIiBzdG9wLW9wYWNpdHk9IjAuMCIvPjxzdG9w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yNSIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzAwMDAwMCIgc3RvcC1vcGFjaXR5PSIwLjAiLz48c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiMwMDAwMDAiIHN0b3Atb3BhY2l0eT0iMC4wIi8+PC9saW5lYXJHcmFkaWVudD48L2RlZnM+PHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgZmlsbD0idXJsKCNncmFkKSIgLz48L3N2Zz4g'); background-size: 100%; background-image: -webkit-gradient(linear, 0% 50%, 100% 50%, color-stop(11%, rgba(0, 0, 0, 0)), color-stop(11%, rgba(121, 121, 229, 0.25)), color-stop(16%, rgba(79, 79, 221, 0.25)), color-stop(16%, rgba(0, 0, 0, 0)), color-stop(17%, rgba(0, 0, 0, 0)), color-stop(17%, rgba(121, 121, 229, 0.25)), color-stop(22%, rgba(79, 79, 221, 0.25)), color-stop(22%, rgba(0, 0, 0, 0)), color-stop(23%, rgba(0, 0, 0, 0)), color-stop(23%, rgba(121, 121, 229, 0.25)), color-stop(28%, rgba(79, 79, 221, 0.25)), color-stop(28%, rgba(0, 0, 0, 0)), color-stop(29%, rgba(0, 0, 0, 0)), color-stop(29%, rgba(121, 121, 229, 0.25)), color-stop(34%, rgba(79, 79, 221, 0.25)), color-stop(34%, rgba(0, 0, 0, 0)), color-stop(35%, rgba(0, 0, 0, 0)), color-stop(35%, rgba(121, 121, 229, 0.25)), color-stop(40%, rgba(79, 79, 221, 0.25)), color-stop(40%, rgba(0, 0, 0, 0)), color-stop(41%, rgba(0, 0, 0, 0)), color-stop(41%, rgba(121, 121, 229, 0.25)), color-stop(46%, rgba(79, 79, 221, 0.25)), color-stop(46%, rgba(0, 0, 0, 0)), color-stop(47%, rgba(0, 0, 0, 0)), color-stop(47%, rgba(121, 121, 229, 0.25)), color-stop(52%, rgba(79, 79, 221, 0.25)), color-stop(52%, rgba(0, 0, 0, 0)), color-stop(53%, rgba(0, 0, 0, 0)), color-stop(53%, rgba(121, 121, 229, 0.25)), color-stop(58%, rgba(79, 79, 221, 0.25)), color-stop(58%, rgba(0, 0, 0, 0)), color-stop(59%, rgba(0, 0, 0, 0)), color-stop(59%, rgba(121, 121, 229, 0.25)), color-stop(64%, rgba(79, 79, 221, 0.25)), color-stop(64%, rgba(0, 0, 0, 0)), color-stop(65%, rgba(0, 0, 0, 0)), color-stop(65%, rgba(121, 121, 229, 0.25)), color-stop(70%, rgba(79, 79, 221, 0.25)), color-stop(70%, rgba(0, 0, 0, 0)), color-stop(71%, rgba(0, 0, 0, 0)), color-stop(71%, rgba(121, 121, 229, 0.25)), color-stop(76%, rgba(79, 79, 221, 0.25)), color-stop(76%, rgba(0, 0, 0, 0)), color-stop(77%, rgba(0, 0, 0, 0)), color-stop(77%, rgba(121, 121, 229, 0.25)), color-stop(82%, rgba(79, 79, 221, 0.25)), color-stop(82%, rgba(0, 0, 0, 0)), color-stop(83%, rgba(0, 0, 0, 0)), color-stop(83%, rgba(121, 121, 229, 0.25)), color-stop(88%, rgba(79, 79, 221, 0.25)), color-stop(88%, rgba(0, 0, 0, 0)), color-stop(89%, rgba(0, 0, 0, 0)), color-stop(89%, rgba(121, 121, 229, 0.25)), color-stop(94%, rgba(79, 79, 221, 0.25)), color-stop(94%, rgba(0, 0, 0, 0)), color-stop(95%, rgba(0, 0, 0, 0)), color-stop(95%, rgba(121, 121, 229, 0.25)), color-stop(100%, rgba(79, 79, 221, 0.25)), color-stop(100%, rgba(0, 0, 0, 0)), color-stop(100%, rgba(0, 0, 0, 0))); background-image: -moz-linear-gradient(left, rgba(0, 0, 0, 0) 11%, rgba(121, 121, 229, 0.25) 11%, rgba(79, 79, 221, 0.25) 16%, rgba(0, 0, 0, 0) 16%, rgba(0, 0, 0, 0) 17%, rgba(121, 121, 229, 0.25) 17%, rgba(79, 79, 221, 0.25) 22%, rgba(0, 0, 0, 0) 22%, rgba(0, 0, 0, 0) 23%, rgba(121, 121, 229, 0.25) 23%, rgba(79, 79, 221, 0.25) 28%, rgba(0, 0, 0, 0) 28%, rgba(0, 0, 0, 0) 29%, rgba(121, 121, 229, 0.25) 29%, rgba(79, 79, 221, 0.25) 34%, rgba(0, 0, 0, 0) 34%, rgba(0, 0, 0, 0) 35%, rgba(121, 121, 229, 0.25) 35%, rgba(79, 79, 221, 0.25) 40%, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0) 41%, rgba(121, 121, 229, 0.25) 41%, rgba(79, 79, 221, 0.25) 46%, rgba(0, 0, 0, 0) 46%, rgba(0, 0, 0, 0) 47%, rgba(121, 121, 229, 0.25) 47%, rgba(79, 79, 221, 0.25) 52%, rgba(0, 0, 0, 0) 52%, rgba(0, 0, 0, 0) 53%, rgba(121, 121, 229, 0.25) 53%, rgba(79, 79, 221, 0.25) 58%, rgba(0, 0, 0, 0) 58%, rgba(0, 0, 0, 0) 59%, rgba(121, 121, 229, 0.25) 59%, rgba(79, 79, 221, 0.25) 64%, rgba(0, 0, 0, 0) 64%, rgba(0, 0, 0, 0) 65%, rgba(121, 121, 229, 0.25) 65%, rgba(79, 79, 221, 0.25) 70%, rgba(0, 0, 0, 0) 70%, rgba(0, 0, 0, 0) 71%, rgba(121, 121, 229, 0.25) 71%, rgba(79, 79, 221, 0.25) 76%, rgba(0, 0, 0, 0) 76%, rgba(0, 0, 0, 0) 77%, rgba(121, 121, 229, 0.25) 77%, rgba(79, 79, 221, 0.25) 82%, rgba(0, 0, 0, 0) 82%, rgba(0, 0, 0, 0) 83%, rgba(121, 121, 229, 0.25) 83%, rgba(79, 79, 221, 0.25) 88%, rgba(0, 0, 0, 0) 88%, rgba(0, 0, 0, 0) 89%, rgba(121, 121, 229, 0.25) 89%, rgba(79, 79, 221, 0.25) 94%, rgba(0, 0, 0, 0) 94%, rgba(0, 0, 0, 0) 95%, rgba(121, 121, 229, 0.25) 95%, rgba(79, 79, 221, 0.25) 100%, rgba(0, 0, 0, 0) 100%, rgba(0, 0, 0, 0) 100%); background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, 0) 11%, rgba(121, 121, 229, 0.25) 11%, rgba(79, 79, 221, 0.25) 16%, rgba(0, 0, 0, 0) 16%, rgba(0, 0, 0, 0) 17%, rgba(121, 121, 229, 0.25) 17%, rgba(79, 79, 221, 0.25) 22%, rgba(0, 0, 0, 0) 22%, rgba(0, 0, 0, 0) 23%, rgba(121, 121, 229, 0.25) 23%, rgba(79, 79, 221, 0.25) 28%, rgba(0, 0, 0, 0) 28%, rgba(0, 0, 0, 0) 29%, rgba(121, 121, 229, 0.25) 29%, rgba(79, 79, 221, 0.25) 34%, rgba(0, 0, 0, 0) 34%, rgba(0, 0, 0, 0) 35%, rgba(121, 121, 229, 0.25) 35%, rgba(79, 79, 221, 0.25) 40%, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0) 41%, rgba(121, 121, 229, 0.25) 41%, rgba(79, 79, 221, 0.25) 46%, rgba(0, 0, 0, 0) 46%, rgba(0, 0, 0, 0) 47%, rgba(121, 121, 229, 0.25) 47%, rgba(79, 79, 221, 0.25) 52%, rgba(0, 0, 0, 0) 52%, rgba(0, 0, 0, 0) 53%, rgba(121, 121, 229, 0.25) 53%, rgba(79, 79, 221, 0.25) 58%, rgba(0, 0, 0, 0) 58%, rgba(0, 0, 0, 0) 59%, rgba(121, 121, 229, 0.25) 59%, rgba(79, 79, 221, 0.25) 64%, rgba(0, 0, 0, 0) 64%, rgba(0, 0, 0, 0) 65%, rgba(121, 121, 229, 0.25) 65%, rgba(79, 79, 221, 0.25) 70%, rgba(0, 0, 0, 0) 70%, rgba(0, 0, 0, 0) 71%, rgba(121, 121, 229, 0.25) 71%, rgba(79, 79, 221, 0.25) 76%, rgba(0, 0, 0, 0) 76%, rgba(0, 0, 0, 0) 77%, rgba(121, 121, 229, 0.25) 77%, rgba(79, 79, 221, 0.25) 82%, rgba(0, 0, 0, 0) 82%, rgba(0, 0, 0, 0) 83%, rgba(121, 121, 229, 0.25) 83%, rgba(79, 79, 221, 0.25) 88%, rgba(0, 0, 0, 0) 88%, rgba(0, 0, 0, 0) 89%, rgba(121, 121, 229, 0.25) 89%, rgba(79, 79, 221, 0.25) 94%, rgba(0, 0, 0, 0) 94%, rgba(0, 0, 0, 0) 95%, rgba(121, 121, 229, 0.25) 95%, rgba(79, 79, 221, 0.25) 100%, rgba(0, 0, 0, 0) 100%, rgba(0, 0, 0, 0) 100%); background-image: linear-gradient(to right, rgba(0, 0, 0, 0) 11%, rgba(121, 121, 229, 0.25) 11%, rgba(79, 79, 221, 0.25) 16%, rgba(0, 0, 0, 0) 16%, rgba(0, 0, 0, 0) 17%, rgba(121, 121, 229, 0.25) 17%, rgba(79, 79, 221, 0.25) 22%, rgba(0, 0, 0, 0) 22%, rgba(0, 0, 0, 0) 23%, rgba(121, 121, 229, 0.25) 23%, rgba(79, 79, 221, 0.25) 28%, rgba(0, 0, 0, 0) 28%, rgba(0, 0, 0, 0) 29%, rgba(121, 121, 229, 0.25) 29%, rgba(79, 79, 221, 0.25) 34%, rgba(0, 0, 0, 0) 34%, rgba(0, 0, 0, 0) 35%, rgba(121, 121, 229, 0.25) 35%, rgba(79, 79, 221, 0.25) 40%, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0) 41%, rgba(121, 121, 229, 0.25) 41%, rgba(79, 79, 221, 0.25) 46%, rgba(0, 0, 0, 0) 46%, rgba(0, 0, 0, 0) 47%, rgba(121, 121, 229, 0.25) 47%, rgba(79, 79, 221, 0.25) 52%, rgba(0, 0, 0, 0) 52%, rgba(0, 0, 0, 0) 53%, rgba(121, 121, 229, 0.25) 53%, rgba(79, 79, 221, 0.25) 58%, rgba(0, 0, 0, 0) 58%, rgba(0, 0, 0, 0) 59%, rgba(121, 121, 229, 0.25) 59%, rgba(79, 79, 221, 0.25) 64%, rgba(0, 0, 0, 0) 64%, rgba(0, 0, 0, 0) 65%, rgba(121, 121, 229, 0.25) 65%, rgba(79, 79, 221, 0.25) 70%, rgba(0, 0, 0, 0) 70%, rgba(0, 0, 0, 0) 71%, rgba(121, 121, 229, 0.25) 71%, rgba(79, 79, 221, 0.25) 76%, rgba(0, 0, 0, 0) 76%, rgba(0, 0, 0, 0) 77%, rgba(121, 121, 229, 0.25) 77%, rgba(79, 79, 221, 0.25) 82%, rgba(0, 0, 0, 0) 82%, rgba(0, 0, 0, 0) 83%, rgba(121, 121, 229, 0.25) 83%, rgba(79, 79, 221, 0.25) 88%, rgba(0, 0, 0, 0) 88%, rgba(0, 0, 0, 0) 89%, rgba(121, 121, 229, 0.25) 89%, rgba(79, 79, 221, 0.25) 94%, rgba(0, 0, 0, 0) 94%, rgba(0, 0, 0, 0) 95%, rgba(121, 121, 229, 0.25) 95%, rgba(79, 79, 221, 0.25) 100%, rgba(0, 0, 0, 0) 100%, rgba(0, 0, 0, 0) 100%); background-position: left top; } .percent-combined { background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjEuMCIgeDI9IjAuNSIgeTI9IjAuMCI+PHN0b3Agb2Zmc2V0PSI1JSIgc3RvcC1jb2xvcj0iIzAwMDAwMCIgc3RvcC1vcGFjaXR5PSIwLjUiLz48c3RvcCBvZmZzZXQ9IjUlIiBzdG9wLWNvbG9yPSIjMDAwMDAwIiBzdG9wLW9wYWNpdHk9IjAuMCIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='), url('data:image/svg+xml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b3AtY29sb3I9IiMwMDAwMDAiIHN0b3Atb3BhY2l0eT0iMC4wIi8+PC9saW5lYXJHcmFkaWVudD48L2RlZnM+PHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgZmlsbD0idXJsKCNncmFkKSIgLz48L3N2Zz4g'); background-size: 100%; background-image: -webkit-gradient(linear, 50% 100%, 50% 0%, color-stop(5%, rgba(0, 0, 0, 0.5)), color-stop(5%, rgba(0, 0, 0, 0))), -webkit-gradient(linear, 0% 50%, 100% 50%, color-stop(11%, rgba(0, 0, 0, 0)), color-stop(11%, rgba(121, 121, 229, 0.25)), color-stop(16%, rgba(79, 79, 221, 0.25)), color-stop(16%, rgba(0, 0, 0, 0)), color-stop(17%, rgba(0, 0, 0, 0)), color-stop(17%, rgba(121, 121, 229, 0.25)), color-stop(22%, rgba(79, 79, 221, 0.25)), color-stop(22%, rgba(0, 0, 0, 0)), color-stop(23%, rgba(0, 0, 0, 0)), color-stop(23%, rgba(121, 121, 229, 0.25)), color-stop(28%, rgba(79, 79, 221, 0.25)), color-stop(28%, rgba(0, 0, 0, 0)), color-stop(29%, rgba(0, 0, 0, 0)), color-stop(29%, rgba(121, 121, 229, 0.25)), color-stop(34%, rgba(79, 79, 221, 0.25)), color-stop(34%, rgba(0, 0, 0, 0)), color-stop(35%, rgba(0, 0, 0, 0)), color-stop(35%, rgba(121, 121, 229, 0.25)), color-stop(40%, rgba(79, 79, 221, 0.25)), color-stop(40%, rgba(0, 0, 0, 0)), color-stop(41%, rgba(0, 0, 0, 0)), color-stop(41%, rgba(121, 121, 229, 0.25)), color-stop(46%, rgba(79, 79, 221, 0.25)), color-stop(46%, rgba(0, 0, 0, 0)), color-stop(47%, rgba(0, 0, 0, 0)), color-stop(47%, rgba(121, 121, 229, 0.25)), color-stop(52%, rgba(79, 79, 221, 0.25)), color-stop(52%, rgba(0, 0, 0, 0)), color-stop(53%, rgba(0, 0, 0, 0)), color-stop(53%, rgba(121, 121, 229, 0.25)), color-stop(58%, rgba(79, 79, 221, 0.25)), color-stop(58%, rgba(0, 0, 0, 0)), color-stop(59%, rgba(0, 0, 0, 0)), color-stop(59%, rgba(121, 121, 229, 0.25)), color-stop(64%, rgba(79, 79, 221, 0.25)), color-stop(64%, rgba(0, 0, 0, 0)), color-stop(65%, rgba(0, 0, 0, 0)), color-stop(65%, rgba(121, 121, 229, 0.25)), color-stop(70%, rgba(79, 79, 221, 0.25)), color-stop(70%, rgba(0, 0, 0, 0)), color-stop(71%, rgba(0, 0, 0, 0)), color-stop(71%, rgba(121, 121, 229, 0.25)), color-stop(76%, rgba(79, 79, 221, 0.25)), color-stop(76%, rgba(0, 0, 0, 0)), color-stop(77%, rgba(0, 0, 0, 0)), color-stop(77%, rgba(121, 121, 229, 0.25)), color-stop(82%, rgba(79, 79, 221, 0.25)), color-stop(82%, rgba(0, 0, 0, 0)), color-stop(83%, rgba(0, 0, 0, 0)), color-stop(83%, rgba(121, 121, 229, 0.25)), color-stop(88%, rgba(79, 79, 221, 0.25)), color-stop(88%, rgba(0, 0, 0, 0)), color-stop(89%, rgba(0, 0, 0, 0)), color-stop(89%, rgba(121, 121, 229, 0.25)), color-stop(94%, rgba(79, 79, 221, 0.25)), color-stop(94%, rgba(0, 0, 0, 0)), color-stop(95%, rgba(0, 0, 0, 0)), color-stop(95%, rgba(121, 121, 229, 0.25)), color-stop(100%, rgba(79, 79, 221, 0.25)), color-stop(100%, rgba(0, 0, 0, 0)), color-stop(100%, rgba(0, 0, 0, 0))); background-image: -moz-linear-gradient(bottom, rgba(0, 0, 0, 0.5) 5%, rgba(0, 0, 0, 0) 5%), -moz-linear-gradient(left, rgba(0, 0, 0, 0) 11%, rgba(121, 121, 229, 0.25) 11%, rgba(79, 79, 221, 0.25) 16%, rgba(0, 0, 0, 0) 16%, rgba(0, 0, 0, 0) 17%, rgba(121, 121, 229, 0.25) 17%, rgba(79, 79, 221, 0.25) 22%, rgba(0, 0, 0, 0) 22%, rgba(0, 0, 0, 0) 23%, rgba(121, 121, 229, 0.25) 23%, rgba(79, 79, 221, 0.25) 28%, rgba(0, 0, 0, 0) 28%, rgba(0, 0, 0, 0) 29%, rgba(121, 121, 229, 0.25) 29%, rgba(79, 79, 221, 0.25) 34%, rgba(0, 0, 0, 0) 34%, rgba(0, 0, 0, 0) 35%, rgba(121, 121, 229, 0.25) 35%, rgba(79, 79, 221, 0.25) 40%, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0) 41%, rgba(121, 121, 229, 0.25) 41%, rgba(79, 79, 221, 0.25) 46%, rgba(0, 0, 0, 0) 46%, rgba(0, 0, 0, 0) 47%, rgba(121, 121, 229, 0.25) 47%, rgba(79, 79, 221, 0.25) 52%, rgba(0, 0, 0, 0) 52%, rgba(0, 0, 0, 0) 53%, rgba(121, 121, 229, 0.25) 53%, rgba(79, 79, 221, 0.25) 58%, rgba(0, 0, 0, 0) 58%, rgba(0, 0, 0, 0) 59%, rgba(121, 121, 229, 0.25) 59%, rgba(79, 79, 221, 0.25) 64%, rgba(0, 0, 0, 0) 64%, rgba(0, 0, 0, 0) 65%, rgba(121, 121, 229, 0.25) 65%, rgba(79, 79, 221, 0.25) 70%, rgba(0, 0, 0, 0) 70%, rgba(0, 0, 0, 0) 71%, rgba(121, 121, 229, 0.25) 71%, rgba(79, 79, 221, 0.25) 76%, rgba(0, 0, 0, 0) 76%, rgba(0, 0, 0, 0) 77%, rgba(121, 121, 229, 0.25) 77%, rgba(79, 79, 221, 0.25) 82%, rgba(0, 0, 0, 0) 82%, rgba(0, 0, 0, 0) 83%, rgba(121, 121, 229, 0.25) 83%, rgba(79, 79, 221, 0.25) 88%, rgba(0, 0, 0, 0) 88%, rgba(0, 0, 0, 0) 89%, rgba(121, 121, 229, 0.25) 89%, rgba(79, 79, 221, 0.25) 94%, rgba(0, 0, 0, 0) 94%, rgba(0, 0, 0, 0) 95%, rgba(121, 121, 229, 0.25) 95%, rgba(79, 79, 221, 0.25) 100%, rgba(0, 0, 0, 0) 100%, rgba(0, 0, 0, 0) 100%); background-image: -webkit-linear-gradient(bottom, rgba(0, 0, 0, 0.5) 5%, rgba(0, 0, 0, 0) 5%), -webkit-linear-gradient(left, rgba(0, 0, 0, 0) 11%, rgba(121, 121, 229, 0.25) 11%, rgba(79, 79, 221, 0.25) 16%, rgba(0, 0, 0, 0) 16%, rgba(0, 0, 0, 0) 17%, rgba(121, 121, 229, 0.25) 17%, rgba(79, 79, 221, 0.25) 22%, rgba(0, 0, 0, 0) 22%, rgba(0, 0, 0, 0) 23%, rgba(121, 121, 229, 0.25) 23%, rgba(79, 79, 221, 0.25) 28%, rgba(0, 0, 0, 0) 28%, rgba(0, 0, 0, 0) 29%, rgba(121, 121, 229, 0.25) 29%, rgba(79, 79, 221, 0.25) 34%, rgba(0, 0, 0, 0) 34%, rgba(0, 0, 0, 0) 35%, rgba(121, 121, 229, 0.25) 35%, rgba(79, 79, 221, 0.25) 40%, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0) 41%, rgba(121, 121, 229, 0.25) 41%, rgba(79, 79, 221, 0.25) 46%, rgba(0, 0, 0, 0) 46%, rgba(0, 0, 0, 0) 47%, rgba(121, 121, 229, 0.25) 47%, rgba(79, 79, 221, 0.25) 52%, rgba(0, 0, 0, 0) 52%, rgba(0, 0, 0, 0) 53%, rgba(121, 121, 229, 0.25) 53%, rgba(79, 79, 221, 0.25) 58%, rgba(0, 0, 0, 0) 58%, rgba(0, 0, 0, 0) 59%, rgba(121, 121, 229, 0.25) 59%, rgba(79, 79, 221, 0.25) 64%, rgba(0, 0, 0, 0) 64%, rgba(0, 0, 0, 0) 65%, rgba(121, 121, 229, 0.25) 65%, rgba(79, 79, 221, 0.25) 70%, rgba(0, 0, 0, 0) 70%, rgba(0, 0, 0, 0) 71%, rgba(121, 121, 229, 0.25) 71%, rgba(79, 79, 221, 0.25) 76%, rgba(0, 0, 0, 0) 76%, rgba(0, 0, 0, 0) 77%, rgba(121, 121, 229, 0.25) 77%, rgba(79, 79, 221, 0.25) 82%, rgba(0, 0, 0, 0) 82%, rgba(0, 0, 0, 0) 83%, rgba(121, 121, 229, 0.25) 83%, rgba(79, 79, 221, 0.25) 88%, rgba(0, 0, 0, 0) 88%, rgba(0, 0, 0, 0) 89%, rgba(121, 121, 229, 0.25) 89%, rgba(79, 79, 221, 0.25) 94%, rgba(0, 0, 0, 0) 94%, rgba(0, 0, 0, 0) 95%, rgba(121, 121, 229, 0.25) 95%, rgba(79, 79, 221, 0.25) 100%, rgba(0, 0, 0, 0) 100%, rgba(0, 0, 0, 0) 100%); background-image: linear-gradient(to top, rgba(0, 0, 0, 0.5) 5%, rgba(0, 0, 0, 0) 5%), linear-gradient(to right, rgba(0, 0, 0, 0) 11%, rgba(121, 121, 229, 0.25) 11%, rgba(79, 79, 221, 0.25) 16%, rgba(0, 0, 0, 0) 16%, rgba(0, 0, 0, 0) 17%, rgba(121, 121, 229, 0.25) 17%, rgba(79, 79, 221, 0.25) 22%, rgba(0, 0, 0, 0) 22%, rgba(0, 0, 0, 0) 23%, rgba(121, 121, 229, 0.25) 23%, rgba(79, 79, 221, 0.25) 28%, rgba(0, 0, 0, 0) 28%, rgba(0, 0, 0, 0) 29%, rgba(121, 121, 229, 0.25) 29%, rgba(79, 79, 221, 0.25) 34%, rgba(0, 0, 0, 0) 34%, rgba(0, 0, 0, 0) 35%, rgba(121, 121, 229, 0.25) 35%, rgba(79, 79, 221, 0.25) 40%, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0) 41%, rgba(121, 121, 229, 0.25) 41%, rgba(79, 79, 221, 0.25) 46%, rgba(0, 0, 0, 0) 46%, rgba(0, 0, 0, 0) 47%, rgba(121, 121, 229, 0.25) 47%, rgba(79, 79, 221, 0.25) 52%, rgba(0, 0, 0, 0) 52%, rgba(0, 0, 0, 0) 53%, rgba(121, 121, 229, 0.25) 53%, rgba(79, 79, 221, 0.25) 58%, rgba(0, 0, 0, 0) 58%, rgba(0, 0, 0, 0) 59%, rgba(121, 121, 229, 0.25) 59%, rgba(79, 79, 221, 0.25) 64%, rgba(0, 0, 0, 0) 64%, rgba(0, 0, 0, 0) 65%, rgba(121, 121, 229, 0.25) 65%, rgba(79, 79, 221, 0.25) 70%, rgba(0, 0, 0, 0) 70%, rgba(0, 0, 0, 0) 71%, rgba(121, 121, 229, 0.25) 71%, rgba(79, 79, 221, 0.25) 76%, rgba(0, 0, 0, 0) 76%, rgba(0, 0, 0, 0) 77%, rgba(121, 121, 229, 0.25) 77%, rgba(79, 79, 221, 0.25) 82%, rgba(0, 0, 0, 0) 82%, rgba(0, 0, 0, 0) 83%, rgba(121, 121, 229, 0.25) 83%, rgba(79, 79, 221, 0.25) 88%, rgba(0, 0, 0, 0) 88%, rgba(0, 0, 0, 0) 89%, rgba(121, 121, 229, 0.25) 89%, rgba(79, 79, 221, 0.25) 94%, rgba(0, 0, 0, 0) 94%, rgba(0, 0, 0, 0) 95%, rgba(121, 121, 229, 0.25) 95%, rgba(79, 79, 221, 0.25) 100%, rgba(0, 0, 0, 0) 100%, rgba(0, 0, 0, 0) 100%); -moz-background-size: 100% 1.5em, auto; -o-background-size: 100% 1.5em, auto; -webkit-background-size: 100% 1.5em, auto; background-size: 100% 1.5em, auto; background-position: left top; } .forced-fluid { background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuMCIgeTE9IjAuNSIgeDI9IjEuMCIgeTI9IjAuNSI+PHN0b3Agb2Zmc2V0PSIyLjcwMjclIiBzdG9wLWNvbG9yPSIjMDAwMDAwIiBzdG9wLW9wYWNpdHk9IjAuMCIvPjxzdG9wIG9mZnNldD0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wMDAwIiBzdG9wLW9wYWNpdHk9IjAuMCIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzAwMDAwMCIgc3RvcC1vcGFjaXR5PSIwLjAiLz48L2xpbmVhckdyYWRpZW50PjwvZGVmcz48cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWxsPSJ1cmwoI2dyYWQpIiAvPjwvc3ZnPiA='); background-size: 100%; background-image: -webkit-gradient(linear, 0% 50%, 100% 50%, color-stop(2.7027%, rgba(0, 0, 0, 0)), color-stop(2.7027%, rgba(121, 121, 229, 0.25)), color-stop(8.10811%, rgba(79, 79, 221, 0.25)), color-stop(8.10811%, rgba(0, 0, 0, 0)), color-stop(10.81081%, rgba(0, 0, 0, 0)), color-stop(10.81081%, rgba(121, 121, 229, 0.25)), color-stop(16.21622%, rgba(79, 79, 221, 0.25)), color-stop(16.21622%, rgba(0, 0, 0, 0)), color-stop(18.91892%, rgba(0, 0, 0, 0)), color-stop(18.91892%, rgba(121, 121, 229, 0.25)), color-stop(24.32432%, rgba(79, 79, 221, 0.25)), color-stop(24.32432%, rgba(0, 0, 0, 0)), color-stop(27.02703%, rgba(0, 0, 0, 0)), color-stop(27.02703%, rgba(121, 121, 229, 0.25)), color-stop(32.43243%, rgba(79, 79, 221, 0.25)), color-stop(32.43243%, rgba(0, 0, 0, 0)), color-stop(35.13514%, rgba(0, 0, 0, 0)), color-stop(35.13514%, rgba(121, 121, 229, 0.25)), color-stop(40.54054%, rgba(79, 79, 221, 0.25)), color-stop(40.54054%, rgba(0, 0, 0, 0)), color-stop(43.24324%, rgba(0, 0, 0, 0)), color-stop(43.24324%, rgba(121, 121, 229, 0.25)), color-stop(48.64865%, rgba(79, 79, 221, 0.25)), color-stop(48.64865%, rgba(0, 0, 0, 0)), color-stop(51.35135%, rgba(0, 0, 0, 0)), color-stop(51.35135%, rgba(121, 121, 229, 0.25)), color-stop(56.75676%, rgba(79, 79, 221, 0.25)), color-stop(56.75676%, rgba(0, 0, 0, 0)), color-stop(59.45946%, rgba(0, 0, 0, 0)), color-stop(59.45946%, rgba(121, 121, 229, 0.25)), color-stop(64.86486%, rgba(79, 79, 221, 0.25)), color-stop(64.86486%, rgba(0, 0, 0, 0)), color-stop(67.56757%, rgba(0, 0, 0, 0)), color-stop(67.56757%, rgba(121, 121, 229, 0.25)), color-stop(72.97297%, rgba(79, 79, 221, 0.25)), color-stop(72.97297%, rgba(0, 0, 0, 0)), color-stop(75.67568%, rgba(0, 0, 0, 0)), color-stop(75.67568%, rgba(121, 121, 229, 0.25)), color-stop(81.08108%, rgba(79, 79, 221, 0.25)), color-stop(81.08108%, rgba(0, 0, 0, 0)), color-stop(83.78378%, rgba(0, 0, 0, 0)), color-stop(83.78378%, rgba(121, 121, 229, 0.25)), color-stop(89.18919%, rgba(79, 79, 221, 0.25)), color-stop(89.18919%, rgba(0, 0, 0, 0)), color-stop(91.89189%, rgba(0, 0, 0, 0)), color-stop(91.89189%, rgba(121, 121, 229, 0.25)), color-stop(97.2973%, rgba(79, 79, 221, 0.25)), color-stop(97.2973%, rgba(0, 0, 0, 0)), color-stop(100%, rgba(0, 0, 0, 0))); background-image: -moz-linear-gradient(left, rgba(0, 0, 0, 0) 2.7027%, rgba(121, 121, 229, 0.25) 2.7027%, rgba(79, 79, 221, 0.25) 8.10811%, rgba(0, 0, 0, 0) 8.10811%, rgba(0, 0, 0, 0) 10.81081%, rgba(121, 121, 229, 0.25) 10.81081%, rgba(79, 79, 221, 0.25) 16.21622%, rgba(0, 0, 0, 0) 16.21622%, rgba(0, 0, 0, 0) 18.91892%, rgba(121, 121, 229, 0.25) 18.91892%, rgba(79, 79, 221, 0.25) 24.32432%, rgba(0, 0, 0, 0) 24.32432%, rgba(0, 0, 0, 0) 27.02703%, rgba(121, 121, 229, 0.25) 27.02703%, rgba(79, 79, 221, 0.25) 32.43243%, rgba(0, 0, 0, 0) 32.43243%, rgba(0, 0, 0, 0) 35.13514%, rgba(121, 121, 229, 0.25) 35.13514%, rgba(79, 79, 221, 0.25) 40.54054%, rgba(0, 0, 0, 0) 40.54054%, rgba(0, 0, 0, 0) 43.24324%, rgba(121, 121, 229, 0.25) 43.24324%, rgba(79, 79, 221, 0.25) 48.64865%, rgba(0, 0, 0, 0) 48.64865%, rgba(0, 0, 0, 0) 51.35135%, rgba(121, 121, 229, 0.25) 51.35135%, rgba(79, 79, 221, 0.25) 56.75676%, rgba(0, 0, 0, 0) 56.75676%, rgba(0, 0, 0, 0) 59.45946%, rgba(121, 121, 229, 0.25) 59.45946%, rgba(79, 79, 221, 0.25) 64.86486%, rgba(0, 0, 0, 0) 64.86486%, rgba(0, 0, 0, 0) 67.56757%, rgba(121, 121, 229, 0.25) 67.56757%, rgba(79, 79, 221, 0.25) 72.97297%, rgba(0, 0, 0, 0) 72.97297%, rgba(0, 0, 0, 0) 75.67568%, rgba(121, 121, 229, 0.25) 75.67568%, rgba(79, 79, 221, 0.25) 81.08108%, rgba(0, 0, 0, 0) 81.08108%, rgba(0, 0, 0, 0) 83.78378%, rgba(121, 121, 229, 0.25) 83.78378%, rgba(79, 79, 221, 0.25) 89.18919%, rgba(0, 0, 0, 0) 89.18919%, rgba(0, 0, 0, 0) 91.89189%, rgba(121, 121, 229, 0.25) 91.89189%, rgba(79, 79, 221, 0.25) 97.2973%, rgba(0, 0, 0, 0) 97.2973%, rgba(0, 0, 0, 0) 100%); background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, 0) 2.7027%, rgba(121, 121, 229, 0.25) 2.7027%, rgba(79, 79, 221, 0.25) 8.10811%, rgba(0, 0, 0, 0) 8.10811%, rgba(0, 0, 0, 0) 10.81081%, rgba(121, 121, 229, 0.25) 10.81081%, rgba(79, 79, 221, 0.25) 16.21622%, rgba(0, 0, 0, 0) 16.21622%, rgba(0, 0, 0, 0) 18.91892%, rgba(121, 121, 229, 0.25) 18.91892%, rgba(79, 79, 221, 0.25) 24.32432%, rgba(0, 0, 0, 0) 24.32432%, rgba(0, 0, 0, 0) 27.02703%, rgba(121, 121, 229, 0.25) 27.02703%, rgba(79, 79, 221, 0.25) 32.43243%, rgba(0, 0, 0, 0) 32.43243%, rgba(0, 0, 0, 0) 35.13514%, rgba(121, 121, 229, 0.25) 35.13514%, rgba(79, 79, 221, 0.25) 40.54054%, rgba(0, 0, 0, 0) 40.54054%, rgba(0, 0, 0, 0) 43.24324%, rgba(121, 121, 229, 0.25) 43.24324%, rgba(79, 79, 221, 0.25) 48.64865%, rgba(0, 0, 0, 0) 48.64865%, rgba(0, 0, 0, 0) 51.35135%, rgba(121, 121, 229, 0.25) 51.35135%, rgba(79, 79, 221, 0.25) 56.75676%, rgba(0, 0, 0, 0) 56.75676%, rgba(0, 0, 0, 0) 59.45946%, rgba(121, 121, 229, 0.25) 59.45946%, rgba(79, 79, 221, 0.25) 64.86486%, rgba(0, 0, 0, 0) 64.86486%, rgba(0, 0, 0, 0) 67.56757%, rgba(121, 121, 229, 0.25) 67.56757%, rgba(79, 79, 221, 0.25) 72.97297%, rgba(0, 0, 0, 0) 72.97297%, rgba(0, 0, 0, 0) 75.67568%, rgba(121, 121, 229, 0.25) 75.67568%, rgba(79, 79, 221, 0.25) 81.08108%, rgba(0, 0, 0, 0) 81.08108%, rgba(0, 0, 0, 0) 83.78378%, rgba(121, 121, 229, 0.25) 83.78378%, rgba(79, 79, 221, 0.25) 89.18919%, rgba(0, 0, 0, 0) 89.18919%, rgba(0, 0, 0, 0) 91.89189%, rgba(121, 121, 229, 0.25) 91.89189%, rgba(79, 79, 221, 0.25) 97.2973%, rgba(0, 0, 0, 0) 97.2973%, rgba(0, 0, 0, 0) 100%); background-image: linear-gradient(to right, rgba(0, 0, 0, 0) 2.7027%, rgba(121, 121, 229, 0.25) 2.7027%, rgba(79, 79, 221, 0.25) 8.10811%, rgba(0, 0, 0, 0) 8.10811%, rgba(0, 0, 0, 0) 10.81081%, rgba(121, 121, 229, 0.25) 10.81081%, rgba(79, 79, 221, 0.25) 16.21622%, rgba(0, 0, 0, 0) 16.21622%, rgba(0, 0, 0, 0) 18.91892%, rgba(121, 121, 229, 0.25) 18.91892%, rgba(79, 79, 221, 0.25) 24.32432%, rgba(0, 0, 0, 0) 24.32432%, rgba(0, 0, 0, 0) 27.02703%, rgba(121, 121, 229, 0.25) 27.02703%, rgba(79, 79, 221, 0.25) 32.43243%, rgba(0, 0, 0, 0) 32.43243%, rgba(0, 0, 0, 0) 35.13514%, rgba(121, 121, 229, 0.25) 35.13514%, rgba(79, 79, 221, 0.25) 40.54054%, rgba(0, 0, 0, 0) 40.54054%, rgba(0, 0, 0, 0) 43.24324%, rgba(121, 121, 229, 0.25) 43.24324%, rgba(79, 79, 221, 0.25) 48.64865%, rgba(0, 0, 0, 0) 48.64865%, rgba(0, 0, 0, 0) 51.35135%, rgba(121, 121, 229, 0.25) 51.35135%, rgba(79, 79, 221, 0.25) 56.75676%, rgba(0, 0, 0, 0) 56.75676%, rgba(0, 0, 0, 0) 59.45946%, rgba(121, 121, 229, 0.25) 59.45946%, rgba(79, 79, 221, 0.25) 64.86486%, rgba(0, 0, 0, 0) 64.86486%, rgba(0, 0, 0, 0) 67.56757%, rgba(121, 121, 229, 0.25) 67.56757%, rgba(79, 79, 221, 0.25) 72.97297%, rgba(0, 0, 0, 0) 72.97297%, rgba(0, 0, 0, 0) 75.67568%, rgba(121, 121, 229, 0.25) 75.67568%, rgba(79, 79, 221, 0.25) 81.08108%, rgba(0, 0, 0, 0) 81.08108%, rgba(0, 0, 0, 0) 83.78378%, rgba(121, 121, 229, 0.25) 83.78378%, rgba(79, 79, 221, 0.25) 89.18919%, rgba(0, 0, 0, 0) 89.18919%, rgba(0, 0, 0, 0) 91.89189%, rgba(121, 121, 229, 0.25) 91.89189%, rgba(79, 79, 221, 0.25) 97.2973%, rgba(0, 0, 0, 0) 97.2973%, rgba(0, 0, 0, 0) 100%); background-position: left top; } ================================================ FILE: cli/test/fixtures/stylesheets/compass/css/hyphenation.css ================================================ .word-break { word-break: keep-all; } .hyphens { -moz-hyphens: manual; -ms-hyphens: manual; -webkit-hyphens: manual; hyphens: manual; } .hyphenate { word-break: break-all; word-break: break-word; -moz-hyphens: auto; -ms-hyphens: auto; -webkit-hyphens: auto; hyphens: auto; } ================================================ FILE: cli/test/fixtures/stylesheets/compass/css/image_size.css ================================================ .png { width: 100px; height: 150px; } .jpg { width: 100px; height: 150px; } .jpeg { width: 100px; height: 150px; } .gif { width: 100px; height: 150px; } ================================================ FILE: cli/test/fixtures/stylesheets/compass/css/images.css ================================================ .relative { background-image: url('/images/4x6.png?busted=true'); } .root-relative { background-image: url('/images/4x6.png?busted=true'); } .absolute { background-image: url(http://example.com/images/4x6.png); } ================================================ FILE: cli/test/fixtures/stylesheets/compass/css/layout.css ================================================ html, body { height: 100%; } #layout { clear: both; min-height: 100%; height: auto !important; height: 100%; margin-bottom: -72px; } #layout #layout_footer { height: 72px; } #footer { clear: both; position: relative; height: 72px; } ================================================ FILE: cli/test/fixtures/stylesheets/compass/css/legacy_clearfix.css ================================================ .clearfix { overflow: hidden; display: inline-block; } .clearfix { display: block; } .pie-clearfix { display: inline-block; } .pie-clearfix:after { content: "\0020"; display: block; height: 0; clear: both; overflow: hidden; visibility: hidden; } .pie-clearfix { display: block; } .simplified-pie-clearfix { display: inline-block; } .simplified-pie-clearfix:after { content: ""; display: table; clear: both; } .simplified-pie-clearfix { display: block; } ================================================ FILE: cli/test/fixtures/stylesheets/compass/css/lists.css ================================================ ul.horizontal { margin: 0; padding: 0; border: 0; overflow: hidden; *zoom: 1; } ul.horizontal li { list-style-image: none; list-style-type: none; margin-left: 0; white-space: nowrap; float: left; padding-left: 4px; padding-right: 4px; } ul.horizontal li:first-child { padding-left: 0; } ul.horizontal li:last-child { padding-right: 0; } ul.horizontal li.last { padding-right: 0; } ul.wide-horizontal { margin: 0; padding: 0; border: 0; overflow: hidden; *zoom: 1; } ul.wide-horizontal li { list-style-image: none; list-style-type: none; margin-left: 0; white-space: nowrap; float: left; padding-left: 10px; padding-right: 10px; } ul.wide-horizontal li:first-child { padding-left: 0; } ul.wide-horizontal li:last-child { padding-right: 0; } ul.wide-horizontal li.last { padding-right: 0; } ul.right-horizontal { margin: 0; padding: 0; border: 0; overflow: hidden; *zoom: 1; } ul.right-horizontal li { list-style-image: none; list-style-type: none; margin-left: 0; white-space: nowrap; float: right; padding-left: 4px; padding-right: 4px; } ul.right-horizontal li:first-child { padding-right: 0; } ul.right-horizontal li:last-child { padding-left: 0; } ul.right-horizontal li.last { padding-left: 0; } ul.no-padding { margin: 0; padding: 0; border: 0; overflow: hidden; *zoom: 1; } ul.no-padding li { list-style-image: none; list-style-type: none; margin-left: 0; white-space: nowrap; float: left; } ul.inline-block { margin: 0; padding: 0; border: 0; overflow: hidden; *zoom: 1; } ul.inline-block li { list-style-image: none; list-style-type: none; margin-left: 0; display: inline-block; vertical-align: middle; *vertical-align: auto; *zoom: 1; *display: inline; white-space: nowrap; } ul.wide-inline-block { margin: 0; padding: 0; border: 0; overflow: hidden; *zoom: 1; } ul.wide-inline-block li { list-style-image: none; list-style-type: none; margin-left: 0; display: inline-block; vertical-align: middle; *vertical-align: auto; *zoom: 1; *display: inline; white-space: nowrap; padding-left: 10px; padding-right: 10px; } ul.inline { list-style-type: none; } ul.inline, ul.inline li { margin: 0; padding: 0; display: inline; } ul.comma { list-style-type: none; } ul.comma, ul.comma li { margin: 0; padding: 0; display: inline; } ul.comma li:after { content: ", "; } ul.comma li:last-child:after { content: ""; } ul.comma li.last:after { content: ""; } ul.no-bullets { list-style: none; } ul.no-bullets li { list-style-image: none; list-style-type: none; margin-left: 0; } ul.pretty { margin-left: 0; } ul.pretty li { padding-left: 14px; background: url('/images/4x6.png?busted=true') no-repeat 4px 7px; list-style-type: none; } ================================================ FILE: cli/test/fixtures/stylesheets/compass/css/opacity.css ================================================ div { filter: progid:DXImageTransform.Microsoft.Alpha(enabled=false); opacity: 1; } div { filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=20); opacity: 0.2; } ================================================ FILE: cli/test/fixtures/stylesheets/compass/css/print.css ================================================ .noprint, .no-print { display: none; } address.print-only, article.print-only, aside.print-only, blockquote.print-only, center.print-only, dir.print-only, div.print-only, dd.print-only, details.print-only, dl.print-only, dt.print-only, fieldset.print-only, figcaption.print-only, figure.print-only, form.print-only, footer.print-only, frameset.print-only, h1.print-only, h2.print-only, h3.print-only, h4.print-only, h5.print-only, h6.print-only, hr.print-only, header.print-only, hgroup.print-only, isindex.print-only, main.print-only, menu.print-only, nav.print-only, noframes.print-only, noscript.print-only, ol.print-only, p.print-only, pre.print-only, section.print-only, summary.print-only, ul.print-only { display: block; } a.print-only, abbr.print-only, acronym.print-only, audio.print-only, b.print-only, basefont.print-only, bdo.print-only, big.print-only, br.print-only, canvas.print-only, cite.print-only, code.print-only, command.print-only, datalist.print-only, dfn.print-only, em.print-only, embed.print-only, font.print-only, i.print-only, img.print-only, input.print-only, keygen.print-only, kbd.print-only, label.print-only, mark.print-only, meter.print-only, output.print-only, progress.print-only, q.print-only, rp.print-only, rt.print-only, ruby.print-only, s.print-only, samp.print-only, select.print-only, small.print-only, span.print-only, strike.print-only, strong.print-only, sub.print-only, sup.print-only, textarea.print-only, time.print-only, tt.print-only, u.print-only, var.print-only, video.print-only, wbr.print-only { display: inline; } .print-only { display: none; } ================================================ FILE: cli/test/fixtures/stylesheets/compass/css/regions.css ================================================ .source { -ms-flow-into: target; -webkit-flow-into: target; flow-into: target; } .new-container { -ms-flow-from: target; -webkit-flow-from: target; flow-from: target; } ================================================ FILE: cli/test/fixtures/stylesheets/compass/css/replacement.css ================================================ .basic { text-indent: -119988px; overflow: hidden; text-align: left; text-transform: capitalize; background-image: url('/images/4x6.png?busted=true'); background-repeat: no-repeat; background-position: 50% 50%; } .with-dimensions { text-indent: -119988px; overflow: hidden; text-align: left; text-transform: capitalize; background-image: url('/images/4x6.png?busted=true'); background-repeat: no-repeat; background-position: 50% 50%; width: 6px; height: 4px; } .with-dimensions-inline { text-indent: -119988px; overflow: hidden; text-align: left; text-transform: capitalize; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAECAIAAAAiZtkUAAAC7mlDQ1BJQ0MgUHJvZmlsZQAAeAGFVM9rE0EU/jZuqdAiCFprDrJ4kCJJWatoRdQ2/RFiawzbH7ZFkGQzSdZuNuvuJrWliOTi0SreRe2hB/+AHnrwZC9KhVpFKN6rKGKhFy3xzW5MtqXqwM5+8943731vdt8ADXLSNPWABOQNx1KiEWlsfEJq/IgAjqIJQTQlVdvsTiQGQYNz+Xvn2HoPgVtWw3v7d7J3rZrStpoHhP1A4Eea2Sqw7xdxClkSAog836Epx3QI3+PY8uyPOU55eMG1Dys9xFkifEA1Lc5/TbhTzSXTQINIOJT1cVI+nNeLlNcdB2luZsbIEL1PkKa7zO6rYqGcTvYOkL2d9H5Os94+wiHCCxmtP0a4jZ71jNU/4mHhpObEhj0cGDX0+GAVtxqp+DXCFF8QTSeiVHHZLg3xmK79VvJKgnCQOMpkYYBzWkhP10xu+LqHBX0m1xOv4ndWUeF5jxNn3tTd70XaAq8wDh0MGgyaDUhQEEUEYZiwUECGPBoxNLJyPyOrBhuTezJ1JGq7dGJEsUF7Ntw9t1Gk3Tz+KCJxlEO1CJL8Qf4qr8lP5Xn5y1yw2Fb3lK2bmrry4DvF5Zm5Gh7X08jjc01efJXUdpNXR5aseXq8muwaP+xXlzHmgjWPxHOw+/EtX5XMlymMFMXjVfPqS4R1WjE3359sfzs94i7PLrXWc62JizdWm5dn/WpI++6qvJPmVflPXvXx/GfNxGPiKTEmdornIYmXxS7xkthLqwviYG3HCJ2VhinSbZH6JNVgYJq89S9dP1t4vUZ/DPVRlBnM0lSJ93/CKmQ0nbkOb/qP28f8F+T3iuefKAIvbODImbptU3HvEKFlpW5zrgIXv9F98LZua6N+OPwEWDyrFq1SNZ8gvAEcdod6HugpmNOWls05Uocsn5O66cpiUsxQ20NSUtcl12VLFrOZVWLpdtiZ0x1uHKE5QvfEp0plk/qv8RGw/bBS+fmsUtl+ThrWgZf6b8C8/UXAeIuJAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAI0lEQVQIHWOwtLT8//9/eno6kISwGdD4QDkGZHkIG6QKTS8A/s4vHesO+KkAAAAASUVORK5CYII='); background-repeat: no-repeat; background-position: 50% 50%; width: 6px; height: 4px; } .with-position { text-indent: -119988px; overflow: hidden; text-align: left; text-transform: capitalize; background-image: url('/images/4x6.png?busted=true'); background-repeat: no-repeat; background-position: 10px top; } .with-arbitrary-url { text-indent: -119988px; overflow: hidden; text-align: left; text-transform: capitalize; background-image: url(http://google.com/logo.gif); background-repeat: no-repeat; background-position: 10px top; } .with-inline-url { text-indent: -119988px; overflow: hidden; text-align: left; text-transform: capitalize; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAECAIAAAAiZtkUAAAC7mlDQ1BJQ0MgUHJvZmlsZQAAeAGFVM9rE0EU/jZuqdAiCFprDrJ4kCJJWatoRdQ2/RFiawzbH7ZFkGQzSdZuNuvuJrWliOTi0SreRe2hB/+AHnrwZC9KhVpFKN6rKGKhFy3xzW5MtqXqwM5+8943731vdt8ADXLSNPWABOQNx1KiEWlsfEJq/IgAjqIJQTQlVdvsTiQGQYNz+Xvn2HoPgVtWw3v7d7J3rZrStpoHhP1A4Eea2Sqw7xdxClkSAog836Epx3QI3+PY8uyPOU55eMG1Dys9xFkifEA1Lc5/TbhTzSXTQINIOJT1cVI+nNeLlNcdB2luZsbIEL1PkKa7zO6rYqGcTvYOkL2d9H5Os94+wiHCCxmtP0a4jZ71jNU/4mHhpObEhj0cGDX0+GAVtxqp+DXCFF8QTSeiVHHZLg3xmK79VvJKgnCQOMpkYYBzWkhP10xu+LqHBX0m1xOv4ndWUeF5jxNn3tTd70XaAq8wDh0MGgyaDUhQEEUEYZiwUECGPBoxNLJyPyOrBhuTezJ1JGq7dGJEsUF7Ntw9t1Gk3Tz+KCJxlEO1CJL8Qf4qr8lP5Xn5y1yw2Fb3lK2bmrry4DvF5Zm5Gh7X08jjc01efJXUdpNXR5aseXq8muwaP+xXlzHmgjWPxHOw+/EtX5XMlymMFMXjVfPqS4R1WjE3359sfzs94i7PLrXWc62JizdWm5dn/WpI++6qvJPmVflPXvXx/GfNxGPiKTEmdornIYmXxS7xkthLqwviYG3HCJ2VhinSbZH6JNVgYJq89S9dP1t4vUZ/DPVRlBnM0lSJ93/CKmQ0nbkOb/qP28f8F+T3iuefKAIvbODImbptU3HvEKFlpW5zrgIXv9F98LZua6N+OPwEWDyrFq1SNZ8gvAEcdod6HugpmNOWls05Uocsn5O66cpiUsxQ20NSUtcl12VLFrOZVWLpdtiZ0x1uHKE5QvfEp0plk/qv8RGw/bBS+fmsUtl+ThrWgZf6b8C8/UXAeIuJAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAI0lEQVQIHWOwtLT8//9/eno6kISwGdD4QDkGZHkIG6QKTS8A/s4vHesO+KkAAAAASUVORK5CYII='); background-repeat: no-repeat; background-position: 10px top; } .with-image-url { text-indent: -119988px; overflow: hidden; text-align: left; text-transform: capitalize; background-image: url('/images/4x6.png?busted=true'); background-repeat: no-repeat; background-position: 10px top; } ================================================ FILE: cli/test/fixtures/stylesheets/compass/css/reset.css ================================================ html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video { margin: 0; padding: 0; border: 0; font: inherit; font-size: 100%; vertical-align: baseline; } html { line-height: 1; } ol, ul { list-style: none; } table { border-collapse: collapse; border-spacing: 0; } caption, th, td { text-align: left; font-weight: normal; vertical-align: middle; } q, blockquote { quotes: none; } q:before, q:after, blockquote:before, blockquote:after { content: ""; content: none; } a img { border: none; } article, aside, details, figcaption, figure, footer, header, hgroup, main, menu, nav, section, summary { display: block; } .unregistered-only, .registered-only { display: none; } body.registered a.registered-only, body.registered abbr.registered-only, body.registered acronym.registered-only, body.registered audio.registered-only, body.registered b.registered-only, body.registered basefont.registered-only, body.registered bdo.registered-only, body.registered big.registered-only, body.registered br.registered-only, body.registered canvas.registered-only, body.registered cite.registered-only, body.registered code.registered-only, body.registered command.registered-only, body.registered datalist.registered-only, body.registered dfn.registered-only, body.registered em.registered-only, body.registered embed.registered-only, body.registered font.registered-only, body.registered i.registered-only, body.registered img.registered-only, body.registered input.registered-only, body.registered keygen.registered-only, body.registered kbd.registered-only, body.registered label.registered-only, body.registered mark.registered-only, body.registered meter.registered-only, body.registered output.registered-only, body.registered progress.registered-only, body.registered q.registered-only, body.registered rp.registered-only, body.registered rt.registered-only, body.registered ruby.registered-only, body.registered s.registered-only, body.registered samp.registered-only, body.registered select.registered-only, body.registered small.registered-only, body.registered span.registered-only, body.registered strike.registered-only, body.registered strong.registered-only, body.registered sub.registered-only, body.registered sup.registered-only, body.registered textarea.registered-only, body.registered time.registered-only, body.registered tt.registered-only, body.registered u.registered-only, body.registered var.registered-only, body.registered video.registered-only, body.registered wbr.registered-only { display: inline; } body.registered address.registered-only, body.registered article.registered-only, body.registered aside.registered-only, body.registered blockquote.registered-only, body.registered center.registered-only, body.registered dir.registered-only, body.registered div.registered-only, body.registered dd.registered-only, body.registered details.registered-only, body.registered dl.registered-only, body.registered dt.registered-only, body.registered fieldset.registered-only, body.registered figcaption.registered-only, body.registered figure.registered-only, body.registered form.registered-only, body.registered footer.registered-only, body.registered frameset.registered-only, body.registered h1.registered-only, body.registered h2.registered-only, body.registered h3.registered-only, body.registered h4.registered-only, body.registered h5.registered-only, body.registered h6.registered-only, body.registered hr.registered-only, body.registered header.registered-only, body.registered hgroup.registered-only, body.registered isindex.registered-only, body.registered main.registered-only, body.registered menu.registered-only, body.registered nav.registered-only, body.registered noframes.registered-only, body.registered noscript.registered-only, body.registered ol.registered-only, body.registered p.registered-only, body.registered pre.registered-only, body.registered section.registered-only, body.registered summary.registered-only, body.registered ul.registered-only { display: block; } body.unregistered a.unregistered-only, body.unregistered abbr.unregistered-only, body.unregistered acronym.unregistered-only, body.unregistered audio.unregistered-only, body.unregistered b.unregistered-only, body.unregistered basefont.unregistered-only, body.unregistered bdo.unregistered-only, body.unregistered big.unregistered-only, body.unregistered br.unregistered-only, body.unregistered canvas.unregistered-only, body.unregistered cite.unregistered-only, body.unregistered code.unregistered-only, body.unregistered command.unregistered-only, body.unregistered datalist.unregistered-only, body.unregistered dfn.unregistered-only, body.unregistered em.unregistered-only, body.unregistered embed.unregistered-only, body.unregistered font.unregistered-only, body.unregistered i.unregistered-only, body.unregistered img.unregistered-only, body.unregistered input.unregistered-only, body.unregistered keygen.unregistered-only, body.unregistered kbd.unregistered-only, body.unregistered label.unregistered-only, body.unregistered mark.unregistered-only, body.unregistered meter.unregistered-only, body.unregistered output.unregistered-only, body.unregistered progress.unregistered-only, body.unregistered q.unregistered-only, body.unregistered rp.unregistered-only, body.unregistered rt.unregistered-only, body.unregistered ruby.unregistered-only, body.unregistered s.unregistered-only, body.unregistered samp.unregistered-only, body.unregistered select.unregistered-only, body.unregistered small.unregistered-only, body.unregistered span.unregistered-only, body.unregistered strike.unregistered-only, body.unregistered strong.unregistered-only, body.unregistered sub.unregistered-only, body.unregistered sup.unregistered-only, body.unregistered textarea.unregistered-only, body.unregistered time.unregistered-only, body.unregistered tt.unregistered-only, body.unregistered u.unregistered-only, body.unregistered var.unregistered-only, body.unregistered video.unregistered-only, body.unregistered wbr.unregistered-only { display: inline; } body.unregistered address.unregistered-only, body.unregistered article.unregistered-only, body.unregistered aside.unregistered-only, body.unregistered blockquote.unregistered-only, body.unregistered center.unregistered-only, body.unregistered dir.unregistered-only, body.unregistered div.unregistered-only, body.unregistered dd.unregistered-only, body.unregistered details.unregistered-only, body.unregistered dl.unregistered-only, body.unregistered dt.unregistered-only, body.unregistered fieldset.unregistered-only, body.unregistered figcaption.unregistered-only, body.unregistered figure.unregistered-only, body.unregistered form.unregistered-only, body.unregistered footer.unregistered-only, body.unregistered frameset.unregistered-only, body.unregistered h1.unregistered-only, body.unregistered h2.unregistered-only, body.unregistered h3.unregistered-only, body.unregistered h4.unregistered-only, body.unregistered h5.unregistered-only, body.unregistered h6.unregistered-only, body.unregistered hr.unregistered-only, body.unregistered header.unregistered-only, body.unregistered hgroup.unregistered-only, body.unregistered isindex.unregistered-only, body.unregistered main.unregistered-only, body.unregistered menu.unregistered-only, body.unregistered nav.unregistered-only, body.unregistered noframes.unregistered-only, body.unregistered noscript.unregistered-only, body.unregistered ol.unregistered-only, body.unregistered p.unregistered-only, body.unregistered pre.unregistered-only, body.unregistered section.unregistered-only, body.unregistered summary.unregistered-only, body.unregistered ul.unregistered-only { display: block; } ================================================ FILE: cli/test/fixtures/stylesheets/compass/css/selection.css ================================================ *::-moz-selection { background-color: #fe57a1; color: #fff; } *::selection { background-color: #fe57a1; color: #fff; } .hot-pink::-moz-selection { background-color: #fe57a1; color: #fff; } .hot-pink::selection { background-color: #fe57a1; color: #fff; } .hot-pink-with-arguments::-moz-selection { color: white; background-color: #fe57a1; } .hot-pink-with-arguments::selection { color: white; background-color: #fe57a1; } .hot-pink-with-arguments-and-extra-stuff::-moz-selection { color: white; background-color: #fe57a1; text-decoration: line-through; } .hot-pink-with-arguments-and-extra-stuff::selection { color: white; background-color: #fe57a1; text-decoration: line-through; } .hot-pink-with-default-foreground::-moz-selection { color: black; background-color: #fe57a1; } .hot-pink-with-default-foreground::selection { color: black; background-color: #fe57a1; } .browser-support-is-considered::-moz-selection { color: black; background-color: #fe57a1; prefix: -moz; -moz-prefix: true; -ms-prefix: false; -webkit-prefix: false; } .browser-support-is-considered::selection { color: black; background-color: #fe57a1; -moz-prefix: false; -ms-prefix: false; -webkit-prefix: false; } ================================================ FILE: cli/test/fixtures/stylesheets/compass/css/sprites_with_explicit_separator.css ================================================ .flag_states_sprite, .flag_states_foo { background-image: url('/images/flag_states-sc42d7bf926.png'); background-repeat: no-repeat; } .flag_states_foo { background-position: 0 0; height: 11px; width: 16px; } .flag_states_foo:hover, .flag_states_foo.foo_hover { background-position: 0 -33px; } .flag_states_foo:target, .flag_states_foo.foo_target { background-position: 0 -44px; } .flag_states_foo:active, .flag_states_foo.foo_active { background-position: 0 -11px; } .flag_states_foo:focus, .flag_states_foo.foo_focus { background-position: 0 -22px; } .sprite-file { location: url('/images/flag_states/foo.png?busted=true'); } ================================================ FILE: cli/test/fixtures/stylesheets/compass/css/stretching.css ================================================ .stretched-completely { position: absolute; top: 0; bottom: 0; left: 0; right: 0; } .stretched-horizontally { position: absolute; left: 0; right: 0; } .stretched-right { position: absolute; left: 0; right: 50%; } .left-pane { position: absolute; top: 0; bottom: 0; left: 0; right: 50%; } .stretched-left { position: absolute; left: 50%; right: 0; } .right-pane { position: absolute; top: 0; bottom: 0; left: 50%; right: 0; } .stretched-down { position: absolute; top: 0; bottom: 50%; } .top-pane { position: absolute; top: 0; bottom: 50%; left: 0; right: 0; } .stretched-up { position: absolute; top: 50%; bottom: 0; } .bottom-pane { position: absolute; top: 50%; bottom: 0; left: 0; right: 0; } .viewport { position: absolute; top: 10px; bottom: 30px; left: 40px; right: 20px; } ================================================ FILE: cli/test/fixtures/stylesheets/compass/css/support.css ================================================ /* ### Compass Support ---------- */ /* - [function] set-arglist-default() with no arguments (1 Assertions, 1 Passed, 0 Failed) */ /* - [function] set-arglist-default() with a "default" argument (1 Assertions, 1 Passed, 0 Failed) */ /* - [function] set-arglist-default() with a "default" argument and another argument (1 Assertions, 1 Passed, 0 Failed) */ /* - [function] set-arglist-default() with a "default" argument not first and another argument (1 Assertions, 1 Passed, 0 Failed) */ /* - [function] support-legacy-browser() from threshold (2 Assertions, 2 Passed, 0 Failed) */ /* - [function] support-legacy-browser() from minimums (2 Assertions, 2 Passed, 0 Failed) */ /* - [function] browser-out-of-scope() with no scope (2 Assertions, 2 Passed, 0 Failed) */ /* - prefix context tracking (9 Assertions, 9 Passed, 0 Failed) */ /* - [function] browser-out-of-scope() with a scope (2 Assertions, 2 Passed, 0 Failed) */ /* - [function] browser-out-of-scope() with version (3 Assertions, 3 Passed, 0 Failed) */ /* - [mixin] with-prefix() (4 Assertions, 4 Passed, 0 Failed) */ /* - [mixin] with-each-prefix() (1 Assertions, 1 Passed, 0 Failed) */ /* - [mixin] with-each-prefix() respects $supported-browsers (1 Assertions, 1 Passed, 0 Failed) */ /* - [mixin] with-each-prefix() respects $current-prefix (3 Assertions, 3 Passed, 0 Failed) */ /* - [fuction] has-browser-subset() (5 Assertions, 5 Passed, 0 Failed) */ /* */ /* 15 Tests: */ /* - 15 Passed */ /* - 0 Failed */ /* */ /* Capability css-animation is prefixed with -moz because 0.57224% of users need it which is more than the threshold of 0.1%. */ /* Creating new -moz context. */ @-moz-keyframes foo { 0% { /* Content for ie 8 omitted. Not allowed in the current scope: ie 8 is incompatible with -moz. */ opacity: 0; } 100% { /* Content for ie 8 omitted. Not allowed in the current scope: ie 8 is incompatible with -moz. */ opacity: 1; } } /* Capability css-animation is not prefixed with -ms because 0% of users are affected which is less than the threshold of 0.1. */ /* Capability css-animation is not prefixed with -o because 0.02146% of users are affected which is less than the threshold of 0.1. */ /* Capability css-animation is prefixed with -webkit because 57.87258% of users need it which is more than the threshold of 0.1%. */ /* Creating new -webkit context. */ @-webkit-keyframes foo { 0% { /* Content for ie 8 omitted. Not allowed in the current scope: ie 8 is incompatible with -webkit. */ opacity: 0; } 100% { /* Content for ie 8 omitted. Not allowed in the current scope: ie 8 is incompatible with -webkit. */ opacity: 1; } } @keyframes foo { 0% { /* Content for ie 8 omitted. Not allowed in the current scope: The current scope only works with ie 10 - 11. */ opacity: 0; } 100% { /* Content for ie 8 omitted. Not allowed in the current scope: The current scope only works with ie 10 - 11. */ opacity: 1; } } .foo { /* Capability css-animation is prefixed with -moz because 0.57224% of users need it which is more than the threshold of 0.1%. */ /* Creating new -moz context. */ -moz-animation: foo 1s; /* Capability css-animation is not prefixed with -ms because 0% of users are affected which is less than the threshold of 0.1. */ /* Capability css-animation is not prefixed with -o because 0.02146% of users are affected which is less than the threshold of 0.1. */ /* Capability css-animation is prefixed with -webkit because 57.87258% of users need it which is more than the threshold of 0.1%. */ /* Creating new -webkit context. */ -webkit-animation: foo 1s; animation: foo 1s; } ================================================ FILE: cli/test/fixtures/stylesheets/compass/css/text_shadow.css ================================================ .default-single-text-shadow { text-shadow: 0px 0px 1px #aaaaaa; } .none { text-shadow: none; } .color-only { text-shadow: 0px 0px 1px #cccccc; } .color-first-with-params { text-shadow: 2px 2px 5px #cccccc; text-shadow: 2px 2px 5px 2px #cccccc; } .color-last-with-params { text-shadow: 2px 2px 5px #cccccc; text-shadow: 2px 2px 5px 2px #cccccc; } .default-text-shadow { text-shadow: 0px 0px 1px #aaaaaa; } .multiple-text-shadows-with-default { text-shadow: 0px 0px 1px #aaaaaa, 2px 2px 5px #222222; } .multiple-text-shadows { text-shadow: 4px 4px 10px #444444, 2px 2px 5px #222222; } .multiple-text-shadows-with-spread { text-shadow: 4px 4px 10px #444444, 2px 2px 5px #222222; text-shadow: 4px 4px 10px 1px #444444, 2px 2px 5px 3px #222222; } ================================================ FILE: cli/test/fixtures/stylesheets/compass/css/transform.css ================================================ .apply-origin-2d { -moz-transform-origin: 2px 5%; -ms-transform-origin: 2px 5%; -webkit-transform-origin: 2px 5%; transform-origin: 2px 5%; } .apply-origin-3d { -moz-transform-origin: 2px 5% 2in; -webkit-transform-origin: 2px 5% 2in; transform-origin: 2px 5% 2in; } .transform-origin-2d { -moz-transform-origin: 100px 100px; -ms-transform-origin: 100px 100px; -webkit-transform-origin: 100px 100px; transform-origin: 100px 100px; } .transform-origin-3d { -moz-transform-origin: 100px 100px 100px; -webkit-transform-origin: 100px 100px 100px; transform-origin: 100px 100px 100px; } .transform-2d { -moz-transform: rotateY(20deg); -ms-transform: rotateY(20deg); -webkit-transform: rotateY(20deg); transform: rotateY(20deg); } .transform-3d { -moz-transform: rotateZ(20deg); -webkit-transform: rotateZ(20deg); transform: rotateZ(20deg); } .perspective { -moz-perspective: 500; -webkit-perspective: 500; perspective: 500; } .perspective-origin { -moz-perspective-origin: 25% 25%; -webkit-perspective-origin: 25% 25%; perspective-origin: 25% 25%; } .transform-style { -moz-transform-style: preserve-3d; -webkit-transform-style: preserve-3d; transform-style: preserve-3d; } .backface-visibility { -moz-backface-visibility: hidden; -webkit-backface-visibility: hidden; backface-visibility: hidden; } .scale { -moz-transform: scale(30px, 50px); -ms-transform: scale(30px, 50px); -webkit-transform: scale(30px, 50px); transform: scale(30px, 50px); } .scale-3d { -moz-transform: scale(30px, 50px); -webkit-transform: scale(30px, 50px); transform: scale(30px, 50px); } .scale-with-perspective { -moz-transform: perspective(500) scale(30px, 50px); -ms-transform: perspective(500) scale(30px, 50px); -webkit-transform: perspective(500) scale(30px, 50px); transform: perspective(500) scale(30px, 50px); } .scale-3d-with-perspective { -moz-transform: perspective(500) scale(30px, 50px); -webkit-transform: perspective(500) scale(30px, 50px); transform: perspective(500) scale(30px, 50px); } .scale-x { -moz-transform: scaleX(30px); -ms-transform: scaleX(30px); -webkit-transform: scaleX(30px); transform: scaleX(30px); } .scale-x-3d { -moz-transform: scaleX(30px); -webkit-transform: scaleX(30px); transform: scaleX(30px); } .scale-x-with-perspective { -moz-transform: perspective(500) scaleX(30px); -ms-transform: perspective(500) scaleX(30px); -webkit-transform: perspective(500) scaleX(30px); transform: perspective(500) scaleX(30px); } .scale-x-3d-with-perspective { -moz-transform: perspective(500) scaleX(30px); -webkit-transform: perspective(500) scaleX(30px); transform: perspective(500) scaleX(30px); } .scale-y { -moz-transform: scaleY(50px); -ms-transform: scaleY(50px); -webkit-transform: scaleY(50px); transform: scaleY(50px); } .scale-y-3d { -moz-transform: scaleY(50px); -webkit-transform: scaleY(50px); transform: scaleY(50px); } .scale-y-with-perspective { -moz-transform: perspective(500) scaleY(50px); -ms-transform: perspective(500) scaleY(50px); -webkit-transform: perspective(500) scaleY(50px); transform: perspective(500) scaleY(50px); } .scale-y-3d-with-perspective { -moz-transform: perspective(500) scaleY(50px); -webkit-transform: perspective(500) scaleY(50px); transform: perspective(500) scaleY(50px); } .scale-z { -moz-transform: scaleZ(50px); -webkit-transform: scaleZ(50px); transform: scaleZ(50px); } .scale-z-with-perspective { -moz-transform: perspective(500) scaleZ(50px); -webkit-transform: perspective(500) scaleZ(50px); transform: perspective(500) scaleZ(50px); } .scale3d { -moz-transform: scale3d(30px, 50px, 100px); -webkit-transform: scale3d(30px, 50px, 100px); transform: scale3d(30px, 50px, 100px); } .scaled3-with-perspective { -moz-transform: perspective(500) scale3d(30px, 50px, 100px); -webkit-transform: perspective(500) scale3d(30px, 50px, 100px); transform: perspective(500) scale3d(30px, 50px, 100px); } .rotate { -moz-transform: perspective(500) rotate(25deg); -ms-transform: perspective(500) rotate(25deg); -webkit-transform: perspective(500) rotate(25deg); transform: perspective(500) rotate(25deg); } .rotate-with-perspective { -moz-transform: perspective(500) rotate(25deg); -ms-transform: perspective(500) rotate(25deg); -webkit-transform: perspective(500) rotate(25deg); transform: perspective(500) rotate(25deg); } .rotate-z { -moz-transform: rotate(25deg); -ms-transform: rotate(25deg); -webkit-transform: rotate(25deg); transform: rotate(25deg); } .rotate-z-with-perspective { -moz-transform: perspective(500) rotate(25deg); -ms-transform: perspective(500) rotate(25deg); -webkit-transform: perspective(500) rotate(25deg); transform: perspective(500) rotate(25deg); } .rotate-x { -moz-transform: rotateX(25deg); -webkit-transform: rotateX(25deg); transform: rotateX(25deg); } .rotate-x-with-perspective { -moz-transform: perspective(500) rotateX(25deg); -webkit-transform: perspective(500) rotateX(25deg); transform: perspective(500) rotateX(25deg); } .rotate-y { -moz-transform: rotateY(25deg); -webkit-transform: rotateY(25deg); transform: rotateY(25deg); } .rotate-y-with-perspective { -moz-transform: perspective(500) rotateY(25deg); -webkit-transform: perspective(500) rotateY(25deg); transform: perspective(500) rotateY(25deg); } .rotate-3d { -moz-transform: rotate3d(5, 2, 1, 75deg); -webkit-transform: rotate3d(5, 2, 1, 75deg); transform: rotate3d(5, 2, 1, 75deg); } .rotate-3d-with-perspective { -moz-transform: perspective(500) rotate3d(5, 2, 1, 75deg); -webkit-transform: perspective(500) rotate3d(5, 2, 1, 75deg); transform: perspective(500) rotate3d(5, 2, 1, 75deg); } .translate { -moz-transform: translate(20px, 30%); -ms-transform: translate(20px, 30%); -webkit-transform: translate(20px, 30%); transform: translate(20px, 30%); } .translate-with-perspective { -moz-transform: perspective(500) translate(20px, 30%); -ms-transform: perspective(500) translate(20px, 30%); -webkit-transform: perspective(500) translate(20px, 30%); transform: perspective(500) translate(20px, 30%); } .translate-3d { -moz-transform: translate(20px, 30%); -webkit-transform: translate(20px, 30%); transform: translate(20px, 30%); } .translate-3d-with-perspective { -moz-transform: perspective(500) translate(20px, 30%); -webkit-transform: perspective(500) translate(20px, 30%); transform: perspective(500) translate(20px, 30%); } .translate-x { -moz-transform: translateX(30px); -ms-transform: translateX(30px); -webkit-transform: translateX(30px); transform: translateX(30px); } .translate-x-3d { -moz-transform: translateX(30px); -webkit-transform: translateX(30px); transform: translateX(30px); } .translate-x-with-perspective { -moz-transform: perspective(500) translateX(30px); -ms-transform: perspective(500) translateX(30px); -webkit-transform: perspective(500) translateX(30px); transform: perspective(500) translateX(30px); } .translate-x-3d-with-perspective { -moz-transform: perspective(500) translateX(30px); -webkit-transform: perspective(500) translateX(30px); transform: perspective(500) translateX(30px); } .translate-y { -moz-transform: translateY(30px); -ms-transform: translateY(30px); -webkit-transform: translateY(30px); transform: translateY(30px); } .translate-y-3d { -moz-transform: translateY(30px); -webkit-transform: translateY(30px); transform: translateY(30px); } .translate-y-with-perspective { -moz-transform: perspective(500) translateY(30px); -ms-transform: perspective(500) translateY(30px); -webkit-transform: perspective(500) translateY(30px); transform: perspective(500) translateY(30px); } .translate-y-3d-with-perspective { -moz-transform: perspective(500) translateY(30px); -webkit-transform: perspective(500) translateY(30px); transform: perspective(500) translateY(30px); } .translate-z { -moz-transform: translateZ(30px); -webkit-transform: translateZ(30px); transform: translateZ(30px); } .translate-z-with-perspective { -moz-transform: perspective(500) translateZ(30px); -webkit-transform: perspective(500) translateZ(30px); transform: perspective(500) translateZ(30px); } .translate-3d { -moz-transform: translate3d(30px, 50px, 75px); -webkit-transform: translate3d(30px, 50px, 75px); transform: translate3d(30px, 50px, 75px); } .translate-3d-with-perspective { -moz-transform: perspective(500) translate3d(30px, 50px, 75px); -webkit-transform: perspective(500) translate3d(30px, 50px, 75px); transform: perspective(500) translate3d(30px, 50px, 75px); } .skew { -moz-transform: skew(20deg, 50deg); -ms-transform: skew(20deg, 50deg); -webkit-transform: skew(20deg, 50deg); transform: skew(20deg, 50deg); } .skew-3d { -moz-transform: skew(20deg, 50deg); -webkit-transform: skew(20deg, 50deg); transform: skew(20deg, 50deg); } .skew-x { -moz-transform: skewX(20deg); -ms-transform: skewX(20deg); -webkit-transform: skewX(20deg); transform: skewX(20deg); } .skew-x-3d { -moz-transform: skewX(20deg); -webkit-transform: skewX(20deg); transform: skewX(20deg); } .skew-y { -moz-transform: skewY(20deg); -ms-transform: skewY(20deg); -webkit-transform: skewY(20deg); transform: skewY(20deg); } .skew-y-3d { -moz-transform: skewY(20deg); -webkit-transform: skewY(20deg); transform: skewY(20deg); } .create-transform-2d { -moz-transform: perspective(500) scale(20px, 20px) rotateX(25deg) rotateY(25deg) rotate3d(false 50px) translateX(50px) translateZ(50deg) skew(50deg, 50%); -ms-transform: perspective(500) scale(20px, 20px) rotateX(25deg) rotateY(25deg) rotate3d(false 50px) translateX(50px) translateZ(50deg) skew(50deg, 50%); -webkit-transform: perspective(500) scale(20px, 20px) rotateX(25deg) rotateY(25deg) rotate3d(false 50px) translateX(50px) translateZ(50deg) skew(50deg, 50%); transform: perspective(500) scale(20px, 20px) rotateX(25deg) rotateY(25deg) rotate3d(false 50px) translateX(50px) translateZ(50deg) skew(50deg, 50%); -moz-transform-origin: 50%; -ms-transform-origin: 50%; -webkit-transform-origin: 50%; transform-origin: 50%; } .create-transform-3d { -moz-transform: perspective(500) scale3d(20px, 20px, 20px) rotateX(25deg) rotateY(25deg) rotateZ(25deg) rotate3d(false 50px) translate3d(50px, 50px, 50deg) skew(50deg, 50%); -ms-transform: perspective(500) scale3d(20px, 20px, 20px) rotateX(25deg) rotateY(25deg) rotateZ(25deg) rotate3d(false 50px) translate3d(50px, 50px, 50deg) skew(50deg, 50%); -webkit-transform: perspective(500) scale3d(20px, 20px, 20px) rotateX(25deg) rotateY(25deg) rotateZ(25deg) rotate3d(false 50px) translate3d(50px, 50px, 50deg) skew(50deg, 50%); transform: perspective(500) scale3d(20px, 20px, 20px) rotateX(25deg) rotateY(25deg) rotateZ(25deg) rotate3d(false 50px) translate3d(50px, 50px, 50deg) skew(50deg, 50%); -moz-transform-origin: 50% 50%; -ms-transform-origin: 50% 50%; -webkit-transform-origin: 50% 50%; transform-origin: 50% 50%; } .simple-transform { -moz-transform: scale(25px, 25px) rotateZ(25deg) translate(10px, 10px) skew(30deg, 30deg); -ms-transform: scale(25px, 25px) rotateZ(25deg) translate(10px, 10px) skew(30deg, 30deg); -webkit-transform: scale(25px, 25px) rotateZ(25deg) translate(10px, 10px) skew(30deg, 30deg); transform: scale(25px, 25px) rotateZ(25deg) translate(10px, 10px) skew(30deg, 30deg); -moz-transform-origin: 10% 10%; -ms-transform-origin: 10% 10%; -webkit-transform-origin: 10% 10%; transform-origin: 10% 10%; } ================================================ FILE: cli/test/fixtures/stylesheets/compass/css/transition.css ================================================ .single-transition-without-delay { -moz-transition: all 0.6s ease-out; -o-transition: all 0.6s ease-out; -webkit-transition: all 0.6s ease-out; transition: all 0.6s ease-out; } .single-transition-with-delay { -moz-transition: all 0.6s ease-out 0.2s; -o-transition: all 0.6s ease-out 0.2s; -webkit-transition: all 0.6s ease-out; -webkit-transition-delay: 0.2s; transition: all 0.6s ease-out 0.2s; } .transition-duration-list { -moz-transition-duration: 0.2s, 0.5s, 0.2s; -o-transition-duration: 0.2s, 0.5s, 0.2s; -webkit-transition-duration: 0.2s, 0.5s, 0.2s; transition-duration: 0.2s, 0.5s, 0.2s; } .multiple-transition-durations { -moz-transition-duration: 0.2s, 0.5s, 0.2s; -o-transition-duration: 0.2s, 0.5s, 0.2s; -webkit-transition-duration: 0.2s, 0.5s, 0.2s; transition-duration: 0.2s, 0.5s, 0.2s; } .single-transform-transition-without-delay { -moz-transition: -moz-transform 0.6s ease-out; -o-transition: -o-transform 0.6s ease-out; -webkit-transition: -webkit-transform 0.6s ease-out; transition: transform 0.6s ease-out; } .single-transform-transition-with-delay { -moz-transition: -moz-transform 0.6s ease-out 0.2s; -o-transition: -o-transform 0.6s ease-out 0.2s; -webkit-transition: -webkit-transform 0.6s ease-out; -webkit-transition-delay: 0.2s; transition: transform 0.6s ease-out 0.2s; } .transform-transition { -moz-transition: -moz-transform 0.6s ease-out; -o-transition: -o-transform 0.6s ease-out; -webkit-transition: -webkit-transform 0.6s ease-out; transition: transform 0.6s ease-out; } .multiple-transitions { -moz-transition: -moz-transform 0.6s ease-out, opacity 0.2s ease-in; -o-transition: -o-transform 0.6s ease-out, opacity 0.2s ease-in; -webkit-transition: -webkit-transform 0.6s ease-out, opacity 0.2s ease-in; transition: transform 0.6s ease-out, opacity 0.2s ease-in; } .transition-property { -moz-transition-property: -moz-transform; -o-transition-property: -o-transform; -webkit-transition-property: -webkit-transform; transition-property: transform; } .transition-properties { -moz-transition-property: -moz-transform, opacity, width, height, left, top; -o-transition-property: -o-transform, opacity, width, height, left, top; -webkit-transition-property: -webkit-transform, opacity, width, height, left, top; transition-property: transform, opacity, width, height, left, top; } .multiple-transition-properties { -moz-transition-property: opacity, -moz-transform, left; -o-transition-property: opacity, -o-transform, left; -webkit-transition-property: opacity, -webkit-transform, left; transition-property: opacity, transform, left; } .default-transition { -moz-transition: all 1s; -o-transition: all 1s; -webkit-transition: all 1s; transition: all 1s; } .transition-timing { -moz-transition-timing-function: ease-in; -o-transition-timing-function: ease-in; -webkit-transition-timing-function: ease-in; transition-timing-function: ease-in; } .transition-timings { -moz-transition-timing-function: ease-in, cubic-bezier(1, 0, 1, 0); -o-transition-timing-function: ease-in, cubic-bezier(1, 0, 1, 0); -webkit-transition-timing-function: ease-in, cubic-bezier(1, 0, 1, 0); transition-timing-function: ease-in, cubic-bezier(1, 0, 1, 0); } .transition-timings-list { -moz-transition-timing-function: ease-in, cubic-bezier(1, 0, 1, 0); -o-transition-timing-function: ease-in, cubic-bezier(1, 0, 1, 0); -webkit-transition-timing-function: ease-in, cubic-bezier(1, 0, 1, 0); transition-timing-function: ease-in, cubic-bezier(1, 0, 1, 0); } .transition-delay { -moz-transition-delay: 1s; -o-transition-delay: 1s; -webkit-transition-delay: 1s; transition-delay: 1s; } .transition-delays { -moz-transition-delay: 1s, 2s, 3s; -o-transition-delay: 1s, 2s, 3s; -webkit-transition-delay: 1s, 2s, 3s; transition-delay: 1s, 2s, 3s; } .transition-delays-list { -moz-transition-delay: 1s, 2s, 3s; -o-transition-delay: 1s, 2s, 3s; -webkit-transition-delay: 1s, 2s, 3s; transition-delay: 1s, 2s, 3s; } .regression-912 { -moz-transition: background-color 0.5s ease-in 0s, width 0.5s ease-out 0s, height 0.5s ease-in 0s, top 0.5s ease-out 0s; -o-transition: background-color 0.5s ease-in 0s, width 0.5s ease-out 0s, height 0.5s ease-in 0s, top 0.5s ease-out 0s; -webkit-transition: background-color 0.5s ease-in, width 0.5s ease-out, height 0.5s ease-in, top 0.5s ease-out; -webkit-transition-delay: 0s, 0s, 0s, 0s; transition: background-color 0.5s ease-in 0s, width 0.5s ease-out 0s, height 0.5s ease-in 0s, top 0.5s ease-out 0s; } ================================================ FILE: cli/test/fixtures/stylesheets/compass/css/typography/links/hover-link.css ================================================ a { text-decoration: none; } a:hover, a:focus { text-decoration: underline; } ================================================ FILE: cli/test/fixtures/stylesheets/compass/css/units.css ================================================ .foo { width: 600px; height: 200px; } .foo .test { /* 16px for margins should be 1em */ margin-top: 1em; /* 16px for margins should be 2.66667% (relative to parent's width) */ margin-right: 2.66667%; /* 1.35em for margins should be 3.6% (relative to parent's width, * even for top and bottom margins) */ margin-bottom: 3.6%; /* 16px for margins should be 2ex */ margin-left: 2ex; } .bar { font-size: 18px; width: 360px; } .bar .test { /* 150% for line-height should be 27px */ line-height: 27px; /* 1px should always be .0625rem for this page */ border-top: 0.0625rem; /* 2em for this element should be 9.525mm (relative to own font-size, as inherited) */ margin-top: 9.525mm; /* 2px for margins should be .55556% (relative to parent's width) */ margin-right: 0.55556%; /* 1rem should always be 16px for this page, even when own font-size is 18px */ margin-bottom: 16px; } .rem { background-size: 400px, 100% 32px; background-size: 25rem, 100% 2rem; } ================================================ FILE: cli/test/fixtures/stylesheets/compass/css/user-interface.css ================================================ .user-select { -moz-user-select: -moz-none; -ms-user-select: none; -webkit-user-select: none; user-select: none; } *:-moz-placeholder { color: #bfbfbf; font-style: italic; } *::-moz-placeholder { color: #bfbfbf; font-style: italic; } *:-ms-input-placeholder { color: #bfbfbf; font-style: italic; } *::-webkit-input-placeholder { color: #bfbfbf; font-style: italic; } input:-moz-placeholder, textarea:-moz-placeholder { color: #bfbfbf; font-style: italic; } input::-moz-placeholder, textarea::-moz-placeholder { color: #bfbfbf; font-style: italic; } input:-ms-input-placeholder, textarea:-ms-input-placeholder { color: #bfbfbf; font-style: italic; } input::-webkit-input-placeholder, textarea::-webkit-input-placeholder { color: #bfbfbf; font-style: italic; } .sets-up-browser-support-for-content:-moz-placeholder { prefix: -moz; -moz-prefix: true; -ms-prefix: false; -webkit-prefix: false; } .sets-up-browser-support-for-content::-moz-placeholder { prefix: -moz; -moz-prefix: true; -ms-prefix: false; -webkit-prefix: false; } .sets-up-browser-support-for-content:-ms-input-placeholder { prefix: -ms; -moz-prefix: false; -ms-prefix: true; -webkit-prefix: false; } .sets-up-browser-support-for-content::-webkit-input-placeholder { prefix: -webkit; -moz-prefix: false; -ms-prefix: false; -webkit-prefix: true; } ================================================ FILE: cli/test/fixtures/stylesheets/compass/css/utilities.css ================================================ .clearfix { overflow: hidden; *zoom: 1; } .pie-clearfix { *zoom: 1; } .pie-clearfix:after { content: "\0020"; display: block; height: 0; clear: both; overflow: hidden; visibility: hidden; } .simple-pie-clearfix { *zoom: 1; } .simple-pie-clearfix:after { content: ""; display: table; clear: both; } p.light { background-color: #f3aead; color: black; } p.dark { background-color: #a22321; color: white; } p.light-with-args { background-color: #f3aead; color: blue; } p.dark-with-args { background-color: #a22321; color: yellow; } th { background-color: white; } th.even, th:nth-child(2n) { background-color: yellow; } tr.odd td, tr:nth-child(2n+1) td { background-color: white; } tr.odd td.even, tr.odd td:nth-child(2n), tr:nth-child(2n+1) td.even, tr:nth-child(2n+1) td:nth-child(2n) { background-color: yellow; } tr.even td { background-color: red; } tr.even td.even, tr.even td:nth-child(2n) { background-color: red; } tfoot th, tfoot td { background-color: white; } tfoot th.even, tfoot th:nth-child(2n), tfoot td.even, tfoot td:nth-child(2n) { background-color: yellow; } p.ellipsis { white-space: nowrap; overflow: hidden; -ms-text-overflow: ellipsis; -o-text-overflow: ellipsis; text-overflow: ellipsis; } p.ellipsis.moz { white-space: nowrap; overflow: hidden; -ms-text-overflow: ellipsis; -o-text-overflow: ellipsis; text-overflow: ellipsis; -moz-binding: url('/tmp/xml/ellipsis.xml#ellipsis'); } ================================================ FILE: cli/test/fixtures/stylesheets/compass/css/vertical_rhythm.css ================================================ html { font-size: 87.5%; line-height: 1.14286em; } .small { font-size: 0.85714em; line-height: 1.33333em; } .padded { margin-top: 1.14286em; padding-top: 1.14286em; padding-bottom: 1.14286em; margin-bottom: 1.14286em; } .small-padded { font-size: 0.85714em; line-height: 1.33333em; margin-top: 1.33333em; padding-top: 1.33333em; padding-bottom: 1.33333em; margin-bottom: 1.33333em; } .borders { border-top-width: 0.07143em; border-top-style: solid; padding-top: 1.07143em; border-bottom-width: 0.07143em; border-bottom-style: solid; padding-bottom: 1.07143em; } .large-borders { font-size: 1.71429em; line-height: 2em; border-top-width: 0.25em; border-top-style: solid; padding-top: 0.41667em; border-bottom-width: 0.25em; border-bottom-style: solid; padding-bottom: 0.41667em; } .reset { line-height: 1.14286em; } ================================================ FILE: cli/test/fixtures/stylesheets/compass/css/vertical_rhythm_with_ems.css ================================================ /* New test using em output */ html { font-size: 112.5%; line-height: 1.4em; } .container { background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjEuMCIgeDI9IjAuNSIgeTI9IjAuMCI+PHN0b3Agb2Zmc2V0PSI1JSIgc3RvcC1jb2xvcj0iIzAwMDAwMCIgc3RvcC1vcGFjaXR5PSIwLjUiLz48c3RvcCBvZmZzZXQ9IjUlIiBzdG9wLWNvbG9yPSIjMDAwMDAwIiBzdG9wLW9wYWNpdHk9IjAuMCIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background-size: 100%; background-image: -webkit-gradient(linear, 50% 100%, 50% 0%, color-stop(5%, rgba(0, 0, 0, 0.5)), color-stop(5%, rgba(0, 0, 0, 0))); background-image: -moz-linear-gradient(bottom, rgba(0, 0, 0, 0.5) 5%, rgba(0, 0, 0, 0) 5%); background-image: -webkit-linear-gradient(bottom, rgba(0, 0, 0, 0.5) 5%, rgba(0, 0, 0, 0) 5%); background-image: linear-gradient(to top, rgba(0, 0, 0, 0.5) 5%, rgba(0, 0, 0, 0) 5%); -moz-background-size: 100% 1.4em; -o-background-size: 100% 1.4em; -webkit-background-size: 100% 1.4em; background-size: 100% 1.4em; background-position: left top; } p { margin-top: 1.4em; margin-bottom: 1.4em; } th, td { padding-top: 0.35em; padding-bottom: 0.35em; } .caption { font-size: 0.72222em; line-height: 1.55077em; } .spaced-out { line-height: 2.1em; } blockquote { margin-top: 1.4em; margin-bottom: 1.4em; padding: 0 1.4em; } .fig-quote > blockquote { margin-bottom: 0.7em; } .fig-quote .source { font-size: 0.72222em; line-height: 1.93846em; margin-bottom: 0.96923em; } .panel { font-size: 0.88889em; line-height: 1.575em; border-width: 0.0625em; border-style: solid; border-color: #aaaaaa; padding: 1.5125em; } ================================================ FILE: cli/test/fixtures/stylesheets/compass/css/vertical_rhythm_with_px.css ================================================ /* New using px output */ html { font-size: 18px; line-height: 25px; } .container { background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjEuMCIgeDI9IjAuNSIgeTI9IjAuMCI+PHN0b3Agb2Zmc2V0PSI1JSIgc3RvcC1jb2xvcj0iIzAwMDAwMCIgc3RvcC1vcGFjaXR5PSIwLjUiLz48c3RvcCBvZmZzZXQ9IjUlIiBzdG9wLWNvbG9yPSIjMDAwMDAwIiBzdG9wLW9wYWNpdHk9IjAuMCIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background-size: 100%; background-image: -webkit-gradient(linear, 50% 100%, 50% 0%, color-stop(5%, rgba(0, 0, 0, 0.5)), color-stop(5%, rgba(0, 0, 0, 0))); background-image: -moz-linear-gradient(bottom, rgba(0, 0, 0, 0.5) 5%, rgba(0, 0, 0, 0) 5%); background-image: -webkit-linear-gradient(bottom, rgba(0, 0, 0, 0.5) 5%, rgba(0, 0, 0, 0) 5%); background-image: linear-gradient(to top, rgba(0, 0, 0, 0.5) 5%, rgba(0, 0, 0, 0) 5%); -moz-background-size: 100% 25px; -o-background-size: 100% 25px; -webkit-background-size: 100% 25px; background-size: 100% 25px; background-position: left top; } p { margin-top: 25px; margin-bottom: 25px; } th, td { padding-top: 6px; padding-bottom: 6px; } /* Incremental leading made easy! */ .caption { font-size: 15px; line-height: 20px; } .spaced-out { line-height: 37px; } blockquote { margin-top: 25px; margin-bottom: 25px; padding: 0 25px; } .fig-quote > blockquote { margin-bottom: 12px; } .fig-quote .source { font-size: 15px; line-height: 25px; margin-bottom: 12px; } .panel { border-width: 1px; border-style: solid; border-color: #aaaaaa; padding: 24px; } ================================================ FILE: cli/test/fixtures/stylesheets/compass/css/vertical_rhythm_with_rems.css ================================================ /* New using rem output with pixel fallbacks */ html { font-size: 112.5%; line-height: 1.4em; } .container { background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjEuMCIgeDI9IjAuNSIgeTI9IjAuMCI+PHN0b3Agb2Zmc2V0PSI1JSIgc3RvcC1jb2xvcj0iIzAwMDAwMCIgc3RvcC1vcGFjaXR5PSIwLjUiLz48c3RvcCBvZmZzZXQ9IjUlIiBzdG9wLWNvbG9yPSIjMDAwMDAwIiBzdG9wLW9wYWNpdHk9IjAuMCIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background-size: 100%; background-image: -webkit-gradient(linear, 50% 100%, 50% 0%, color-stop(5%, rgba(0, 0, 0, 0.5)), color-stop(5%, rgba(0, 0, 0, 0))); background-image: -moz-linear-gradient(bottom, rgba(0, 0, 0, 0.5) 5%, rgba(0, 0, 0, 0) 5%); background-image: -webkit-linear-gradient(bottom, rgba(0, 0, 0, 0.5) 5%, rgba(0, 0, 0, 0) 5%); background-image: linear-gradient(to top, rgba(0, 0, 0, 0.5) 5%, rgba(0, 0, 0, 0) 5%); -moz-background-size: 100% 1.4rem; -o-background-size: 100% 1.4rem; -webkit-background-size: 100% 1.4rem; background-size: 100% 1.4rem; background-position: left top; } p { margin-top: 25px; margin-top: 1.4rem; margin-bottom: 25px; margin-bottom: 1.4rem; } th, td { padding-top: 6px; padding-top: 0.35rem; padding-bottom: 6px; padding-bottom: 0.35rem; } /* Incremental leading made easy! */ .caption { font-size: 15px; font-size: 0.85rem; line-height: 20px; line-height: 1.12rem; } .spaced-out { line-height: 38px; line-height: 2.1rem; } blockquote { margin-top: 25px; margin-top: 1.4rem; margin-bottom: 25px; margin-bottom: 1.4rem; padding: 0 1.4rem; } .fig-quote > blockquote { margin-bottom: 13px; margin-bottom: 0.7rem; } .fig-quote .source { font-size: 15px; font-size: 0.85rem; line-height: 25px; line-height: 1.4rem; margin-bottom: 13px; margin-bottom: 0.7rem; } .panel { border-width: 1px; border-width: 0.05556rem; border-style: solid; border-color: #aaaaaa; padding: 24px; padding: 1.34444rem; } ================================================ FILE: cli/test/fixtures/stylesheets/compass/sass/animation-with-legacy-ie.scss ================================================ @import "compass/css3/animation"; @import "compass/css3/opacity"; $browser-minimum-versions: (ie: "6"); @include keyframes(test) { 0%, 100% { @include opacity(1); } 50% { @include opacity(0); } } .animation { @include animation(test); } ================================================ FILE: cli/test/fixtures/stylesheets/compass/sass/animation.scss ================================================ @import "compass/css3/animation"; @include keyframes(test) { 0%, 100% { background-color: red; } 50% { background-color: blue; } } .animation { @include animation(test); } ================================================ FILE: cli/test/fixtures/stylesheets/compass/sass/appearance.scss ================================================ @import "compass/css3/appearance"; .searchfield { @include appearance(searchfield); } ================================================ FILE: cli/test/fixtures/stylesheets/compass/sass/background-clip.scss ================================================ @import "compass/css3/background-clip"; .background-clip { @include background-clip('border-box'); } .background-clip-multiple { @include background-clip('border-box', padding-box, content-box); } ================================================ FILE: cli/test/fixtures/stylesheets/compass/sass/background-origin.scss ================================================ @import "compass/css3/background-origin"; .background-origin { @include background-origin('border-box'); } .background-origin-multiple { @include background-origin('border-box', padding-box, content-box); } ================================================ FILE: cli/test/fixtures/stylesheets/compass/sass/background-size.scss ================================================ @import "compass/css3/background-size"; .background-size-default { @include background-size; } .background-size-single { @include background-size(50% 25%); } .background-size-multiple { @include background-size(4em 3em, $default-background-size, 50%); } ================================================ FILE: cli/test/fixtures/stylesheets/compass/sass/border_radius.scss ================================================ @import "compass/css3/border-radius"; .simple { @include border-radius(4px, 4px); } .compound { @include border-radius(2px 5px, 3px 6px); } .crazy { @include border-radius(1px 3px 5px 7px, 2px 4px 6px 8px)} ================================================ FILE: cli/test/fixtures/stylesheets/compass/sass/box-sizing.scss ================================================ @import "compass/css3/box-sizing"; .div { @include box-sizing(); } .div { @include box-sizing(content-box); } .div { @include box-sizing(border-box); } ================================================ FILE: cli/test/fixtures/stylesheets/compass/sass/box.sass ================================================ @import compass/css3/box .hbox +display-box +box-orient +box-align & > * +box-flex .vbox +display-box +box-orient(vertical) +box-align & > * +box-flex .spacer +box-flex(1) .reverse +box-direction(reverse) .box-flex-0 +box-flex(0) .box-flex-1 +box-flex(1) .box-flex-2 +box-flex(2) .box-flex-group-0 +box-flex-group(0) .box-flex-group-1 +box-flex-group(1) .box-flex-group-2 +box-flex-group(2) .start +box-pack(start) .end +box-pack(end) .center +box-pack(center) ================================================ FILE: cli/test/fixtures/stylesheets/compass/sass/box_shadow.scss ================================================ @import "compass/css3/box-shadow"; .no-box-shadow { @include box-shadow(none); } .box-shadow { @include box-shadow(default, 2px 2px 5px #222222);} .single-box-shadow { @include single-box-shadow;} .multiple-box-shadows { @include box-shadow(default, 2px 2px 5px #222222);} .legacy-single-box-shadow { @include single-box-shadow(blue);} ================================================ FILE: cli/test/fixtures/stylesheets/compass/sass/brightness.scss ================================================ @import "compass/utilities/color/brightness"; .black-is-0-percent { brightness: brightness(black); } .white-is-100-percent { brightness: brightness(white); } .green-is-58-point-7-percent { brightness: brightness(#00ff00); } .blue-is-11-point-4-percent { brightness: brightness(#0000ff); } .red-is-29-point-9-percent { brightness: brightness(#ff0000); } ================================================ FILE: cli/test/fixtures/stylesheets/compass/sass/browser-support.scss ================================================ @import "compass/support"; @import "compass/css3/flexbox"; @function unprefixed-at-version($browser, $capability) { $options: if($capability == flexbox, $flexbox-capability-options, $default-capability-options); @each $version in browser-versions($browser) { @if not browser-requires-prefix($browser, $version, $capability, $options) { @return $version; } } @return null; } @each $browser in browsers() { $prefix: browser-prefix($browser); .#{$browser} { $versions: browser-versions($browser); versions: $versions; @each $capability in browser-capabilities() { $options: if($capability == flexbox, $flexbox-capability-options, $default-capability-options); @if browser-requires-prefix($browser, nth($versions, 1), $capability, $options) { @if prefix-usage($prefix, $capability, $options) > 0.1 { #{$capability}: $prefix; } @else { #{$capability}: prefix-no-longer-needed; } #{$capability}-unprefixed-at: unprefixed-at-version($browser, $capability); } } } } ================================================ FILE: cli/test/fixtures/stylesheets/compass/sass/color.scss ================================================ $contrasted-dark-default: black; $contrasted-light-default: white; @import "compass/utilities/color"; .handles-null { content: "there should be no property below this one"; color: contrast-color(null); } .contrasts-light { @include contrasted(#eeeeee); } .contrasts-dark { @include contrasted(#222222); } .contrasts-light-with-contrast-color-override { @include contrasted(#eeeeee, $dark: red); } .contrasts-dark-with-contrast-color-override { @include contrasted(#222222, $light: yellow); } ================================================ FILE: cli/test/fixtures/stylesheets/compass/sass/columns.scss ================================================ @import "compass/css3/columns"; .columns { @include columns(20em 5); } .column-count { @include column-count(5); } .column-gap { @include column-gap(10px); } .column-width { @include column-width(90px); } .column-span { @include column-span(all); } .column-rule-width { @include column-rule-width(1px); } .column-rule-style { @include column-rule-style(dotted); } .column-rule-color { @include column-rule-color(blue); } .column-rule { @include column-rule(1px, solid, blue); } .column-rule-spaced { @include column-rule(1px solid blue); } .column-break-before{ @include column-break(before, always);} .column-break-after { @include column-break(after, always); } .column-break-inside{ @include column-break(inside); } .column-count { @include column-count(5); } .column-gap { @include column-gap(10px); } .column-width { @include column-width(90px); } .column-rule-width { @include column-rule-width(1px); } .column-rule-style { @include column-rule-style(dotted); } .column-rule-color { @include column-rule-color(blue); } .column-rule { @include column-rule(1px, solid, blue); } .column-rule-spaced { @include column-rule(1px solid blue); } .column-break-before { @include break-before(always); } .column-break-after { @include break-after(always); } .column-break-inside { @include break-inside(); } .column-break-before-shortcut { @include column-break(before, always);} .column-break-after-shortcut { @include column-break(after, always); } .column-break-inside-shortcut { @include column-break(inside); } ================================================ FILE: cli/test/fixtures/stylesheets/compass/sass/filters.scss ================================================ $debug-browser-support: true; @import "compass/css3/filter"; .blur { @include filter(blur(5px)); } .brightness { @include filter(brightness(0.2)); } // We can enable this test case when sass commit 38f3c4be8bc15c130c5b1cc5880c9131e1bcb08f is released. // .saturate { // @include filter(saturate(50%)); // } .hue-rotate { @include filter(hue-rotate(20deg)); } .contrast { @include filter(contrast(150%)); } .grayscale { @include filter(grayscale(150%)); } .sepia { @include filter(sepia(150%)); } ================================================ FILE: cli/test/fixtures/stylesheets/compass/sass/flexbox.scss ================================================ @import "compass/css3/flexbox"; .display { @include display-flex; } .flex-direction { @include flex-direction(row-reverse); } .flex-wrap { @include flex-wrap(wrap-reverse); } .flex-flow { @include flex-flow(row-reverse wrap-reverse); } .order { @include order(1); } .flex { @include flex(1 0 auto); } .flex-grow { @include flex-grow(1); } .flex-shrink { @include flex-shrink(1); } .flex-basis { @include flex-basis(auto); } .justify-content { @include justify-content(flex-start); } .align-items { @include align-items(flex-start); } .align-self { @include align-self(flex-start); } .align-content { @include align-content(flex-start); } .flexbox { @include flexbox(( display: flex, flex-direction: row-reverse, flex-wrap: wrap-reverse, flex-flow: row-reverse wrap-reverse, order: 1, flex: 1 0 auto, flex-grow: 1, flex-shrink: 0, flex-basis: auto, justify-content: flex-start, align-items: flex-start, align-self: flex-start, align-content: flex-start )); } .flexbox-2 { @include flexbox(( display: flexbox, flex-flow: row-reverse, flex-order: 1, ), $version: 2); } .flexbox-1 { @include flexbox(( display: box, box-orient: vertical, box-ordinal-group: 1, box-flex: 1, ), $version: 1); } ================================================ FILE: cli/test/fixtures/stylesheets/compass/sass/fonts.sass ================================================ @import compass/css3/font-face +font-face("font1", font-files("font1.woff", woff), "font1.eot") @font-face font-family: 'Issue1491' src: font-url('font1.eot') src: font-url('font1.eot?#iefix') format('embedded-opentype'), font-url('font1.woff') format('woff') ================================================ FILE: cli/test/fixtures/stylesheets/compass/sass/force-wrap.scss ================================================ @import "compass/typography/text"; pre { @include force-wrap; } ================================================ FILE: cli/test/fixtures/stylesheets/compass/sass/gradients.sass ================================================ @import compass/css3/images $svg-gradient-shim-threshold: 0 .bg-shortcut-simple-image +background(white url('foo.png')) .bg-shortcut-linear-gradient +background(white linear-gradient(top left, #ddd, #aaa)) .bg-shortcut-radial-gradient +background(white radial-gradient(center center, #ddd, #aaa 100px)) .bg-linear-gradient-angle-svg +background-image(linear-gradient(-45deg, blue, black)) .bg-linear-gradient-angle2-svg +background-image(linear-gradient(top left, blue, black)) .bg-all-gradient-types-with-simplification +background-with-css2-fallback(image-url("4x6.png"), linear-gradient(top left, #ddd, #aaa), radial-gradient(center center, #ddd, #aaa 100px), #ffcc00) .bg-simple-image +background-image(url('foo.png')) .bg-linear-gradient +background-image(linear-gradient(top left, #ddd, #aaa)) .bg-linear-gradient-pixel-stop-from-top +background-image(linear-gradient(top, #ddd 10px, #aaa 40px)) .bg-linear-gradient-pixel-stop-from-left +background-image(linear-gradient(left, #ddd 10px, #aaa 40px)) .transparent-in-linear-gradient +background-image(white linear-gradient(top left, transparent, #aaa)) .currentColor-in-linear-gradient +background-image(white linear-gradient(top left, transparent, currentColor)) .rgba-in-linear-gradient +background-image(white linear-gradient(top left, rgba(255,255,255,0.8), rgba(0,0,0,0.1))) .bg-radial-gradient +background-image(radial-gradient(center center, #ddd, transparent 100px)) .currentColor-in-radial-gradient +background-image(radial-gradient(center center, currentColor, transparent 100px)) .bg-linear-gradient-with-angle +background-image(linear-gradient(-45deg, #ddd, #aaa)) .bg-radial-gradient-with-angle-and-shape +background-image(radial-gradient(ellipse cover, #ddd, #aaa 100px)) .bg-all-gradient-types +background-image(image-url("4x6.png"), linear-gradient(top left, #ddd, #aaa), radial-gradient(center center, #ddd, #aaa 100px)) .border-image-gradient +border-image(radial-gradient(#0f0,#f00 100px) 100 stretch) .direct-list-image-plain +list-style-image(image-url("4x6.png")) .shorthand-list-image-plain +list-style(outside image-url("4x6.png")) .direct-list-image-with-gradient +list-style-image(radial-gradient(lime, red 10px)) .shorthand-list-image-with-gradient // Note: I haven't seen a browser render this correctly, but they should eventually. +list-style(outside radial-gradient(lime, red 10px)) .content-plain +content("asdf") .content-with-gradient +content(radial-gradient(lime, red 10px)) $svg-gradient-shim-threshold: 10 .bg-linear-gradient-no-position +background-image(linear-gradient(#ddd, #aaa)) .bg-radial-gradient-no-position +background-image(radial-gradient(#ddd, #aaa 100px)) .image-fallback +background-image(image(radial-gradient(#ddd, #aaa 100px), image-url("4x6.png"), #cc0000)) .cross-fade +background-image(cross-fade(radial-gradient(#ddd, #aaa 100px), image-url("4x6.png"))) .unknown-function-wrapper +background(foo(radial-gradient(#ddd, #aaa 100px))) .ie-horizontal-filter +filter-gradient(white, black, horizontal) .ie-vertical-filter +filter-gradient(white, black, vertical) .ie-alpha-filter +filter-gradient(rgba(white, 1), rgba(white, 0)) .linear-gradient-new +background(linear-gradient(to bottom, #ff0000 0%, #88aa44 100%)) $use-legacy-gradient-syntax: true .linear-gradient-old +background(linear-gradient(top, #ff0000 0%, #88aa44 100%)) // This setting is only important when we can't tell which syntax is being used. // * That is only ever true when the angle is specified in deg // * original webkit syntax does not support deg (see output) // * if $support-for-original-webkit-gradients and type-of($angle) == "number" : @WARN $use-legacy-gradient-syntax: false .linear-gradient-unknown-new +background(linear-gradient(120deg, #ff0000 0%, #88aa44 100%)) $use-legacy-gradient-syntax: true .linear-gradient-unknown-old +background(linear-gradient(120deg, #ff0000 0%, #88aa44 100%)) ================================================ FILE: cli/test/fixtures/stylesheets/compass/sass/grid_background.scss ================================================ @import "compass/layout/grid-background"; .baseline { @include baseline-grid-background; } .columns { @include column-grid-background; } .combined { @include grid-background; } $grid-background-total-columns: 15; $grid-background-offset: 11%; $grid-background-column-width: 5%; $grid-background-gutter-width: 1%; .percent-baseline { @include baseline-grid-background; } .percent-columns { @include column-grid-background; } .percent-combined { @include grid-background; } .forced-fluid { @include column-grid-background(12, 2em, 1em, 1em, $grid-background-column-color, $grid-background-gutter-color, true); } ================================================ FILE: cli/test/fixtures/stylesheets/compass/sass/hyphenation.scss ================================================ @import "compass/css3/hyphenation"; .word-break { @include word-break(keep-all); } .hyphens { @include hyphens(manual); } .hyphenate { @include hyphenation; } ================================================ FILE: cli/test/fixtures/stylesheets/compass/sass/image_size.sass ================================================ .png width: image_width(unquote("100x150.png")) height: image_height(unquote("100x150.png")) .jpg width: image_width(unquote("100x150.jpg")) height: image_height(unquote("100x150.jpg")) .jpeg width: image_width(unquote("100x150.jpeg")) height: image_height(unquote("100x150.jpeg")) .gif width: image_width(unquote("100x150.gif")) height: image_height(unquote("100x150.gif")) ================================================ FILE: cli/test/fixtures/stylesheets/compass/sass/images.scss ================================================ .relative { background-image: image-url("4x6.png"); } .root-relative { background-image: image-url("/images/4x6.png"); } .absolute { background-image: image-url("http://example.com/images/4x6.png"); } ================================================ FILE: cli/test/fixtures/stylesheets/compass/sass/layout.sass ================================================ @import compass/layout +sticky-footer(72px, unquote("#layout"), unquote("#layout_footer"), unquote("#footer")) ================================================ FILE: cli/test/fixtures/stylesheets/compass/sass/legacy_clearfix.scss ================================================ $default-has-layout-approach: block; @import "compass/utilities"; .clearfix { @include clearfix; } .pie-clearfix { @include legacy-pie-clearfix; } .simplified-pie-clearfix { @include pie-clearfix; } ================================================ FILE: cli/test/fixtures/stylesheets/compass/sass/lists.scss ================================================ @import "compass/typography/lists"; ul.horizontal { @include horizontal-list; } ul.wide-horizontal { @include horizontal-list(10px); } ul.right-horizontal { @include horizontal-list(4px, right); } ul.no-padding { @include horizontal-list(false); } ul.inline-block { @include inline-block-list; } ul.wide-inline-block { @include inline-block-list(10px); } ul.inline { @include inline-list; } ul.comma { @include delimited-list; } ul.no-bullets { @include no-bullets; } ul.pretty { @include pretty-bullets("4x6.png"); } ================================================ FILE: cli/test/fixtures/stylesheets/compass/sass/opacity.scss ================================================ @import "compass/css3/opacity"; div { @include opacity(1); } div { @include opacity(.2); } ================================================ FILE: cli/test/fixtures/stylesheets/compass/sass/print.sass ================================================ @import compass/utilities/print +print-utilities +print-utilities(screen) ================================================ FILE: cli/test/fixtures/stylesheets/compass/sass/regions.scss ================================================ @import "compass/css3/regions"; .source { @include flow-into(target); } .new-container { @include flow-from(target); } ================================================ FILE: cli/test/fixtures/stylesheets/compass/sass/replacement.scss ================================================ @import "compass/typography/text/replacement"; .basic { @include replace-text("4x6.png"); } .with-dimensions { @include replace-text-with-dimensions("4x6.png"); } .with-dimensions-inline { @include replace-text-with-dimensions("4x6.png", $inline: true); } .with-position { @include replace-text("4x6.png", 10px, top); } .with-arbitrary-url { @include replace-text(url(http://google.com/logo.gif), 10px, top); } .with-inline-url { @include replace-text(inline-image("4x6.png"), 10px, top); } .with-image-url { @include replace-text(image-url("4x6.png"), 10px, top); } ================================================ FILE: cli/test/fixtures/stylesheets/compass/sass/reset.sass ================================================ @import compass/reset // Turn off the display for both of these classes .unregistered-only, .registered-only display: none // Now turn only one of them back on depending on some other context. body.registered +reset-display(unquote(".registered-only")) body.unregistered +reset-display(unquote(".unregistered-only")) ================================================ FILE: cli/test/fixtures/stylesheets/compass/sass/selection.scss ================================================ $contrasted-dark-default: black; $contrasted-light-default: white; @import "compass/css3/selection"; * { @include selection { background-color: #fe57a1; color: #fff; } } .hot-pink { @include selection { background-color: #fe57a1; color: #fff; } } .hot-pink-with-arguments { @include selection(#fe57a1, white); } .hot-pink-with-arguments-and-extra-stuff { @include selection(#fe57a1, white) { text-decoration: line-through; } } .hot-pink-with-default-foreground { @include selection(#fe57a1); } .browser-support-is-considered { @include selection(#fe57a1) { prefix: $current-prefix; -moz-prefix: $current-prefix == -moz; -ms-prefix: $current-prefix == -ms; -webkit-prefix: $current-prefix == -webkit; } } ================================================ FILE: cli/test/fixtures/stylesheets/compass/sass/sprites_with_explicit_separator.scss ================================================ $flag_states-sprite-dimensions: true; $flag_states-class-separator: "_"; @import "flag_states/*.png"; @include all-flag_states-sprites; .sprite-file { location: image-url(sprite_file($flag-states-sprites, foo)); } ================================================ FILE: cli/test/fixtures/stylesheets/compass/sass/stretching.sass ================================================ @import "compass/layout/stretching" .stretched-completely +stretch .stretched-horizontally +stretch-x .stretched-right +stretch-x(0, 50%) .left-pane +stretch(0, 50%, 0, 0) .stretched-left +stretch-x(50%, 0) .right-pane +stretch(0, 0, 0, 50%) .stretched-down +stretch-y(0, 50%) .top-pane +stretch(0, 0, 50%, 0) .stretched-up +stretch-y(50%, 0) .bottom-pane +stretch(50%, 0, 0, 0) .viewport +stretch(10px, 20px, 30px, 40px) ================================================ FILE: cli/test/fixtures/stylesheets/compass/sass/support.scss ================================================ @import "compass/css3/animation"; @import "compass/css3/opacity"; @import "true"; $some-default-value: some default value; @function has-default-arglist($arglist...) { @return set-arglist-default($arglist, $some-default-value); } @mixin with-declared-support($browsers) { $old-browsers: $supported-browsers; $supported-browsers: $browsers !global; @content; $supported-browsers: $old-browsers !global; } @mixin with-declared-minimums($supported-browsers) { $old-mins: $browser-minimum-versions; $browser-minimum-versions: $supported-browsers !global; @content; $browser-minimum-versions: $old-mins !global; } @include test-module('Compass Support') { @include test('[function] set-arglist-default() with no arguments') { @include assert-true( has-default-arglist() == $some-default-value, 'No arguments should get a default value.'); } @include test('[function] set-arglist-default() with a "default" argument') { @include assert-true( nth(has-default-arglist(default), 1) == $some-default-value, 'an argument of "default" should get a default value.'); } @include test('[function] set-arglist-default() with a "default" argument and another argument') { @include assert-true( has-default-arglist(default, some other value) == ($some-default-value, some other value), 'an argument of "default" should get a default value.'); } @include test('[function] set-arglist-default() with a "default" argument not first and another argument') { @include assert-true( has-default-arglist(some other value, default) == (some other value, $some-default-value), 'an argument of "default" should get a default value.'); } @include test('[function] support-legacy-browser() from threshold') { @include assert-true(support-legacy-browser('ie', '6', $threshold: 0.00000001), "should be supported because of user support threshold."); @include assert-false(support-legacy-browser('ie', '6', $threshold: 10.000), "should not be supported because of support threshold."); } @include test('[function] support-legacy-browser() from minimums') { @include with-declared-minimums(('ie': '7')) { @include assert-true(support-legacy-browser('ie', '7', $threshold: 10.00), "should be supported because of minimum version."); @include assert-false(support-legacy-browser('ie', '6', $threshold: 10.000), "should not be supported because of minimum version."); } } @include test('[function] browser-out-of-scope() with no scope') { @include assert-true(not browser-out-of-scope('ie'), "should be in scope."); @include assert-true(not browser-out-of-scope('chrome'), "should be in scope."); } @include test('prefix context tracking') { $outer-prefix-invoked: false; $inner-prefix-invoked: false; $mismatched-prefix-invoked: false; @include with-prefix(-webkit) { $outer-prefix-invoked: true; @include assert-equal(-webkit, $current-prefix, "should be equal."); @include assert-equal(-webkit, $prefix-context, "should be equal."); @include with-prefix(null) { $inner-prefix-invoked: true; @include assert-equal(null, $current-prefix, "should be equal."); @include assert-equal(-webkit, $prefix-context, "should be equal."); } @include with-prefix(-ms) { $mismatched-prefix-invoked: true; } } @include assert-true($inner-prefix-invoked, "should have been invoked"); @include assert-true($outer-prefix-invoked, "should have been invoked"); @include assert-false($mismatched-prefix-invoked, "should not have been invoked"); @include assert-equal(null, $prefix-context, "should be null"); @include assert-equal(null, $current-prefix, "should be null"); } @include test('[function] browser-out-of-scope() with a scope') { @include with-prefix(browser-prefix('chrome')) { @include assert-true(not browser-out-of-scope('chrome'), "should be in scope."); @include assert-false(not browser-out-of-scope('ie'), "should not be in scope."); } } @include test('[function] browser-out-of-scope() with version') { @include with-browser-ranges((ie: '8' '8')) { @include assert-false(not browser-out-of-scope('ie', '10'), "should not be in scope."); @include assert-true(not browser-out-of-scope('ie', '8'), "should be in scope."); @include assert-false(not browser-out-of-scope('ie', '7'), "should not be in scope."); } } @include test('[mixin] with-prefix()') { @include assert-true($current-prefix == null, "should be null."); @include with-prefix(-webkit) { @include assert-true($current-prefix == -webkit, "should be set."); $called: false; @include with-prefix(-webkit) { $called: true; } @include assert-true($called, "should be called."); $called: false; @include with-prefix(-ms) { $called: true; } @include assert-false($called, "should not be called."); } } @include test('[mixin] with-each-prefix()') { $prefixes: (); @include with-each-prefix(css-regions, 0.0001) { $prefixes: append($prefixes, $current-prefix); } @include assert-equal((-ms -webkit null), $prefixes, "Not equal"); } @include test('[mixin] with-each-prefix() respects $supported-browsers') { @include with-declared-support("ie") { $prefixes: (); @include with-each-prefix(css-regions, 0.0001) { $prefixes: append($prefixes, $current-prefix); } @include assert-equal((-ms null), $prefixes, "Not equal"); } } @include test('[mixin] with-each-prefix() respects $current-prefix') { $contexts: (); $prefixes: (); @include with-prefix(-webkit) { $prefixes: append($prefixes, $current-prefix); $contexts: append($contexts, $prefix-context); @include with-each-prefix(css-regions, 0.0001) { $prefixes: append($prefixes, $current-prefix); $contexts: append($contexts, $prefix-context); } } @include assert-true(index($prefixes, null), "Must have a null"); @include assert-equal((-webkit -webkit null), $prefixes, "Not equal"); @include assert-equal((-webkit -webkit -webkit), $contexts, "Not equal"); } @include test('[fuction] has-browser-subset()') { @include assert-true(has-browser-subset((firefox: "16" "25"), (firefox: "2" "25")), "Should detect version overlap"); @include assert-true(not has-browser-subset((firefox: "16" "25"), (firefox: "2" "15")), "Should not detect version overlap"); @include assert-true(not has-browser-subset((firefox: "2" "15"), (firefox: "16" "25")), "Should not detect version overlap"); @include assert-true(has-browser-subset((firefox: "16" "24"), (firefox: "2" "25")), "Should detect version overlap"); @include assert-true(has-browser-subset((firefox: "2" "25"), (firefox: "16" "24")), "Should detect version overlap"); } } @include with-browser-support-debugging { @include keyframes(foo) { 0% { @include opacity(0); } 100% { @include opacity(1); } } .foo { @include animation(foo 1s); } } ================================================ FILE: cli/test/fixtures/stylesheets/compass/sass/text_shadow.scss ================================================ $default-text-shadow-color: #aaaaaa; @import "compass/css3/text-shadow"; .default-single-text-shadow { @include single-text-shadow;} .none { @include single-text-shadow(none);} .color-only { @include single-text-shadow(#cccccc);} .color-first-with-params { @include single-text-shadow(#cccccc, 2px, 2px, 5px, 2px);} .color-last-with-params { @include single-text-shadow(2px, 2px, 5px, 2px, #cccccc);} .default-text-shadow { @include text-shadow;} .multiple-text-shadows-with-default { @include text-shadow(default, 2px 2px 5px #222222);} .multiple-text-shadows { @include text-shadow(4px 4px 10px #444444, 2px 2px 5px #222222);} .multiple-text-shadows-with-spread { @include text-shadow(4px 4px 10px 1px #444444, 2px 2px 5px 3px #222222);} ================================================ FILE: cli/test/fixtures/stylesheets/compass/sass/transform.scss ================================================ @import "compass/css3/transform"; .apply-origin-2d { @include apply-origin(2px 5%, false); } .apply-origin-3d { @include apply-origin(2px 5% 2in, true); } .transform-origin-2d { @include transform-origin(100px, 100px); } .transform-origin-3d { @include transform-origin(100px, 100px, 100px); } .transform-2d { @include transform2d(rotateY(20deg)); } .transform-3d { @include transform3d(rotateZ(20deg)); } .perspective { @include perspective(500); } .perspective-origin { @include perspective-origin(25% 25%)} .transform-style { @include transform-style; } .backface-visibility { @include backface-visibility;} .scale { @include scale(30px, 50px);} .scale-3d { @include scale(30px, 50px, false, true);} .scale-with-perspective { @include scale(30px, 50px, 500);} .scale-3d-with-perspective { @include scale(30px, 50px, 500, true);} .scale-x { @include scaleX(30px);} .scale-x-3d { @include scaleX(30px, false, true);} .scale-x-with-perspective { @include scaleX(30px, 500);} .scale-x-3d-with-perspective { @include scaleX(30px, 500, true);} .scale-y { @include scaleY(50px);} .scale-y-3d { @include scaleY(50px, false, true);} .scale-y-with-perspective { @include scaleY(50px, 500);} .scale-y-3d-with-perspective { @include scaleY(50px, 500, true);} .scale-z { @include scaleZ(50px);} .scale-z-with-perspective { @include scaleZ(50px, 500);} .scale3d { @include scale3d(30px, 50px, 100px);} .scaled3-with-perspective { @include scale3d(30px, 50px, 100px, 500);} .rotate { @include rotate(25deg, 500);} .rotate-with-perspective { @include rotate(25deg, 500);} .rotate-z { @include rotateZ(25deg);} .rotate-z-with-perspective { @include rotateZ(25deg, 500);} .rotate-x { @include rotateX(25deg);} .rotate-x-with-perspective { @include rotateX(25deg, 500);} .rotate-y { @include rotateY(25deg);} .rotate-y-with-perspective { @include rotateY(25deg, 500);} .rotate-3d { @include rotate3d(5, 2, 1, 75deg);} .rotate-3d-with-perspective { @include rotate3d(5, 2, 1, 75deg, 500);} .translate { @include translate(20px, 30%);} .translate-with-perspective { @include translate(20px, 30%, 500);} .translate-3d { @include translate(20px, 30%, false, true);} .translate-3d-with-perspective { @include translate(20px, 30%, 500, true);} .translate-x { @include translateX(30px);} .translate-x-3d { @include translateX(30px, false, true);} .translate-x-with-perspective { @include translateX(30px, 500);} .translate-x-3d-with-perspective { @include translateX(30px, 500, true);} .translate-y { @include translateY(30px);} .translate-y-3d { @include translateY(30px, false, true);} .translate-y-with-perspective { @include translateY(30px, 500);} .translate-y-3d-with-perspective { @include translateY(30px, 500, true);} .translate-z { @include translateZ(30px);} .translate-z-with-perspective { @include translateZ(30px, 500);} .translate-3d { @include translate3d(30px, 50px, 75px);} .translate-3d-with-perspective { @include translate3d(30px, 50px, 75px, 500);} .skew { @include skew(20deg, 50deg);} .skew-3d { @include skew(20deg, 50deg, true);} .skew-x { @include skewX(20deg);} .skew-x-3d { @include skewX(20deg, true);} .skew-y { @include skewY(20deg);} .skew-y-3d { @include skewY(20deg, true);} .create-transform-2d { @include create-transform( 500, 20px, 20px, false, 25deg, 25deg, false, false 50px, 50px, false, 50deg, 50deg, 50%, 50%, false ); } .create-transform-3d { @include create-transform( 500, 20px, 20px, 20px, 25deg, 25deg, 25deg, false 50px, 50px, 50px, 50deg, 50deg, 50%, 50%, 50% ); } .simple-transform { @include simple-transform( 25px, 25deg, 10px, 10px, 30deg, 30deg, 10%, 10% ); } ================================================ FILE: cli/test/fixtures/stylesheets/compass/sass/transition.scss ================================================ @import "compass/css3/transition"; .single-transition-without-delay { @include single-transition(all, 0.6s, ease-out); } .single-transition-with-delay { @include single-transition(all, 0.6s, ease-out, 0.2s); } .transition-duration-list { @include transition-duration((0.2s, 0.5s, 0.2s)); } .multiple-transition-durations { @include transition-duration(0.2s, 0.5s, 0.2s); } .single-transform-transition-without-delay { @include single-transition(transform, 0.6s, ease-out); } .single-transform-transition-with-delay { @include single-transition(transform, 0.6s, ease-out, 0.2s); } .transform-transition { @include transition(transform 0.6s ease-out) } .multiple-transitions { @include transition(transform 0.6s ease-out, opacity 0.2s ease-in) } .transition-property { @include transition-property(transform); } .transition-properties { @include transition-property(transform, opacity, width, height, left, top); } .multiple-transition-properties { @include transition-property((opacity, transform, left)); } .default-transition { @include transition(); } .transition-timing { @include transition-timing-function(ease-in); } .transition-timings { @include transition-timing-function(ease-in, cubic-bezier(1,0,1,0)); } .transition-timings-list { @include transition-timing-function((ease-in, cubic-bezier(1,0,1,0))); } .transition-delay { @include transition-delay(1s); } .transition-delays { @include transition-delay(1s, 2s, 3s); } .transition-delays-list { @include transition-delay((1s, 2s, 3s)); } .regression-912 { @include transition((background-color 0.5s ease-in 0s, width 0.5s ease-out 0s, height 0.5s ease-in 0s, top 0.5s ease-out 0s)); } ================================================ FILE: cli/test/fixtures/stylesheets/compass/sass/typography/links/hover-link.scss ================================================ @import "compass/typography/links/hover-link"; a { @include hover-link; } ================================================ FILE: cli/test/fixtures/stylesheets/compass/sass/units.scss ================================================ $base-font-size: 16px; @import "compass/typography/units"; .foo { width: 600px; height: 200px; } .foo .test { /* 16px for margins should be 1em */ margin-top: convert-length(16px, em); /* 16px for margins should be 2.66667% (relative to parent's width) */ margin-right: convert-length(16px, '%', $to-context: 600px); /* 1.35em for margins should be 3.6% (relative to parent's width, * even for top and bottom margins) */ margin-bottom: convert-length(1.35em, '%', $to-context: 600px); /* 16px for margins should be 2ex */ margin-left: convert-length(16px, ex); } .bar { font-size: 18px; width: 360px; } .bar .test { /* 150% for line-height should be 27px */ line-height: convert-length(150%, px, 18px); /* 1px should always be .0625rem for this page */ border-top: convert-length(1px, rem); /* 2em for this element should be 9.525mm (relative to own font-size, as inherited) */ margin-top: convert-length(2em, mm, 18px); /* 2px for margins should be .55556% (relative to parent's width) */ margin-right: convert-length(2px, '%', $to-context: 360px); /* 1rem should always be 16px for this page, even when own font-size is 18px */ margin-bottom: convert-length(1rem, px); } .rem { $val: 25rem, 100% 32px; @include rem(background-size, $val, true); } ================================================ FILE: cli/test/fixtures/stylesheets/compass/sass/user-interface.scss ================================================ @import "compass/css3/user-interface"; .user-select { @include user-select(none); } * { @include input-placeholder { color: #bfbfbf; font-style: italic; } } #{elements-of-type(text-input)} { @include input-placeholder { color: #bfbfbf; font-style: italic; } } .sets-up-browser-support-for-content { @include input-placeholder { prefix: $current-prefix; -moz-prefix: $current-prefix == -moz; -ms-prefix: $current-prefix == -ms; -webkit-prefix: $current-prefix == -webkit; } } ================================================ FILE: cli/test/fixtures/stylesheets/compass/sass/utilities.scss ================================================ $contrasted-dark-default: black; $contrasted-light-default: white; @import "compass/utilities"; .clearfix { @include clearfix; } .pie-clearfix { @include legacy-pie-clearfix; } .simple-pie-clearfix { @include pie-clearfix; } p.light { @include contrasted(#f3aead); } p.dark { @include contrasted(#a22321); } p.light-with-args { @include contrasted(#f3aead, blue, yellow); } p.dark-with-args { @include contrasted(#a22321, blue, yellow); } @include alternating-rows-and-columns(red, white, blue); p.ellipsis { @include ellipsis; } p.ellipsis.moz { $legacy-support-for-mozilla: true !global; $use-mozilla-ellipsis-binding: true !global; @include ellipsis; } ================================================ FILE: cli/test/fixtures/stylesheets/compass/sass/vertical_rhythm.scss ================================================ // Test all functions and mixins, at least indirectly. // functions: // * rhythm // * lines-for-font-size // // mixins: // * establish-baseline // * output-rhythm // * debug-vertical-alignment // * adjust-font-size-to // * adjust-leading-to // * leader // * margin-leader // * padding-leader // * trailer // * margin-trailer // * padding-trailer // * rhythm // * rhythm-margins // * rhythm-padding // * apply-side-rhythm-border // * leading-border // * trailing-border // * rhythm-borders // * horizontal-borders (h-borders) // // deprecated mixins: // * reset-baseline $base-font-size: 14px; $base-line-height: 16px; @import "compass/typography/vertical_rhythm"; @include establish-baseline; .small { @include adjust-font-size-to(12px, 1); } .padded { @include rhythm(1, 1, 1, 1); } .small-padded { @include adjust-font-size-to(12px, 1); @include rhythm(1, 1, 1, 1, 12px); } .borders { @include h-borders(1px, 1); } .large-borders { @include adjust-font-size-to(24px, 3); @include h-borders(6px, 1, 24px); } .reset { @include reset-baseline; } ================================================ FILE: cli/test/fixtures/stylesheets/compass/sass/vertical_rhythm_with_ems.scss ================================================ /* New test using em output */ $base-font-size: 18px; $base-line-height: $base-font-size * 1.4; $rhythm-unit: em; $default-rhythm-border-style: solid #aaaaaa; @import "compass/typography/vertical_rhythm"; @include establish-baseline; .container { @include debug-vertical-alignment; } p { @include margin-leader; @include margin-trailer; } th, td { @include rhythm-padding(.25); } // Incremental leading made easy! .caption { @include adjust-font-size-to(13px, 4/5); } .spaced-out { @include adjust-leading-to(1.5); } blockquote { @include rhythm-margins; padding: 0 rhythm(); } .fig-quote { > blockquote { @include trailer(.5); } .source { @include adjust-font-size-to(13px, auto); @include trailer(.5, 13px); } } .panel { @include adjust-font-size-to(16px); @include rhythm-borders($font-size: 16px); } ================================================ FILE: cli/test/fixtures/stylesheets/compass/sass/vertical_rhythm_with_px.scss ================================================ /* New using px output */ $base-font-size: 18px; $base-line-height: $base-font-size * 1.4; $rhythm-unit: px; $default-rhythm-border-style: solid #aaaaaa; @import "compass/typography/vertical_rhythm"; @include establish-baseline; .container { @include debug-vertical-alignment; } p { @include margin-leader; @include margin-trailer; } th, td { @include rhythm-padding(.25); } /* Incremental leading made easy! */ .caption { @include adjust-font-size-to(.85rem, 4/5); } .spaced-out { @include adjust-leading-to(1.5); } blockquote { @include rhythm-margins; padding: 0 rhythm(); } .fig-quote { > blockquote { @include trailer(.5); } .source { @include adjust-font-size-to(.85rem, auto); @include trailer(.5); } } .panel { @include rhythm-borders; } ================================================ FILE: cli/test/fixtures/stylesheets/compass/sass/vertical_rhythm_with_rems.scss ================================================ /* New using rem output with pixel fallbacks */ $base-font-size: 18px; $base-line-height: $base-font-size * 1.4; $rhythm-unit: rem; $default-rhythm-border-style: solid #aaaaaa; @import "compass/typography/vertical_rhythm"; @include establish-baseline; .container { @include debug-vertical-alignment; } p { @include margin-leader; @include margin-trailer; } th, td { @include rhythm-padding(.25); } /* Incremental leading made easy! */ .caption { @include adjust-font-size-to(.85rem, 4/5); } .spaced-out { @include adjust-leading-to(1.5); } blockquote { @include rhythm-margins; padding: 0 rhythm(); } .fig-quote { > blockquote { @include trailer(.5); } .source { @include adjust-font-size-to(.85rem, auto); @include trailer(.5); } } .panel { @include rhythm-borders; } ================================================ FILE: cli/test/fixtures/stylesheets/envtest/config.rb ================================================ # Require any additional compass plugins here. project_type = :stand_alone css_dir = "tmp" sass_dir = "sass" images_dir = "images" output_style = :nested line_comments = false disable_warnings = true ================================================ FILE: cli/test/fixtures/stylesheets/envtest/css/env.css ================================================ .env { env: <%= options[:environment] %>; } .time { time: <%= Time.now.strftime("%F") %>; } .date { date: <%= Time.now.strftime("%F") %>; } .filename { file: env.scss; } .output { output: env.css; } ================================================ FILE: cli/test/fixtures/stylesheets/envtest/sass/env.scss ================================================ .env { env: compass-env(); } .time { time: current-time("%F"); } .date { date: current-date("%F"); } .filename { file: current-source-file(); } .output { output: current-output-file(); } ================================================ FILE: cli/test/fixtures/stylesheets/error/config.rb ================================================ # Require any additional compass plugins here. css_dir = "tmp" sass_dir = "sass" images_dir = "assets/images" javascripts_dir = "assets/javascripts" # Set this to the root of your project when deployed: http_path = "/" # To enable relative paths to assets via compass helper functions. Uncomment: output_style = :compact relative_assets = true ================================================ FILE: cli/test/fixtures/stylesheets/error/sass/screen.sass ================================================ test background: image_url("testing.png) ================================================ FILE: cli/test/fixtures/stylesheets/image_urls/config.rb ================================================ # Require any additional compass plugins here. project_type = :stand_alone css_dir = "tmp" sass_dir = "sass" images_dir = "images" output_style = :compact # To enable relative image paths using the images_url() function: # http_images_path = :relative http_images_path = "/images" line_comments = false asset_cache_buster do |path, file| "busted=true" end asset_host do |path| "http://assets%d.example.com" % (path.size % 4) end ================================================ FILE: cli/test/fixtures/stylesheets/image_urls/css/screen.css ================================================ .showgrid { background-image: url('http://assets0.example.com/images/grid.png?busted=true'); } .inlinegrid { background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAUEAYAAACv1qP4AAAABmJLR0T///////8JWPfcAAAACXBIWXMAAABIAAAASABGyWs+AAAAZ0lEQVRYw+3QwQ2AIBAFUTEUwI3+uzN7gDscsIgxEuO8An52J11X73OudfxMraXkzHfO3Y98nQEhA0IGhAwIGRAyIGRAyICQASEDQgaEDAgZEDIgZEDIgJABoZzSGK3tPuN9ERFP7Nw4fg+c5g8V1wAAAABJRU5ErkJggg=='); } .no-buster { background-image: url('http://assets0.example.com/images/grid.png'); } ================================================ FILE: cli/test/fixtures/stylesheets/image_urls/sass/screen.sass ================================================ .showgrid background-image: image-url(unquote("grid.png")) .inlinegrid background-image: inline-image(unquote("grid.png")) .no-buster background-image: image-url("grid.png", $only-path: false, $cache-buster: false) ================================================ FILE: cli/test/fixtures/stylesheets/relative/config.rb ================================================ # Require any additional compass plugins here. css_dir = "tmp" sass_dir = "sass" images_dir = "assets/images" javascripts_dir = "assets/javascripts" # Set this to the root of your project when deployed: http_path = "/" # To enable relative paths to assets via compass helper functions. Uncomment: output_style = :compact relative_assets = true ================================================ FILE: cli/test/fixtures/stylesheets/relative/css/ie.css ================================================ /* Welcome to Compass. Use this file to write IE specific override styles. Import this file using the following HTML or equivalent: */ ================================================ FILE: cli/test/fixtures/stylesheets/relative/css/print.css ================================================ /* Welcome to Compass. Use this file to define print styles. Import this file using the following HTML or equivalent: */ ================================================ FILE: cli/test/fixtures/stylesheets/relative/css/screen.css ================================================ test { background: url('../assets/images/testing.png?<%= File.mtime(File.join(Compass.configuration.project_path, 'assets', 'images', 'testing.png')).strftime("%s") %>'); } ================================================ FILE: cli/test/fixtures/stylesheets/relative/sass/ie.sass ================================================ /* Welcome to Compass. Use this file to write IE specific override styles. Import this file using the following HTML or equivalent: ================================================ FILE: cli/test/fixtures/stylesheets/relative/sass/print.sass ================================================ /* Welcome to Compass. Use this file to define print styles. Import this file using the following HTML or equivalent: ================================================ FILE: cli/test/fixtures/stylesheets/relative/sass/screen.sass ================================================ test background: image_url(unquote("testing.png")) ================================================ FILE: cli/test/fixtures/stylesheets/sourcemaps/config.rb ================================================ # Require any additional compass plugins here. css_dir = "tmp" sass_dir = "sass" images_dir = "assets/images" javascripts_dir = "assets/javascripts" # Set this to the root of your project when deployed: http_path = "/" # To enable relative paths to assets via compass helper functions. Uncomment: relative_assets = true sourcemap = true ================================================ FILE: cli/test/fixtures/stylesheets/sourcemaps/css/another_simple.css ================================================ .another-simple-class{color:blue} /*# sourceMappingURL=another_simple.css.map */ ================================================ FILE: cli/test/fixtures/stylesheets/sourcemaps/css/simple.css ================================================ div{color:red} /*# sourceMappingURL=simple.css.map */ ================================================ FILE: cli/test/fixtures/stylesheets/sourcemaps/css/with_libraries.css ================================================ *{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box} /*# sourceMappingURL=with_libraries.css.map */ ================================================ FILE: cli/test/fixtures/stylesheets/sourcemaps/sass/another_simple.scss ================================================ .another-simple-class { color: blue; } ================================================ FILE: cli/test/fixtures/stylesheets/sourcemaps/sass/simple.sass ================================================ div color: red ================================================ FILE: cli/test/fixtures/stylesheets/sourcemaps/sass/with_libraries.scss ================================================ @import "compass/css3/box-sizing"; * { @include box-sizing; } ================================================ FILE: cli/test/fixtures/stylesheets/uses_only_stylesheets_ext/config.rb ================================================ # Require any additional compass plugins here. load '../../extensions/only_stylesheets/' # Set this to the root of your project when deployed: http_path = "/" css_dir = "stylesheets" sass_dir = "sass" images_dir = "images" javascripts_dir = "javascripts" # You can select your preferred output style here (can be overridden via the command line): # output_style = :expanded or :nested or :compact or :compressed # To enable relative paths to assets via compass helper functions. Uncomment: # relative_assets = true # To disable debugging comments that display the original location of your selectors. Uncomment: # line_comments = false # If you prefer the indented syntax, you might want to regenerate this # project again passing --syntax sass, or you can uncomment this: # preferred_syntax = :sass # and then run: # sass-convert -R --from scss --to sass sass scss && rm -rf sass && mv scss sass ================================================ FILE: cli/test/fixtures/stylesheets/uses_only_stylesheets_ext/sass/ie.scss ================================================ /* Welcome to Compass. Use this file to write IE specific override styles. * Import this file using the following HTML or equivalent: * */ ================================================ FILE: cli/test/fixtures/stylesheets/uses_only_stylesheets_ext/sass/print.scss ================================================ /* Welcome to Compass. Use this file to define print styles. * Import this file using the following HTML or equivalent: * */ ================================================ FILE: cli/test/fixtures/stylesheets/uses_only_stylesheets_ext/sass/screen.scss ================================================ /* Welcome to Compass. * In this file you should write your main styles. (or centralize your imports) * Import this file using the following HTML or equivalent: * */ @import "compass/reset"; ================================================ FILE: cli/test/fixtures/stylesheets/uses_only_stylesheets_ext/stylesheets/ie.css ================================================ /* Welcome to Compass. Use this file to write IE specific override styles. * Import this file using the following HTML or equivalent: * */ ================================================ FILE: cli/test/fixtures/stylesheets/uses_only_stylesheets_ext/stylesheets/print.css ================================================ /* Welcome to Compass. Use this file to define print styles. * Import this file using the following HTML or equivalent: * */ ================================================ FILE: cli/test/fixtures/stylesheets/uses_only_stylesheets_ext/stylesheets/screen.css ================================================ /* Welcome to Compass. * In this file you should write your main styles. (or centralize your imports) * Import this file using the following HTML or equivalent: * */ /* line 17, ../../../../../../../.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/compass-0.12.alpha.0/frameworks/compass/stylesheets/compass/reset/_utilities.scss */ html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video { margin: 0; padding: 0; border: 0; font-size: 100%; font: inherit; vertical-align: baseline; } /* line 20, ../../../../../../../.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/compass-0.12.alpha.0/frameworks/compass/stylesheets/compass/reset/_utilities.scss */ body { line-height: 1; } /* line 22, ../../../../../../../.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/compass-0.12.alpha.0/frameworks/compass/stylesheets/compass/reset/_utilities.scss */ ol, ul { list-style: none; } /* line 24, ../../../../../../../.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/compass-0.12.alpha.0/frameworks/compass/stylesheets/compass/reset/_utilities.scss */ table { border-collapse: collapse; border-spacing: 0; } /* line 26, ../../../../../../../.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/compass-0.12.alpha.0/frameworks/compass/stylesheets/compass/reset/_utilities.scss */ caption, th, td { text-align: left; font-weight: normal; vertical-align: middle; } /* line 28, ../../../../../../../.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/compass-0.12.alpha.0/frameworks/compass/stylesheets/compass/reset/_utilities.scss */ q, blockquote { quotes: none; } /* line 101, ../../../../../../../.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/compass-0.12.alpha.0/frameworks/compass/stylesheets/compass/reset/_utilities.scss */ q:before, q:after, blockquote:before, blockquote:after { content: ""; content: none; } /* line 30, ../../../../../../../.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/compass-0.12.alpha.0/frameworks/compass/stylesheets/compass/reset/_utilities.scss */ a img { border: none; } /* line 114, ../../../../../../../.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/compass-0.12.alpha.0/frameworks/compass/stylesheets/compass/reset/_utilities.scss */ article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section, summary { display: block; } ================================================ FILE: cli/test/fixtures/stylesheets/valid/config.rb ================================================ # Require any additional compass plugins here. css_dir = "tmp" sass_dir = "sass" images_dir = "assets/images" javascripts_dir = "assets/javascripts" # Set this to the root of your project when deployed: http_path = "/" # To enable relative paths to assets via compass helper functions. Uncomment: relative_assets = true ================================================ FILE: cli/test/fixtures/stylesheets/valid/sass/another_simple.scss ================================================ .another-simple-class { color: blue; } ================================================ FILE: cli/test/fixtures/stylesheets/valid/sass/simple.sass ================================================ div color: red ================================================ FILE: cli/test/fixtures/stylesheets/with_sass_globbing/config.rb ================================================ require 'sass-globbing' require 'compass/import-once/activate' # Require any additional compass plugins here. # Set this to the root of your project when deployed: http_path = "/" css_dir = "tmp" sass_dir = "sass" images_dir = "images" javascripts_dir = "javascripts" # You can select your preferred output style here (can be overridden via the command line): output_style = :expanded # To enable relative paths to assets via compass helper functions. Uncomment: relative_assets = true # To disable debugging comments that display the original location of your selectors. Uncomment: line_comments = true # If you prefer the indented syntax, you might want to regenerate this # project again passing --syntax sass, or you can uncomment this: # preferred_syntax = :sass # and then run: # sass-convert -R --from scss --to sass sass scss && rm -rf sass && mv scss sass ================================================ FILE: cli/test/fixtures/stylesheets/with_sass_globbing/css/screen.css ================================================ /* line 1, ../sass/partials/_1.scss */ .one { value: 1; } /* line 1, ../sass/partials/_2.scss */ .two { value: 2; } /* line 1, ../sass/partials/_3.scss */ .three { value: 3; } /* line 3, ../sass/screen.scss */ .something { awww: yeah; } ================================================ FILE: cli/test/fixtures/stylesheets/with_sass_globbing/sass/partials/_1.scss ================================================ .one { value: 1; } ================================================ FILE: cli/test/fixtures/stylesheets/with_sass_globbing/sass/partials/_2.scss ================================================ .two { value: 2; } ================================================ FILE: cli/test/fixtures/stylesheets/with_sass_globbing/sass/partials/_3.scss ================================================ .three { value: 3; } ================================================ FILE: cli/test/fixtures/stylesheets/with_sass_globbing/sass/screen.scss ================================================ @import "partials/*"; .something { awww: yeah; } ================================================ FILE: cli/test/helpers/command_line.rb ================================================ require 'timeout' module Compass::CommandLineHelper def compass(*arguments) options = arguments.last.is_a?(Hash) ? arguments.pop : {} options[:wait] = 0.25 if block_given? responder = Responder.new yield responder IO.popen("-", "r+") do |io| if io #parent process output = "" eof_at = nil while !eof_at || (Time.now - eof_at < options[:wait]) if io.eof? eof_at ||= Time.now sleep 0.1 else eof_at = nil timeout(1) do partial_output = io.readpartial(1024) # puts "))))#{partial_output}(((((" output << partial_output end prompt = output.split("\n").last.strip if response = responder.response_for(prompt) io.puts response io.flush end end end responder.assert_required_responses! @last_result = decolorize(output) else #child process execute *arguments end end else @last_error = capture_warning do @last_result = decolorize(capture_output do @last_exit_code = execute *arguments end) end end rescue Timeout::Error fail "Read from child process timed out" end def decolorize(str) str.gsub(/\e\[\d+m/,'') end class Responder Response = Struct.new(:prompt, :text, :required, :responded) def initialize @responses = [] end def respond_to(prompt, options = {}) @responses << Response.new(prompt, options[:with], options[:required]) end def response_for(prompt) response = @responses.detect do |r| case r.prompt when Regexp prompt =~ r.prompt when String r.prompt == prompt end end if response response.responded = true response.text end end def assert_required_responses! @responses.each do |response| if response.required && !response.responded raise "Prompt not encountered: \"#{response.prompt}\"" end end end end def assert_action_performed(action, path) actions_found = [] @last_result.split("\n").each do |line| line = line.split return if line.first == action.to_s && line.last == path actions_found << line.first if line.last == path end message = "Action #{action.inspect} was not performed on: #{path}." message += "The following actions were performed: #{actions_found.map{|a|a.inspect}.join(", ")}" if actions_found.any? # puts @last_result fail message end def within_tmp_directory(dir = "tmp") d = absolutize(dir) FileUtils.mkdir_p(d) Dir.chdir(d) do yield end ensure FileUtils.rm_rf(d) end def execute(*arguments) exit_code = Compass::Exec::SubCommandUI.new(arguments).run! # fail "Command Failed with exit code: #{exit_code}" unless exit_code == 0 exit_code end end ================================================ FILE: cli/test/helpers/diff.rb ================================================ require 'diff/lcs' require 'diff/lcs/hunk' module Compass module Diff #stole this from rspec who stole this from the gem def diff_as_string(data_old, data_new) data_old = data_old.split(/\n/).map! { |e| e.chomp } data_new = data_new.split(/\n/).map! { |e| e.chomp } output = "" diffs = ::Diff::LCS.diff(data_old, data_new) return output if diffs.empty? oldhunk = hunk = nil file_length_difference = 0 diffs.each do |piece| begin hunk = ::Diff::LCS::Hunk.new( data_old, data_new, piece, context_lines, file_length_difference ) file_length_difference = hunk.file_length_difference next unless oldhunk # Hunks may overlap, which is why we need to be careful when our # diff includes lines of context. Otherwise, we might print # redundant lines. if (context_lines > 0) and hunk.overlaps?(oldhunk) hunk.unshift(oldhunk) else output << oldhunk.diff(format) end ensure oldhunk = hunk output << "\n" end end #Handle the last remaining hunk output << oldhunk.diff(format) << "\n" end protected def format :unified end def context_lines 3 end end end ================================================ FILE: cli/test/helpers/io.rb ================================================ module Compass module IoHelper def capture_output real_stdout, $stdout = $stdout, StringIO.new yield $stdout.string ensure $stdout = real_stdout end def capture_warning real_stderr, $stderr = $stderr, StringIO.new yield $stderr.string ensure $stderr = real_stderr end def capture_pipe(io, options = {}) options[:wait] = 0.25 options[:timeout] = 1.0 output = "" eof_at = nil while !eof_at || (Time.now - eof_at < options[:wait]) if io.eof? eof_at ||= Time.now sleep 0.1 else eof_at = nil timeout(options[:timeout]) { output << io.readpartial(1024) } end end output end end end ================================================ FILE: cli/test/helpers/rails.rb ================================================ module Compass module RailsHelper def generate_rails_app_directories(name) Dir.mkdir name Dir.mkdir File.join(name, "config") Dir.mkdir File.join(name, "config", "initializers") Dir.mkdir File.join(name, "tmp") end # Generate a rails application without polluting our current set of requires # with the rails libraries. This will allow testing against multiple versions of rails # by manipulating the load path. def generate_rails_app(name, dir = nil) if pid = fork Process.wait(pid) if $?.exitstatus == 2 raise LoadError, "Couldn't load rails" elsif $?.exitstatus != 0 raise "Failed to generate rails application." end else begin require 'action_pack/version' if ActionPack::VERSION::MAJOR >= 3 require 'rails/generators' require 'rails/generators/rails/app/app_generator' require 'mocha' dir ||= File.join(File.expand_path('../../', __FILE__)) args = [File.join(dir, name), '-q', '-f', '--skip-bundle', '--skip-gemfile'] #stub this so you can generate more apps Rails::Generators::AppGenerator.any_instance.stubs(:valid_const?).returns(true) Rails::Generators::AppGenerator.start(args, {:destination_root => dir}) else require 'rails/version' require 'rails_generator' require 'rails_generator/scripts/generate' Rails::Generator::Base.use_application_sources! capture_output do Rails::Generator::Base.logger = Rails::Generator::SimpleLogger.new $stdout Rails::Generator::Scripts::Generate.new.run([name], :generator => 'app') end end rescue LoadError Kernel.exit!(2) rescue => e $stderr.puts e Kernel.exit!(1) end Kernel.exit!(0) end end end end ================================================ FILE: cli/test/helpers/test_case.rb ================================================ module Compass module TestCaseHelper def absolutize(path) if Compass::Util.blank?(path) File.expand_path('../../', __FILE__) elsif path[0] == ?/ File.join(File.expand_path('../', __FILE__), path) else File.join(File.expand_path('../../', __FILE__), path) end end # compile a Sass string in the context of a project in the current working directory. def compile_for_project(contents, options = {}) Compass.add_project_configuration options[:syntax] ||= :scss Sass::Engine.new(contents, Compass.configuration.to_sass_engine_options.merge(options)).render end def assert_correct(before, after) if before == after assert(true) else assert false, diff_as_string(before.inspect, after.inspect) end end module ClassMethods def let(method, &block) define_method method, &block end def it(name, &block) test(name, &block) end def test(name, &block) define_method "test_#{underscore(name)}".to_sym, &block end def setup(&block) define_method :setup do yield end end def after(&block) define_method :teardown do yield end end private def underscore(string) string.gsub(' ', '_') end end end end ================================================ FILE: cli/test/integrations/compass_test.rb ================================================ require 'test_helper' require 'fileutils' require 'compass' require 'compass/logger' require 'sass/plugin' class CompassTest < Test::Unit::TestCase def setup Compass.reset_configuration! end def teardown Dir.glob(absolutize("fixtures/stylesheets/*")).each do |dir| project_name = File.basename(dir) ::FileUtils.rm_rf tempfile_path(project_name) ::FileUtils.rm_rf File.join(project_path(project_name), ".sass-cache") end end def test_on_stylesheet_saved_callback saved = false path = nil config = nil before_compile = Proc.new do |config| config.on_stylesheet_saved {|filepath| path = filepath; saved = true } end within_project(:compass, before_compile) assert saved, "Stylesheet callback didn't get called" assert path.is_a?(String), "Path is not a string. Got: #{path.class.name}" end # no project with errors exists to test aginst - leep of FAITH! # *chriseppstein flogs himself* def test_on_stylesheet_error_callback error = false file = nil before_compile = Proc.new do |config| config.on_stylesheet_error {|filename, message| file = filename; error = true } end within_project(:error, before_compile) rescue nil assert error, "Project did not throw a compile error" assert file.is_a?(String), "Filename was not a string" end def test_empty_project # With no sass files, we should have no css files. within_project(:empty) do |proj| return unless proj.css_path && File.exists?(proj.css_path) Dir.new(proj.css_path).each do |f| fail "This file should not have been generated: #{f}" unless f == "." || f == ".." end end end def test_compass within_project('compass') do |proj| each_css_file(proj.css_path) do |css_file| assert_no_errors css_file, 'compass' end each_sass_file do |sass_file| assert_renders_correctly sass_file, :ignore_charset => true end end end def test_sourcemaps within_project('sourcemaps') do |proj| each_css_file(proj.css_path) do |css_file| assert_no_errors css_file, 'sourcemaps' end each_sass_file do |sass_file| assert_renders_correctly sass_file, :ignore_charset => true end end end def test_env_in_development within_project('envtest', lambda {|c| c.environment = :development }) do |proj| each_css_file(proj.css_path) do |css_file| assert_no_errors css_file, 'envtest' end each_sass_file do |sass_file| assert_renders_correctly sass_file, :ignore_charset => true, :environment => "development" end end end def test_env_in_production within_project('envtest', lambda {|c| c.environment = :production }) do |proj| each_css_file(proj.css_path) do |css_file| assert_no_errors css_file, 'envtest' end each_sass_file do |sass_file| assert_renders_correctly sass_file, :ignore_charset => true, :environment => "production" end end end def test_busted_font_urls within_project('busted_font_urls') do |proj| each_css_file(proj.css_path) do |css_file| assert_no_errors css_file, 'busted_font_urls' end each_sass_file do |sass_file| assert_renders_correctly sass_file end end end def test_busted_image_urls within_project('busted_image_urls') do |proj| each_css_file(proj.css_path) do |css_file| assert_no_errors css_file, 'busted_image_urls' end each_sass_file do |sass_file| assert_renders_correctly sass_file end end end def test_with_sass_globbing within_project('with_sass_globbing') do |proj| each_css_file(proj.css_path) do |css_file| assert_no_errors css_file, 'with_sass_globbing' end each_sass_file do |sass_file| assert_renders_correctly sass_file end end end def test_image_urls within_project('image_urls') do |proj| each_css_file(proj.css_path) do |css_file| assert_no_errors css_file, 'image_urls' end each_sass_file do |sass_file| assert_renders_correctly sass_file end end end def test_relative within_project('relative') do |proj| each_css_file(proj.css_path) do |css_file| assert_no_errors css_file, 'relative' end each_sass_file do |sass_file| assert_renders_correctly sass_file end end end private def assert_no_errors(css_file, project_name) file = css_file[(tempfile_path(project_name).size+1)..-1] msg = "Syntax Error found in #{file}. Results saved into #{save_path(project_name)}/#{file}" assert_equal 0, open(css_file).readlines.grep(/Sass::SyntaxError/).size, msg end def assert_renders_correctly(*arguments) options = arguments.last.is_a?(Hash) ? arguments.pop : {} for name in arguments @output_file = actual_result_file = "#{tempfile_path(@current_project)}/#{name}.css" expected_result_file = "#{result_path(@current_project)}/#{name}.css" @filename = expected_result_file.gsub('css', 'scss') actual_lines = File.read(actual_result_file) actual_lines.gsub!(/^@charset[^;]+;/,'') if options[:ignore_charset] actual_lines = actual_lines.split("\n").reject{|l| l=~/\A\Z/} expected_lines = ERB.new(File.read(expected_result_file)).result(binding) expected_lines.gsub!(/^@charset[^;]+;/,'') if options[:ignore_charset] expected_lines = expected_lines.split("\n").reject{|l| l=~/\A\Z/} expected_lines.zip(actual_lines).each_with_index do |pair, line| if pair.first == pair.last assert(true) else assert false, "Error in #{result_path(@current_project)}/#{name}.css:#{line + 1}\n"+diff_as_string(pair.first.inspect, pair.last.inspect) end end if expected_lines.size < actual_lines.size assert(false, "#{actual_lines.size - expected_lines.size} Trailing lines found in #{actual_result_file}: #{actual_lines[expected_lines.size..-1].join('\n')}") end end end def within_project(project_name, config_block = nil) @current_project = project_name Compass.add_configuration(configuration_file(project_name)) if File.exists?(configuration_file(project_name)) Compass.configuration.project_path = project_path(project_name) Compass.configuration.environment = :production Compass.configuration.sourcemap = false unless Compass.configuration.sourcemap_set? if config_block config_block.call(Compass.configuration) end if Compass.configuration.sass_path && File.exists?(Compass.configuration.sass_path) compiler = Compass.sass_compiler compiler.logger = Compass::NullLogger.new compiler.clean! compiler.compile! end yield Compass.configuration if block_given? rescue save_output(project_name) raise end def each_css_file(dir, &block) Dir.glob("#{dir}/**/*.css").each(&block) end def each_sass_file(sass_dir = nil) sass_dir ||= template_path(@current_project) Dir.glob("#{sass_dir}/**/*.s[ac]ss").each do |sass_file| next if File.basename(sass_file).start_with?("_") yield sass_file[(sass_dir.length+1)..-6] end end def save_output(dir) FileUtils.rm_rf(save_path(dir)) FileUtils.cp_r(tempfile_path(dir), save_path(dir)) if File.exists?(tempfile_path(dir)) end def project_path(project_name) absolutize("fixtures/stylesheets/#{project_name}") end def configuration_file(project_name) File.join(project_path(project_name), "config.rb") end def tempfile_path(project_name) File.join(project_path(project_name), "tmp") end def template_path(project_name) File.join(project_path(project_name), "sass") end def result_path(project_name) File.join(project_path(project_name), "css") end def save_path(project_name) File.join(project_path(project_name), "saved") end def filename @filename end def output_file @output_file end end ================================================ FILE: cli/test/integrations/sprites_test.rb ================================================ require 'test_helper' require 'fileutils' require 'compass' require 'compass/logger' require 'sass/plugin' class SpritesTest < Test::Unit::TestCase def setup Compass.reset_configuration! @images_project_path = File.expand_path(File.join(File.dirname(__FILE__), '..', 'fixtures', 'sprites', 'public')) @images_src_dir = 'images' @images_src_path = File.join(@images_project_path, @images_src_dir) @images_tmp_dir = 'images-tmp' @images_tmp_path = File.join(@images_project_path, @images_tmp_dir) @generated_images_tmp_dir = 'generated-images-tmp' @generated_images_tmp_path = File.join(@images_project_path, @generated_images_tmp_dir) ::FileUtils.cp_r @images_src_path, @images_tmp_path ::FileUtils.mkdir_p @generated_images_tmp_path file = StringIO.new(<<-CONFIG) project_path = "#{@images_project_path}" images_dir = "#{@images_tmp_dir}" CONFIG Compass.add_configuration(file, "sprite_config") Compass.configure_sass_plugin! end def teardown Compass.reset_configuration! ::FileUtils.rm_r @images_tmp_path ::FileUtils.rm_rf @generated_images_tmp_path end def map_location(file) map_files(file).first end def map_files(glob) Dir.glob(File.join(@images_tmp_path, glob)) end def image_size(file) Compass::Core::SassExtensions::Functions::ImageSize::ImageProperties.new(map_location(file)).size end def image_md5(file) md5 = Digest::MD5.new md5.update IO.read(map_location(file)) md5.hexdigest end def render(scss) options = Compass.sass_engine_options options[:line_comments] = false options[:style] = :expanded options[:syntax] = :scss options[:compass] ||= {} options[:compass][:logger] ||= Compass::NullLogger.new css = Sass::Engine.new(scss, options).render # reformat to fit result of heredoc: " #{css.gsub('@charset "UTF-8";', '').gsub(/\n/, "\n ").strip}\n" end def clean(string) string.gsub("\n", '').gsub(' ', '') end it "should generate sprite classes" do css = render <<-SCSS @import "squares/*.png"; @include all-squares-sprites; SCSS assert_correct <<-CSS, css .squares-sprite, .squares-ten-by-ten, .squares-twenty-by-twenty { background-image: url('/images-tmp/squares-sbbc18e2129.png'); background-repeat: no-repeat; } .squares-ten-by-ten { background-position: 0 0; } .squares-twenty-by-twenty { background-position: 0 -10px; } CSS assert_equal image_size('squares-s*.png'), [20, 30] assert_equal image_md5('squares-s*.png'), '7349a0f4e88ea80abddcf6ac2486abe3' end it "should output and serve sprite files using the generated images directory" do Compass.reset_configuration! file = StringIO.new(<<-CONFIG) images_path = #{@images_tmp_path.inspect} generated_images_path = #{@generated_images_tmp_path.inspect} http_generated_images_path = "/images/generated" CONFIG Compass.add_configuration(file, "sprite_config") Compass.configure_sass_plugin! css = render <<-SCSS @import "squares/*.png"; @include all-squares-sprites; SCSS assert_not_nil Dir.glob("#{@generated_images_tmp_path}/squares-s*.png").first assert_correct <<-CSS, css .squares-sprite, .squares-ten-by-ten, .squares-twenty-by-twenty { background-image: url('/images/generated/squares-sbbc18e2129.png'); background-repeat: no-repeat; } .squares-ten-by-ten { background-position: 0 0; } .squares-twenty-by-twenty { background-position: 0 -10px; } CSS end it "should generate sprite classes with dimensions" do css = render <<-SCSS $squares-sprite-dimensions: true; @import "squares/*.png"; @include all-squares-sprites; SCSS assert_correct <<-CSS, css .squares-sprite, .squares-ten-by-ten, .squares-twenty-by-twenty { background-image: url('/images-tmp/squares-sbbc18e2129.png'); background-repeat: no-repeat; } .squares-ten-by-ten { background-position: 0 0; height: 10px; width: 10px; } .squares-twenty-by-twenty { background-position: 0 -10px; height: 20px; width: 20px; } CSS assert_equal image_size('squares-s*.png'), [20, 30] end it "should provide sprite mixin" do css = render <<-SCSS @import "squares/*.png"; .cubicle { @include squares-sprite("ten-by-ten"); } .large-cube { @include squares-sprite("twenty-by-twenty", true); } SCSS assert_correct <<-CSS, css .squares-sprite, .cubicle, .large-cube { background-image: url('/images-tmp/squares-sbbc18e2129.png'); background-repeat: no-repeat; } .cubicle { background-position: 0 0; } .large-cube { background-position: 0 -10px; height: 20px; width: 20px; } CSS assert_equal image_size('squares-s*.png'), [20, 30] end # CUSTOMIZATIONS: it "should be possible to change the base class" do css = render <<-SCSS $squares-sprite-base-class: ".circles"; @import "squares/*.png"; SCSS assert_correct <<-CSS, css .circles { background-image: url('/images-tmp/squares-sbbc18e2129.png'); background-repeat: no-repeat; } CSS assert_equal image_size('squares-s*.png'), [20, 30] end it "should calculate the spacing between images but not before first image" do css = render <<-SCSS $squares-ten-by-ten-spacing: 33px; @import "squares/*.png"; @include all-squares-sprites; SCSS assert_correct <<-CSS, css .squares-sprite, .squares-ten-by-ten, .squares-twenty-by-twenty { background-image: url('/images-tmp/squares-s563a5e0855.png'); background-repeat: no-repeat; } .squares-ten-by-ten { background-position: 0 0; } .squares-twenty-by-twenty { background-position: 0 -43px; } CSS assert_equal image_size('squares-s*.png'), [20, 63] end it "should calculate the spacing between images" do css = render <<-SCSS $squares-twenty-by-twenty-spacing: 33px; @import "squares/*.png"; @include all-squares-sprites; SCSS assert_correct <<-CSS, css .squares-sprite, .squares-ten-by-ten, .squares-twenty-by-twenty { background-image: url('/images-tmp/squares-s4ea353fa6d.png'); background-repeat: no-repeat; } .squares-ten-by-ten { background-position: 0 0; } .squares-twenty-by-twenty { background-position: 0 -43px; } CSS assert_equal image_size('squares-s*.png'), [20, 63] end it "should calculate the maximum spacing between images" do css = render <<-SCSS $squares-ten-by-ten-spacing: 44px; $squares-twenty-by-twenty-spacing: 33px; @import "squares/*.png"; @include all-squares-sprites; SCSS assert_correct <<-CSS, css .squares-sprite, .squares-ten-by-ten, .squares-twenty-by-twenty { background-image: url('/images-tmp/squares-sf4771cb124.png'); background-repeat: no-repeat; } .squares-ten-by-ten { background-position: 0 0; } .squares-twenty-by-twenty { background-position: 0 -54px; } CSS assert_equal image_size('squares-s*.png'), [20, 74] end it "should calculate the maximum spacing between images in reversed order" do css = render <<-SCSS $squares-ten-by-ten-spacing: 33px; $squares-twenty-by-twenty-spacing: 44px; @import "squares/*.png"; @include all-squares-sprites; SCSS assert_correct <<-CSS, css .squares-sprite, .squares-ten-by-ten, .squares-twenty-by-twenty { background-image: url('/images-tmp/squares-sc82d6f3cf4.png'); background-repeat: no-repeat; } .squares-ten-by-ten { background-position: 0 0; } .squares-twenty-by-twenty { background-position: 0 -54px; } CSS assert_equal image_size('squares-s*.png'), [20, 74] end it "should calculate the default spacing between images" do css = render <<-SCSS $squares-spacing: 22px; @import "squares/*.png"; @include all-squares-sprites; SCSS assert_correct <<-CSS, css .squares-sprite, .squares-ten-by-ten, .squares-twenty-by-twenty { background-image: url('/images-tmp/squares-s2f4aa65dcf.png'); background-repeat: no-repeat; } .squares-ten-by-ten { background-position: 0 0; } .squares-twenty-by-twenty { background-position: 0 -32px; } CSS assert_equal image_size('squares-s*.png'), [20, 52] end it "should use position adjustments in functions" do css = render <<-SCSS $squares: sprite-map("squares/*.png", $position: 100%); .squares-sprite { background-image: $squares; background-repeat: no-repeat; } .adjusted-percentage { background-position: sprite-position($squares, ten-by-ten, 100%); } .adjusted-px-1 { background-position: sprite-position($squares, ten-by-ten, 4px); } .adjusted-px-2 { background-position: sprite-position($squares, twenty-by-twenty, -3px, 2px); } SCSS assert_correct <<-CSS, css .squares-sprite { background-image: url('/images-tmp/squares-sce5dc30797.png'); background-repeat: no-repeat; } .adjusted-percentage { background-position: 100% 0; } .adjusted-px-1 { background-position: -6px 0; } .adjusted-px-2 { background-position: -3px -8px; } CSS assert_equal image_size('squares-s*.png'), [20, 30] assert_equal image_md5('squares-s*.png'), '9cc7ce48cfaf304381c2d08adefd2fb6' end it "should use position adjustments in mixins" do css = render <<-SCSS $squares-position: 100%; @import "squares/*.png"; .adjusted-percentage { @include squares-sprite("ten-by-ten", $offset-x: 100%); } .adjusted-px-1 { @include squares-sprite("ten-by-ten", $offset-x: 4px); } .adjusted-px-2 { @include squares-sprite("twenty-by-twenty", $offset-x: -3px, $offset-y: 2px); } SCSS assert_correct <<-CSS, css .squares-sprite, .adjusted-percentage, .adjusted-px-1, .adjusted-px-2 { background-image: url('/images-tmp/squares-sce5dc30797.png'); background-repeat: no-repeat; } .adjusted-percentage { background-position: 100% 0; } .adjusted-px-1 { background-position: -6px 0; } .adjusted-px-2 { background-position: -3px -8px; } CSS assert_equal image_size('squares-s*.png'), [20, 30] assert_equal image_md5('squares-s*.png'), '9cc7ce48cfaf304381c2d08adefd2fb6' end it "should repeat the image" do css = render <<-SCSS $squares-repeat: repeat-x; @import "squares/*.png"; @include all-squares-sprites; SCSS assert_correct <<-CSS, css .squares-sprite, .squares-ten-by-ten, .squares-twenty-by-twenty { background-image: url('/images-tmp/squares-s65c43cd573.png'); background-repeat: no-repeat; } .squares-ten-by-ten { background-position: 0 0; } .squares-twenty-by-twenty { background-position: 0 -10px; } CSS assert_equal image_size('squares-s*.png'), [20, 30] assert_equal image_md5('squares-s*.png'), 'a77a2fd43f04d791722b706aa7c9f1c1' end it "should allow the position of a sprite to be specified in absolute pixels" do css = render <<-SCSS $squares-ten-by-ten-position: 10px; $squares-twenty-by-twenty-position: 10px; @import "squares/*.png"; @include all-squares-sprites; SCSS assert_correct <<-CSS, css .squares-sprite, .squares-ten-by-ten, .squares-twenty-by-twenty { background-image: url('/images-tmp/squares-sb9d9a8ca6a.png'); background-repeat: no-repeat; } .squares-ten-by-ten { background-position: -10px 0; } .squares-twenty-by-twenty { background-position: -10px -10px; } CSS assert_equal image_size('squares-s*.png'), [30, 30] assert_equal image_md5('squares-s*.png'), '9856ced9e8211b6b28ff782019a0d905' end it "should provide a nice errors for lemonade's old users" do assert_raise(Sass::SyntaxError) do render <<-SCSS .squares { background-image: sprite-url("squares/*.png"); background-repeat: no-repeat; } SCSS end assert_raise(Sass::SyntaxError) do css = render <<-SCSS @import "squares/*.png"; .squares { background-image: sprite-position("squares/twenty-by-twenty.png"); background-repeat: no-repeat; } SCSS end end it "should work even if @import is missing" do css = render <<-SCSS .squares { background-image: sprite(sprite-map("squares/*.png"), twenty-by-twenty); background-repeat: no-repeat; } SCSS assert_correct <<-CSS, css .squares { background-image: url('/images-tmp/squares-sd817b59156.png') 0 -10px; background-repeat: no-repeat; } CSS end it "should import sprites with numeric filenames via #738" do css = render <<-SCSS @import "numeric/*.png"; @include all-numeric-sprites; SCSS assert_correct <<-CSS, css .numeric-sprite, .numeric-200 { background-image: url('/images-tmp/numeric-saa92d65a89.png'); background-repeat: no-repeat; } .numeric-200 { background-position: 0 0; } CSS end it "should use percentage positions when use_percentages is true" do css = render <<-SCSS @import "squares/*.png"; $squares-use-percentages: true; .foo { @include squares-sprite-position("twenty-by-twenty"); } .bar { @include squares-sprite-position("ten-by-ten"); @include squares-sprite-dimensions("ten-by-ten"); } SCSS assert_correct <<-CSS, css .squares-sprite { background-image: url('/images-tmp/squares-sbbc18e2129.png'); background-repeat: no-repeat; } .foo { background-position: 0 100%; } .bar { background-position: 0 0; height: 10px; width: 10px; } CSS end it "should use correct percentages when use_percentages is with horizontal layout" do css = render <<-SCSS $squares-layout: horizontal; @import "squares/*.png"; $squares-use-percentages: true; .foo { @include squares-sprite-position("twenty-by-twenty"); } .bar { @include squares-sprite-position("ten-by-ten"); } SCSS assert_correct <<-CSS, css .squares-sprite { background-image: url('/images-tmp/squares-s4bd95c5c56.png'); background-repeat: no-repeat; } .foo { background-position: 100% 0; } .bar { background-position: 0 0; } CSS end it "should use correct percentages when use_percentages is true with smart layout" do css = render <<-SCSS $image_row-layout: smart; @import "image_row/*.png"; $image_row-use-percentages: true; .foo { @include image_row-sprite-position("medium"); } .bar { @include image_row-sprite-position("large_square"); } SCSS assert_correct <<-CSS, css .image_row-sprite { background-image: url('/images-tmp/image_row-sc5082a6b9f.png'); background-repeat: no-repeat; } .foo { background-position: 0 50%; } .bar { background-position: 33.33333% 100%; } CSS end it "should use correct percentages when use_percentages is true" do css = render <<-SCSS $image_row-use-percentages: true; $image_row-sort-by : '!width'; @import "image_row/*.png"; @include all-image_row-sprites; SCSS assert_correct <<-CSS, css .image_row-sprite, .image_row-large, .image_row-large_square, .image_row-medium, .image_row-small, .image_row-tall { background-image: url('/images-tmp/image_row-sdf383d45a3.png'); background-repeat: no-repeat; } .image_row-large { background-position: 0 0; } .image_row-large_square { background-position: 0 40%; } .image_row-medium { background-position: 0 16.66667%; } .image_row-small { background-position: 0 100%; } .image_row-tall { background-position: 0 80%; } CSS end it "should calculate corret sprite demsions when givin spacing via issue#253" do css = render <<-SCSS $squares-spacing: 10px; @import "squares/*.png"; .foo { @include sprite-background-position($squares-sprites, "twenty-by-twenty"); } .bar { @include sprite-background-position($squares-sprites, "ten-by-ten"); } SCSS assert_equal image_size('squares-s*.png'), [20, 40] assert_correct <<-CSS, css .squares-sprite { background-image: url('/images-tmp/squares-s555875d730.png'); background-repeat: no-repeat; } .foo { background-position: 0 -20px; } .bar { background-position: 0 0; } CSS end it "should render correct sprite with css selectors via issue#248" do css = render <<-SCSS @import "selectors/*.png"; @include all-selectors-sprites; SCSS assert_correct <<-CSS, css .selectors-sprite, .selectors-ten-by-ten { background-image: url('/images-tmp/selectors-s7e84acb3d2.png'); background-repeat: no-repeat; } .selectors-ten-by-ten { background-position: 0 0; } .selectors-ten-by-ten:hover, .selectors-ten-by-ten.ten-by-ten-hover { background-position: 0 -20px; } .selectors-ten-by-ten:target, .selectors-ten-by-ten.ten-by-ten-target { background-position: 0 -30px; } .selectors-ten-by-ten:active, .selectors-ten-by-ten.ten-by-ten-active { background-position: 0 -10px; } CSS end it "should honor offsets when rendering selectors via issue#449" do css = render <<-SCSS @import "selectors/*.png"; @include all-selectors-sprites($offset-x: 20px, $offset-y: 20px); SCSS assert_correct <<-CSS, css .selectors-sprite, .selectors-ten-by-ten { background-image: url('/images-tmp/selectors-s7e84acb3d2.png'); background-repeat: no-repeat; } .selectors-ten-by-ten { background-position: 20px 20px; } .selectors-ten-by-ten:hover, .selectors-ten-by-ten.ten-by-ten-hover { background-position: 20px 0; } .selectors-ten-by-ten:target, .selectors-ten-by-ten.ten-by-ten-target { background-position: 20px -10px; } .selectors-ten-by-ten:active, .selectors-ten-by-ten.ten-by-ten-active { background-position: 20px 10px; } CSS end it "should render correct sprite with css selectors via magic mixin" do css = render <<-SCSS @import "selectors/*.png"; a { @include selectors-sprite(ten-by-ten) } SCSS assert_correct <<-CSS, css .selectors-sprite, a { background-image: url('/images-tmp/selectors-s7e84acb3d2.png'); background-repeat: no-repeat; } a { background-position: 0 0; } a:hover, a.ten-by-ten-hover { background-position: 0 -20px; } a:target, a.ten-by-ten-target { background-position: 0 -30px; } a:active, a.ten-by-ten-active { background-position: 0 -10px; } CSS end it "should not render corret sprite with css selectors via magic mixin" do css = render <<-SCSS @import "selectors/*.png"; a { $disable-magic-sprite-selectors:true !global; @include selectors-sprite(ten-by-ten) } SCSS assert_correct <<-CSS, css .selectors-sprite, a { background-image: url('/images-tmp/selectors-s7e84acb3d2.png'); background-repeat: no-repeat; } a { background-position: 0 0; } CSS end it "should render corret sprite with css selectors via magic mixin with the correct offsets" do css = render <<-SCSS @import "selectors/*.png"; a { @include selectors-sprite(ten-by-ten, false, 5, -5) } SCSS assert_correct <<-CSS, css .selectors-sprite, a { background-image: url('/images-tmp/selectors-s7e84acb3d2.png'); background-repeat: no-repeat; } a { background-position: 5px -5px; } a:hover, a.ten-by-ten-hover { background-position: 5px -25px; } a:target, a.ten-by-ten-target { background-position: 5px -35px; } a:active, a.ten-by-ten-active { background-position: 5px -15px; } CSS end it "should not raise error on filenames that are invalid classnames if the selector generation is not used" do css = render <<-SCSS $prefix-sort-by : 'width'; @import "prefix/*.png"; a { @include prefix-sprite("20-by-20"); } SCSS assert_correct <<-CSS, css .prefix-sprite, a { background-image: url('/images-tmp/prefix-s949dea513d.png'); background-repeat: no-repeat; } a { background-position: 0 -10px; } CSS end it "should generate sprite with bad repeat-x dimensions" do css = render <<-SCSS $ko-starbg26x27-repeat: repeat-x; @import "ko/*.png"; @include all-ko-sprites; SCSS assert_correct <<-CSS, css .ko-sprite, .ko-default_background, .ko-starbg26x27 { background-image: url('/images-tmp/ko-sd46dfbab4f.png'); background-repeat: no-repeat; } .ko-default_background { background-position: 0 0; } .ko-starbg26x27 { background-position: 0 -128px; } CSS end it "should generate a sprite and remove the old file" do FileUtils.touch File.join(@images_tmp_path, "selectors-scc8834Fdd.png") assert_equal 1, map_files('selectors-s*.png').size css = render <<-SCSS @import "selectors/*.png"; a { $disable-magic-sprite-selectors:true !global; @include selectors-sprite(ten-by-ten) } SCSS assert_equal 1, map_files('selectors-s*.png').size, "File was not removed" end it "should generate a sprite and NOT remove the old file" do FileUtils.touch File.join(@images_tmp_path, "selectors-scc8834Ftest.png") assert_equal 1, map_files('selectors-s*.png').size css = render <<-SCSS $selectors-clean-up: false; @import "selectors/*.png"; a { $disable-magic-sprite-selectors:true !global; @include selectors-sprite(ten-by-ten) } SCSS assert_equal 2, map_files('selectors-s*.png').size, "File was removed" end it "should generate a sprite if the sprite is a bool" do css = render <<-SCSS @import "bool/*.png"; a { @include bool-sprite(false); } a { @include bool-sprite(true); } SCSS assert !css.empty? end it "should generate a sprite if the sprite is a colorname" do css = render <<-SCSS @import "colors/*.png"; a { @include colors-sprite(blue); } SCSS assert !css.empty? end it "should generate a sprite from nested folders" do css = render <<-SCSS @import "nested/**/*.png"; @include all-nested-sprites; SCSS assert_correct <<-CSS, css .nested-sprite, .nested-ten-by-ten { background-image: url('/images-tmp/nested-s7b93e0b6bf.png'); background-repeat: no-repeat; } .nested-ten-by-ten { background-position: 0 0; } CSS end it "should create horizontal sprite" do css = render <<-SCSS $squares-layout:horizontal; @import "squares/*.png"; .foo { @include sprite-background-position($squares-sprites, "twenty-by-twenty"); } .bar { @include sprite-background-position($squares-sprites, "ten-by-ten"); } SCSS assert_equal [30, 20], image_size('squares-s*.png') other_css = <<-CSS .squares-sprite { background-image: url('/images-tmp/squares-s4bd95c5c56.png'); background-repeat: no-repeat; } .foo { background-position: -10px 0; } .bar { background-position: 0 0; } CSS assert_correct clean(other_css), clean(css) end it "should allow use of demension functions" do css = render <<-SCSS @import "squares/*.png"; $h: squares-sprite-height(twenty-by-twenty); $w: squares-sprite-width(twenty-by-twenty); .div { height:$h + 1px; width:$w + 2px; } SCSS other_css = <<-CSS .squares-sprite { background-image: url('/images-tmp/squares-sbbc18e2129.png'); background-repeat: no-repeat; } .div { height:21px; width:22px; } CSS assert_correct clean(other_css), clean(css) end it "should replace text with images and dimensions using sprites" do css = render <<-SCSS @import "compass/utilities/sprites/sprite-img"; @import "colors/*.png"; .blue { @include sprite-replace-text($colors-sprites, blue); } .yellow { @include sprite-replace-text-with-dimensions($colors-sprites, yellow); } SCSS other_css = <<-CSS .colors-sprite { background-image:url('/images-tmp/colors-s58671cb5bb.png'); background-repeat: no-repeat; } .blue { text-indent:-119988px; overflow:hidden; text-align:left; text-transform: capitalize; background-position:0 0; background-image:url('/images-tmp/colors-s58671cb5bb.png'); background-repeat:no-repeat; } .yellow { text-indent:-119988px; overflow:hidden; text-align:left; text-transform: capitalize; background-position:0 -10px; height:10px; width:10px; background-image:url('/images-tmp/colors-s58671cb5bb.png'); background-repeat:no-repeat; } CSS assert_correct clean(other_css), clean(css) end it "should inline the sprite file" do Compass.reset_configuration! file = StringIO.new(<<-CONFIG) images_path = #{@images_tmp_path.inspect} generated_images_path = #{@generated_images_tmp_path.inspect} CONFIG Compass.add_configuration(file, "sprite_config") Compass.configure_sass_plugin! css = render <<-SCSS $colors-inline:true; @import "colors/*.png"; @include all-colors-sprites; SCSS other_css = <<-CSS .colors-sprite, .colors-blue, .colors-yellow { background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAUCAAAAACRhfOKAAAAHElEQVR42mM5wQADLP8JMRlIUIvE/IdgctLTNgCHDhEQVD4ceAAAAABJRU5ErkJggg=='); } .colors-blue { background-position:0 0; } .colors-yellow { background-position:0 -10px; } CSS assert_correct clean(other_css), clean(css) end it "should have a sprite_name function that returns the names of the sprites in a sass list" do css = render <<-SCSS @import "colors/*.png"; @each $color in sprite_names($colors-sprites) { .\#{$color} { width:0px; } } SCSS other_css = <<-CSS .colors-sprite { background-image: url('/images-tmp/colors-s58671cb5bb.png'); background-repeat: no-repeat; } .blue { width:0px; } .yellow { width:0px; } CSS assert_correct clean(other_css), clean(css) end it "should respect global spacing" do css = render <<-SCSS $colors-spacing:5px; @import "colors/*.png"; @include all-colors-sprites; SCSS other_css = <<-CSS .colors-sprite, .colors-blue, .colors-yellow { background-image: url('/images-tmp/colors-s747dec274e.png'); background-repeat: no-repeat; } .colors-blue { background-position:0 0; } .colors-yellow { background-position:0 -15px; } CSS assert_correct clean(other_css), clean(css) end it "should return width and height of the map" do css = render <<-SCSS @import "colors/*.png"; .height { height : sprite_height($colors-sprites); } .width { width : sprite_width($colors-sprites); } SCSS other_css = <<-CSS .colors-sprite { background-image: url('/images-tmp/colors-s58671cb5bb.png'); background-repeat: no-repeat; } .height { height : 20px; } .width { width : 10px; } CSS assert_correct clean(other_css), clean(css) end it "should return width and height of a sprite" do css = render <<-SCSS @import "colors/*.png"; .height { height : sprite_height($colors-sprites, blue); } .width { width : sprite_width($colors-sprites, blue); } SCSS other_css = <<-CSS .colors-sprite { background-image: url('/images-tmp/colors-s58671cb5bb.png'); background-repeat: no-repeat; } .height { height : 10px; } .width { width : 10px; } CSS assert_correct clean(other_css), clean(css) end it "should render correct sprite with focus selector" do css = render <<-SCSS @import "focus/*.png"; @include all-focus-sprites; SCSS assert_correct <<-CSS, css .focus-sprite, .focus-ten-by-ten { background-image: url('/images-tmp/focus-sb5d1467be1.png'); background-repeat: no-repeat; } .focus-ten-by-ten { background-position: 0 0; } .focus-ten-by-ten:hover, .focus-ten-by-ten.ten-by-ten-hover { background-position: 0 -30px; } .focus-ten-by-ten:target, .focus-ten-by-ten.ten-by-ten-target { background-position: 0 -40px; } .focus-ten-by-ten:active, .focus-ten-by-ten.ten-by-ten-active { background-position: 0 -10px; } .focus-ten-by-ten:focus, .focus-ten-by-ten.ten-by-ten-focus { background-position: 0 -20px; } CSS end end ================================================ FILE: cli/test/test_helper.rb ================================================ lib_dir = File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib')) $:.unshift(lib_dir) unless $:.include?(lib_dir) test_dir = File.dirname(__FILE__) $:.unshift(test_dir) unless $:.include?(test_dir) require 'compass' require 'test/unit' require 'true' class String def name to_s end end %w(command_line diff io rails test_case).each do |helper| require "helpers/#{helper}" end class Test::Unit::TestCase include Compass::Diff include Compass::TestCaseHelper include Compass::IoHelper extend Compass::TestCaseHelper::ClassMethods def fixture_path File.join(File.expand_path('../', __FILE__), 'fixtures') end end module SpriteHelper URI = "selectors/*.png" def init_sprite_helper @images_proj_path = File.join(File.expand_path('../', __FILE__), 'fixtures', 'sprites', 'public') @images_src_dir = 'images' @images_src_path = File.join(@images_proj_path, @images_src_dir) @images_tmp_dir = 'images-tmp' @images_tmp_path = File.join(@images_proj_path, @images_tmp_dir) end def sprite_map_test(options, uri = URI) importer = Compass::SpriteImporter.new path, name = Compass::SpriteImporter.path_and_name(uri) sprite_names = Compass::SpriteImporter.sprite_names(uri) sass_engine = Compass::SpriteImporter.sass_engine(uri, name, importer, options) map = Compass::SassExtensions::Sprites::SpriteMap.new(sprite_names.map{|n| uri.gsub('*', n)}, path, name, sass_engine, options) map.options = {:compass => {:logger => Compass::NullLogger.new}} map end def create_sprite_temp init_sprite_helper ::FileUtils.cp_r @images_src_path, @images_tmp_path end def clean_up_sprites init_sprite_helper ::FileUtils.rm_r @images_tmp_path rescue Errno::ENOENT #pass end end ================================================ FILE: cli/test/units/actions_test.rb ================================================ require 'test_helper' require 'compass' class ActionsTest < Test::Unit::TestCase class BaseActionExtender include Compass::Actions def options @@options ||= {} end def working_path "/tmp" end end # When log4r is included, it sometimes breaks the Actions test "test_quiet_option" do b = BaseActionExtender.new b.logger = "" b.options[:quiet] = true # logger shouldn't be called... if it is, this will error b.directory("/tmp/#{(rand * 1000000).to_i}") end end ================================================ FILE: cli/test/units/caniuse_test.rb ================================================ require 'test_helper' require 'compass' class CanIUseTest < Test::Unit::TestCase def caniuse Compass::Core::CanIUse.instance end DEFAULT_CAPABILITY_OPTIONS = [{:full_support => true}, {:partial_support => true}] def test_unknown_browsers assert_equal "unknown", Compass::Core::CanIUse::PUBLIC_BROWSER_NAMES["unknown"] assert_equal "unknown", Compass::Core::CanIUse::CAN_I_USE_NAMES["unknown"] end def test_browser_names assert_equal Compass::Core::CanIUse::PUBLIC_BROWSER_NAMES.values.sort, caniuse.browsers end def test_prefixes assert_equal %w(-moz -ms -o -webkit), caniuse.prefixes assert_equal %w(-moz -webkit), caniuse.prefixes(%w(chrome firefox safari)) end def test_prefix assert_equal "-webkit", caniuse.prefix("chrome") assert_equal "-webkit", caniuse.prefix("safari") assert_equal "-ms", caniuse.prefix("ie") assert_equal "-webkit", caniuse.prefix("opera") assert_equal "-o", caniuse.prefix("opera", "12.1") end def test_browsers_with_prefix assert_equal %w(android android-chrome blackberry chrome ios-safari opera opera-mobile safari), caniuse.browsers_with_prefix("-webkit").sort assert_equal %w(android-firefox firefox), caniuse.browsers_with_prefix("-moz").sort end def test_capabilities # This is meant to break if a capability goes away or arrives # So that we can think about what that means for compass assert_equal [ "background-img-opts", "border-image", "border-radius", "calc", "css-animation", "css-appearance", "css-backgroundblendmode", "css-boxshadow", "css-canvas", "css-counters", "css-featurequeries", "css-filters", "css-fixed", "css-gencontent", "css-gradients", "css-grid", "css-hyphens", "css-image-orientation", "css-masks", "css-mediaqueries", "css-mixblendmode", "css-opacity", "css-placeholder", "css-reflections", "css-regions", "css-repeating-gradients", "css-resize", "css-sel2", "css-sel3", "css-selection", "css-shapes", "css-sticky", "css-table", "css-textshadow", "css-transitions", "css-variables", "css3-boxsizing", "css3-colors", "css3-cursors", "css3-tabsize", "flexbox", "font-feature", "fontface", "getcomputedstyle", "inline-block", "intrinsic-width", "kerning-pairs-ligatures", "minmaxwh", "multibackgrounds", "multicolumn", "object-fit", "outline", "pointer-events", "rem", "style-scoped", "svg-css", "text-decoration", "text-overflow", "text-size-adjust", "text-stroke", "transforms2d", "transforms3d", "ttf", "user-select-none", "viewport-units", "word-break", "wordwrap"], caniuse.capabilities end def test_usage total = 0 caniuse.browsers.each do |browser| caniuse.versions(browser).each do |version| usage = caniuse.usage(browser, version) if usage.nil? puts "nil usage for #{browser} at version #{version}" next end total += usage end end # all browsers add up to about 94%. that's... unfortunate. assert total > 90 && total < 100 end def test_prefixed_usage assert 0 < caniuse.prefixed_usage("-webkit", "border-radius", DEFAULT_CAPABILITY_OPTIONS) assert_equal 0, caniuse.prefixed_usage("-webkit", "outline", DEFAULT_CAPABILITY_OPTIONS) assert_raises ArgumentError do caniuse.prefixed_usage("-webkit", "unknown", DEFAULT_CAPABILITY_OPTIONS) end end def test_requires_prefix assert_raises ArgumentError do caniuse.requires_prefix("chrome", "3", "border-radius", DEFAULT_CAPABILITY_OPTIONS) end assert_equal "-webkit", caniuse.requires_prefix("chrome", "4", "border-radius", DEFAULT_CAPABILITY_OPTIONS) assert_equal nil, caniuse.requires_prefix("chrome", "5", "border-radius", DEFAULT_CAPABILITY_OPTIONS) assert_equal nil, caniuse.requires_prefix("chrome", "30", "border-radius", DEFAULT_CAPABILITY_OPTIONS) assert_equal "-webkit", caniuse.requires_prefix("opera", "16", "css-filters", DEFAULT_CAPABILITY_OPTIONS) end def test_browser_ranges_only_prefixed mins = caniuse.browser_ranges("border-radius", "-webkit", false) expected = { "android"=>["2.1", "2.1"], "chrome"=>["4", "4"], "ios-safari"=>["3.2", "3.2"], "safari"=>["3.1", "4"] } assert_equal(expected, mins) end def test_ranges_are_empty_when_prefix_doesnt_exit mins = caniuse.browser_ranges("css-filters", "-o") expected = {} assert_equal(expected, mins) end def test_browser_ranges_including_unprefixed mins = caniuse.browser_ranges("border-radius", "-webkit") expected = { "android"=>["2.1", "4.4.3"], "chrome"=>["4", "39"], "ios-safari"=>["3.2", "8"], "safari"=>["3.1", "8"] } assert_equal(expected, mins) end def test_capability_matches assert caniuse.capability_matches( caniuse.browser_support("chrome", "10", "flexbox"), [{:full_support => true}, {:partial_support => true, :spec_versions => [1]}]) assert !caniuse.capability_matches( caniuse.browser_support("chrome", "10", "flexbox"), [{:full_support => true}, {:partial_support => true, :spec_versions => [3]}]) end def test_omitted_usage assert_equal 0, caniuse.omitted_usage("chrome", "4") assert_equal caniuse.usage("chrome", "4"), caniuse.omitted_usage("chrome", "5") assert_equal caniuse.usage("chrome", "4"), caniuse.omitted_usage("chrome", "4", "4") assert_equal caniuse.usage("chrome", "4") + caniuse.usage("chrome", "5"), caniuse.omitted_usage("chrome", "4", "5") end end ================================================ FILE: cli/test/units/command_line_test.rb ================================================ require 'test_helper' require 'fileutils' require 'compass' require 'compass/exec' require 'timeout' class CommandLineTest < Test::Unit::TestCase include Compass::TestCaseHelper include Compass::CommandLineHelper include Compass::IoHelper def teardown Compass.reset_configuration! end def test_print_version compass("-vq") assert_match(/\d+\.\d+\.(\d+|((alpha|beta|rc)\.\d+\.[0-9a-f]+))?/, @last_result) end def test_basic_install within_tmp_directory do compass(*%w(create --boring basic)) assert File.exists?("basic/sass/screen.scss") assert_action_performed :directory, "basic/" assert_action_performed :create, "basic/sass/screen.scss" end end Compass::Frameworks::ALL.each do |framework| next if framework.name == "true" next if framework.name == "testing" next if framework.name =~ /^_/ define_method "test_#{framework.name}_installation" do within_tmp_directory do compass(*%W(create --boring --using #{framework.name} #{framework.name}_project)) assert File.exists?("#{framework.name}_project/sass/screen.scss"), "sass/screen.scss is missing. Found: #{Dir.glob("#{framework.name}_project/**/*").join(", ")}" assert File.exists?("#{framework.name}_project/stylesheets/screen.css") assert_action_performed :directory, "#{framework.name}_project/" assert_action_performed :create, "#{framework.name}_project/sass/screen.scss" assert_action_performed :write, "#{framework.name}_project/stylesheets/screen.css" end end end def test_basic_update within_tmp_directory do compass "create", "--boring", "basic" Dir.chdir "basic" do # basic update with timestamp caching compass "compile", "--boring" # assert_action_performed :unchanged, "sass/screen.scss" # basic update with force option set compass "compile", "--force", "--boring" assert_action_performed :write, "stylesheets/screen.css" end end end end ================================================ FILE: cli/test/units/compass_util_test.rb ================================================ require 'test_helper' class CompassUtilTest < Test::Unit::TestCase def test_warn $stderr, old_err = StringIO.new, $stderr Compass::Util.compass_warn("this is a warning") assert_match(/this is a warning/, $stderr.string) ensure $stderr = old_err end end ================================================ FILE: cli/test/units/compiler_test.rb ================================================ require 'test_helper' require 'fileutils' class CompilerTest < Test::Unit::TestCase it "should strip css from file name and reappend" do config = Compass::Configuration::Data.new("test", :project_path => Dir.pwd, :sass_dir => "foo", :css_dir => "bar") config.extend(Compass::Configuration::Defaults) compiler = Compass.sass_compiler({}, config) assert_equal 'screen', compiler.stylesheet_name(File.join(Dir.pwd, 'foo', 'screen.css.scss')) end end ================================================ FILE: cli/test/units/configuration_test.rb ================================================ require 'test_helper' require 'compass' require 'stringio' class ConfigurationTest < Test::Unit::TestCase setup do Compass.reset_configuration! @original_wd = Dir.pwd FileUtils.rm_rf "test_tmp" FileUtils.mkdir_p "test_tmp/images" FileUtils.mkdir_p "test_tmp/fonts" Dir.chdir "test_tmp" end after do Compass.reset_configuration! Dir.chdir @original_wd FileUtils.rm_rf "test_tmp" end def test_parse_and_serialize contents = StringIO.new(<<-CONFIG) require 'compass' require 'compass/import-once/activate' # Require any additional compass plugins here. project_type = :stand_alone http_path = "/" css_dir = "css" sass_dir = "sass" images_dir = "img" javascripts_dir = "js" output_style = :nested # To enable relative paths to assets via compass helper functions. Uncomment: # relative_assets = true # To disable debugging comments that display the original location of your selectors. Uncomment: # line_comments = false # If you prefer the indented syntax, you might want to regenerate this # project again passing --syntax sass, or you can uncomment this: # preferred_syntax = :sass # and then run: # sass-convert -R --from scss --to sass sass scss && rm -rf sass && mv scss sass CONFIG Compass.add_configuration(contents, "test_parse") assert_equal 'sass', Compass.configuration.sass_dir assert_equal 'css', Compass.configuration.css_dir assert_equal 'img', Compass.configuration.images_dir assert_equal 'js', Compass.configuration.javascripts_dir expected_lines = contents.string.split("\n").map{|l|l.strip} actual_lines = Compass.configuration.serialize.split("\n").map{|l|l.strip} assert_correct expected_lines, actual_lines end def test_custom_watch contents = StringIO.new(<<-CONFIG) watch 'img/**/*' do puts 'foobar' end CONFIG Compass.add_configuration(contents, 'test_watch_config') watch = Compass.configuration.watches.first assert_equal 'img/**/*', watch.glob assert watch.is_a?(Compass::Configuration::Watch) end def test_serialization_warns_with_asset_host_set contents = StringIO.new(<<-CONFIG) asset_host do |path| "http://example.com" end CONFIG Compass.add_configuration(contents, "test_serialization_warns_with_asset_host_set") warning = capture_warning do Compass.configuration.serialize end assert_equal "WARNING: asset_host is code and cannot be written to a file. You'll need to copy it yourself.\n", warning end class TestData < Compass::Configuration::FileData def initialize super(:test) end inherited_array :stuff, :clobbers => true inherited_array :accumulated end def test_accumulated_array_does_not_clobber data1 = TestData.new data1.accumulated = [:a] data2 = TestData.new data2.accumulated = [:b] data2.inherit_from!(data1) assert_equal [:b, :a], data2.accumulated.to_a end def test_inherited_array_can_clobber data1 = TestData.new data1.stuff = [:a] data2 = TestData.new data2.stuff = [:b] data2.inherit_from!(data1) assert_equal [:b], data2.stuff.to_a end def test_inherited_array_can_append data1 = TestData.new data1.stuff = [:a] data2 = TestData.new data2.stuff << :b data2.inherit_from!(data1) assert_equal [:b, :a], data2.stuff.to_a end def test_inherited_array_can_append_2 data1 = TestData.new data1.stuff = [:a] data2 = TestData.new data2.stuff << :b data2.inherit_from!(data1) data3 = TestData.new data3.stuff << :c data3.inherit_from!(data2) assert_equal [:c, :b, :a], data3.stuff.to_a end def test_inherited_array_can_remove data1 = TestData.new data1.stuff = [:a] data2 = TestData.new data2.stuff >> :a data2.inherit_from!(data1) assert_equal [], data2.stuff.to_a end def test_inherited_array_combined_augmentations data1 = TestData.new data1.stuff = [:a] data2 = TestData.new data2.stuff >> :a data2.stuff << :b data2.inherit_from!(data1) assert_equal [:b], data2.stuff.to_a end def test_inherited_array_long_methods data1 = TestData.new data1.stuff = [:a] data2 = TestData.new data2.remove_from_stuff(:a) data2.add_to_stuff(:b) data2.inherit_from!(data1) assert_equal [:b], data2.stuff.to_a end def test_inherited_array_augmentations_can_be_clobbered data1 = TestData.new data1.stuff = [:a] data2 = TestData.new data2.stuff >> :a data2.stuff << :b data2.stuff = [:c] data2.inherit_from!(data1) assert_equal [:c], data2.stuff.to_a end def test_inherited_array_augmentations_after_clobbering data1 = TestData.new data1.stuff = [:a] data2 = TestData.new data2.stuff >> :a data2.stuff << :b data2.stuff = [:c, :d] data2.stuff << :e data2.stuff >> :c data2.inherit_from!(data1) assert_equal [:d, :e], data2.stuff.to_a end def test_serialization_warns_with_asset_cache_buster_set contents = StringIO.new(<<-CONFIG) asset_cache_buster do |path| "http://example.com" end CONFIG Compass.add_configuration(contents, "test_serialization_warns_with_asset_cache_buster_set") assert_kind_of Proc, Compass.configuration.asset_cache_buster_without_default assert_equal "http://example.com", Compass.configuration.asset_cache_buster_without_default.call("whatever") warning = capture_warning do Compass.configuration.serialize end assert_equal "WARNING: asset_cache_buster is code and cannot be written to a file. You'll need to copy it yourself.\n", warning end def test_cache_buster_file_not_passed_when_the_file_does_not_exist config = Compass::Configuration::Data.new("test_cache_buster_file_not_passed_when_the_file_does_not_exist") the_file = nil was_called = nil config.asset_cache_buster do |path, file| was_called = true the_file = file "busted=true" end Compass.add_configuration(config) sass = Sass::Engine.new(<<-SCSS, Compass.configuration.to_sass_engine_options.merge(:syntax => :scss)) .foo { background: image-url("asdf.gif") } SCSS sass.render assert was_called assert_nil the_file end def test_cache_buster_file_is_closed config = Compass::Configuration::Data.new("test_cache_buster_file_is_closed") the_file = nil was_called = nil FileUtils.touch "images/asdf.gif" config.asset_cache_buster do |path, file| was_called = true the_file = file "busted=true" end Compass.add_configuration(config) sass = Sass::Engine.new(<<-SCSS, Compass.configuration.to_sass_engine_options.merge(:syntax => :scss)) .foo { background: image-url("asdf.gif") } SCSS sass.render assert was_called assert_kind_of File, the_file assert the_file.closed? end def test_cache_buster_handles_id_refs_for_images config = Compass::Configuration::Data.new("test_cache_buster_file_is_closed") the_file = nil was_called = nil FileUtils.touch "images/asdf.svg" config.asset_cache_buster do |path, file| was_called = true the_file = file "busted=true" end Compass.add_configuration(config) sass = Sass::Engine.new(<<-SCSS, Compass.configuration.to_sass_engine_options.merge(:syntax => :scss)) .foo { background: image-url("asdf.svg#image-1") } SCSS result = sass.render assert was_called assert_kind_of File, the_file assert the_file.closed? assert_equal < :scss)) .foo { background: image-url("asdf.svg#image-1") } SCSS result = sass.render assert_equal < :scss)) .foo { background: font-url("asdf.ttf#iefix") } SCSS result = sass.render assert was_called assert_kind_of File, the_file assert the_file.closed? assert_equal <> :c assert_equal <> :c CONFIG end def test_inherited_arrays_clobbering_with_augmentations_serialize inherited = TestData.new inherited.stuff << :a d = TestData.new d.stuff << :b d.stuff = [:c, :d] d.stuff << :e assert_equal < 'bar'} CONFIG Compass.add_configuration(contents, "test_sass_options") assert_equal 'bar', Compass.configuration.to_sass_engine_options[:foo] assert_equal 'bar', Compass.configuration.to_sass_plugin_options[:foo] expected_serialization = <\"bar\"} # To disable debugging comments that display the original location of your selectors. Uncomment: # line_comments = false # If you prefer the indented syntax, you might want to regenerate this # project again passing --syntax sass, or you can uncomment this: # preferred_syntax = :sass # and then run: # sass-convert -R --from scss --to sass sass scss && rm -rf sass && mv scss sass EXPECTED assert_correct(expected_serialization, Compass.configuration.serialize) end def test_sprite_load_path_clobbers contents = StringIO.new(<<-CONFIG) sprite_load_path = ["/Users/chris/Projects/my_compass_project/images/sprites"] CONFIG Compass.add_configuration(contents, "test_sass_options") assert_equal ["/Users/chris/Projects/my_compass_project/images/sprites"], Compass.configuration.sprite_load_path.to_a expected_serialization = < :scss).render # raises an error if we generated invalid css end end end end ================================================ FILE: cli/test/units/sass_extensions_test.rb ================================================ require 'test_helper' class SassExtensionsTest < Test::Unit::TestCase def test_simple assert_equal "a b", evaluate(%Q{nest("a", "b")}) end def test_left_side_expansion assert_equal "a c, b c", evaluate(%Q{nest("a, b", "c")}) end def test_right_side_expansion assert_equal "a b, a c", evaluate(%Q{nest("a", "b, c")}) end def test_both_sides_expansion assert_equal "a c, a d, b c, b d", evaluate(%Q{nest("a, b", "c, d")}) end def test_three_selectors_expansion assert_equal "a b, a c, a d", evaluate(%Q{nest("a", "b, c, d")}) end def test_third_argument_expansion assert_equal "a b e, a b f, a c e, a c f, a d e, a d f", evaluate(%Q{nest("a", "b, c, d", "e, f")}) end def test_enumerate assert_equal ".grid-1, .grid-2, .grid-3", evaluate(%Q{enumerate(".grid", 1, 3, "-")}) end def test_append_selector assert_equal "div.bar", evaluate(%Q{append_selector("div", ".bar")}) assert_equal ".foo1.bar1, .foo1.bar2, .foo2.bar1, .foo2.bar2", evaluate(%Q{append_selector(".foo1, .foo2", ".bar1, .bar2")}) end def test_headers assert_equal "h1, h2, h3, h4, h5, h6", evaluate("headers()") assert_equal "h1, h2, h3, h4, h5, h6", evaluate("headers(all)") assert_equal "h1, h2, h3, h4", evaluate("headers(4)") assert_equal "h2, h3", evaluate("headers(2,3)") assert_equal "h4, h5, h6", evaluate("headers(4,6)") end def test_scale_lightness assert_equal "75%", evaluate("lightness(scale-lightness(hsl(50deg, 50%, 50%), 50%))") assert_equal "25%", evaluate("lightness(scale-lightness(hsl(50deg, 50%, 50%), -50%))") end def test_adjust_lightness assert_equal "75%", evaluate("lightness(adjust-lightness(hsl(50deg, 50%, 50%), 25%))") assert_equal "25%", evaluate("lightness(adjust-lightness(hsl(50deg, 50%, 50%), -25%))") assert_equal "100%", evaluate("lightness(adjust-lightness(hsl(50deg, 50%, 50%), 500%))") assert_equal "0%", evaluate("lightness(adjust-lightness(hsl(50deg, 50%, 50%), -500%))") end def test_scale_saturation assert_equal "75%", evaluate("saturation(scale-saturation(hsl(50deg, 50%, 50%), 50%))") assert_equal "25%", evaluate("saturation(scale-saturation(hsl(50deg, 50%, 50%), -50%))") end def test_adjust_saturation assert_equal "75%", evaluate("saturation(adjust-saturation(hsl(50deg, 50%, 50%), 25%))") assert_equal "25%", evaluate("saturation(adjust-saturation(hsl(50deg, 50%, 50%), -25%))") end def test_shade assert_equal evaluate("mix(black, #ff0, 25%)"), evaluate("shade(#ff0, 25%)") assert_equal evaluate("mix(black, #ff0, 0%)"), evaluate("shade(#ff0, 0%)") end def test_tint assert_equal evaluate("mix(white, #ff0, 75%)"), evaluate("tint(#ff0, 75%)") assert_equal evaluate("mix(white, #ff0, 100%)"), evaluate("tint(#ff0, 100%)") end def test_if_function assert_equal "no", evaluate("if(false, yes, no)") assert_equal "yes", evaluate("if(true, yes, no)") end def test_math_functions assert_equal "0.84147", evaluate("sin(1)") assert_equal "0.84147px", evaluate("sin(1px)") assert_equal "0.5236", evaluate("asin(0.5)") assert_equal "0.5236", evaluate("asin(100px/200px)") assert_equal "0.0", evaluate("sin(pi())") assert_equal "1", evaluate("sin(pi() / 2)") assert_equal "0.0", evaluate("sin(180deg)") assert_equal "-1", evaluate("sin(3* pi() / 2)") assert_equal "-1", evaluate("cos(pi())") assert_equal "1", evaluate("cos(360deg)") assert_equal "1.0472", evaluate("acos(0.5)") assert_equal "1.0472", evaluate("acos(100px/200px)") assert_equal "-0.17605", evaluate("sin(270)") assert_equal "1", evaluate("cos(2*pi())") assert_equal "0.0", evaluate("cos(pi() / 2)") assert_equal "0.0", evaluate("cos(3* pi() / 2)") assert_equal "0.0", evaluate("tan(pi())") assert_equal "0.46365", evaluate("atan(0.5)") assert_equal "0.0", evaluate("tan(360deg)") assert_equal "0.95892", evaluate("sin(360)") assert evaluate("tan(pi()/2 - 0.0001)").to_f > 1000, evaluate("tan(pi()/2 - 0.0001)") assert evaluate("tan(pi()/2 + 0.0001)").to_f < -1000, evaluate("tan(pi()/2 - 0.0001)") assert_equal "0.69315px", evaluate("logarithm(2px)") assert_equal "0", evaluate("logarithm(1)") assert_equal "1", evaluate("logarithm(e())") assert_equal "1", evaluate("logarithm($number: e())") assert_equal "1", evaluate("logarithm(10, $base: 10)") assert_equal "5px", evaluate("sqrt(25px)") assert_equal "5px", evaluate("sqrt($number: 25px)") assert_equal "5px", evaluate("square-root(25px)") assert_equal "5px", evaluate("square-root($number: 25px)") assert_equal "25px", evaluate("pow(5px, 2)") assert_equal "25px", evaluate("pow($number: 5px, $exponent: 2)") assert_equal "79.43236px", evaluate("pow(5px, e())") assert((0..2).include?(evaluate("random(2)").to_i)) random_warning = capture_warning do assert((4..16).include?(evaluate("random(4, 16)").to_i)) end assert_equal < e raise e unless e.message =~ /isn't a valid CSS value/ result.inspect end end end ================================================ FILE: cli/test/units/sass_extenstions/gradients_test.rb ================================================ class GradientTestClass extend Compass::Core::SassExtensions::Functions::Constants extend Compass::Core::SassExtensions::Functions::GradientSupport::Functions def self.options {} end end require 'test_helper' require 'compass' class GradientsTest < Test::Unit::TestCase include Sass::Script::Value::Helpers def klass GradientTestClass end test "should return correct angle" do assert_equal number(330, 'deg'), klass.convert_angle_from_offical(number(120, 'deg')) end test "Should convert old to new" do [:top => ['to', 'bottom'], :bottom => ['to', 'top'], :left => ['to', 'right'], :right => ['to', 'left']].each do |test_value| assert_equal list(identifier(test_value.keys.first.to_s), :space), klass.convert_angle_from_offical( list(identifier(test_value.values[0].first), identifier(test_value.values[0].last), :space)) end end end ================================================ FILE: cli/test/units/sprites/engine_test.rb ================================================ require 'test_helper' class EngineTest < Test::Unit::TestCase include SpriteHelper def setup create_sprite_temp sprite_filename = 'squares/ten-by-ten.png' @images = [ Compass::SassExtensions::Sprites::Image.new(nil, File.join(sprite_filename), {}) ] @engine = Compass::SassExtensions::Sprites::Engine.new(100, 100, @images) end def taredown clean_up_sprites end test "should have width of 100" do assert_equal 100, @engine.width end test "should have height of 100" do assert_equal 100, @engine.height end test "should have correct images" do assert_equal @images, @engine.images end test "raises Compass::Error when calling save" do begin @engine.save('foo') assert false, '#save did not raise an exception' rescue Compass::Error assert true end end test "raises Compass::Error when calling construct_sprite" do begin @engine.construct_sprite assert false, '#construct_sprite did not raise an exception' rescue Compass::Error assert true end end end ================================================ FILE: cli/test/units/sprites/image_row_test.rb ================================================ require 'test_helper' class ImageRowTest < Test::Unit::TestCase include SpriteHelper def setup clean_up_sprites create_sprite_temp file = StringIO.new("images_path = #{@images_src_path.inspect}\n") Compass.add_configuration(file, "sprite_config") @filenames = %w(large.png large_square.png medium.png tall.png small.png) @image_files = Dir["#{@images_src_path}/image_row/*.png"].sort @images = @image_files.map do |img| img.gsub!("#{@images_src_path}/", '') Compass::SassExtensions::Sprites::Image.new(nil, img, {}) end image_row(1000) end def teardown clean_up_sprites end def image_row(max) @image_row = Compass::SassExtensions::Sprites::ImageRow.new(max) end def populate_row @images.each do |image| assert @image_row.add(image) end end it "should return false if image will not fit in row" do image_row(100) img = Compass::SassExtensions::Sprites::Image.new(nil, File.join('image_row', 'large.png'), {}) assert !@image_row.add(img) end it "should have 5 images" do populate_row assert_equal 5, @image_row.images.size end it "should return max image width" do populate_row assert_equal 400, @image_row.width end it "should return max image height" do populate_row assert_equal 40, @image_row.height end it "should have an efficiency rating" do populate_row assert_equal 1 - (580.0 / 1000.0), @image_row.efficiency end end ================================================ FILE: cli/test/units/sprites/image_test.rb ================================================ require 'test_helper' require 'mocha' require 'ostruct' class SpritesImageTest < Test::Unit::TestCase include SpriteHelper def setup create_sprite_temp end def teardown clean_up_sprites end SPRITE_FILENAME = 'selectors/ten-by-ten.png' def sprite_path File.join(@images_tmp_path, SPRITE_FILENAME) end def sprite_name File.basename(SPRITE_FILENAME, '.png') end def digest Digest::MD5.file(sprite_path).hexdigest end def test_map(options ={}) options = {'cleanup' => Sass::Script::Bool.new(true), 'layout' => Sass::Script::String.new('vertical')}.merge(options) map = sprite_map_test(options) end def test_image(options ={}) test_map(options).images.first end test 'initialize' do image = test_image assert_equal sprite_name, image.name assert_equal sprite_path, image.file assert_equal SPRITE_FILENAME, image.relative_file assert_equal 10, image.width assert_equal 10, image.height assert_equal digest, image.digest assert_equal 0, image.top assert_equal 0, image.left end test 'hover' do assert_equal 'ten-by-ten_hover', test_image.hover.name end test 'hover should find image by _ or - in file name' do map = test_map(:seperator => '-') map.images.each_index do |i| if map.images[i].name == 'ten-by-ten_hover' map.images[i].stubs(:name).returns('ten-by-ten-hover') end end test_image = map.images.first assert_equal 'ten-by-ten-hover', test_image.hover.name end test 'no parent' do assert_nil test_image.parent end test 'image type is "global" should raise exception' do assert_raise ::Compass::SpriteException do image = test_image "selectors_ten_by_ten_repeat" => Sass::Script::String.new('global') image.repeat end end test 'image type is "no-repeat"' do img = test_image assert_equal 'no-repeat', img.repeat assert img.no_repeat? end test 'image repeat-x' do img = test_image "selectors_ten_by_ten_repeat" => Sass::Script::String.new('repeat-x') assert img.repeat_x? end test 'image repeat-y' do img = test_image "selectors_ten_by_ten_repeat" => Sass::Script::String.new('repeat-y') assert img.repeat_y? end test 'image position' do image = test_image "selectors_ten_by_ten_position" => Sass::Script::Number.new(100, ["px"]) assert_equal 100, image.position.value end test 'image spacing' do @spacing = 10 image = test_image "spacing" => Sass::Script::Number.new(100, ["px"]) assert_equal 100, image.spacing end test 'offset' do image = test_image "selectors_ten_by_ten_position" => Sass::Script::Number.new(100, ["px"]) assert_equal 100, image.offset end test 'neither, uses 0' do img = test_image img.position.stubs(:unitless?).returns(false) assert_equal 0, img.offset end end ================================================ FILE: cli/test/units/sprites/images_test.rb ================================================ require 'test_helper' require 'compass/sass_extensions/sprites/images' class ImagesTest < Test::Unit::TestCase def setup @images = Compass::SassExtensions::Sprites::Images.new @images << OpenStruct.new(:foo => 1, :name => 'bob', :size => 1200, :width => 10) @images << OpenStruct.new(:foo => 2, :name => 'bob', :size => 300, :width => 100) @images << OpenStruct.new(:foo => 3, :name => 'aob', :size => 120, :width => 50) @images << OpenStruct.new(:foo => 4, :name => 'zbob', :size => 600, :width => 55) end test "sort by size" do @images.sort_by! :size assert_equal [3, 2, 4, 1], @images.map(&:foo) end test "sort by !size" do @images.sort_by! '!size' assert_equal [3, 2, 4, 1].reverse, @images.map(&:foo) end test "sort by name" do @images.sort_by! :name assert_equal [3, 2, 1, 4], @images.map(&:foo) end test "sort by !name" do @images.sort_by! '!name' assert_equal [3, 2, 1, 4].reverse, @images.map(&:foo) end test "sort by width" do @images.sort_by! :width assert_equal [1, 3, 4, 2], @images.map(&:foo) end test "sort by !width" do @images.sort_by! '!width' assert_equal [1, 3, 4, 2].reverse, @images.map(&:foo) end end ================================================ FILE: cli/test/units/sprites/importer_test.rb ================================================ require 'test_helper' class ImporterTest < Test::Unit::TestCase include SpriteHelper def setup create_sprite_temp file = StringIO.new("images_path = #{@images_src_path.inspect}\n") Compass.add_configuration(file, "sprite_config") @importer = Compass::SpriteImporter.new end def teardown Compass.reset_configuration! end def options {:foo => 'bar'} end test "should use search path to find sprites" do Compass.reset_configuration! uri = 'foo/*.png' other_folder = File.join(@images_tmp_path, '../other-temp') FileUtils.mkdir_p other_folder FileUtils.mkdir_p File.join(other_folder, 'foo') %w(my bar).each do |file| FileUtils.touch(File.join(other_folder, "foo/#{file}.png")) end config = Compass::Configuration::Data.new('config') config.images_path = @images_tmp_path config.sprite_load_path = [@images_tmp_path, other_folder] Compass.add_configuration(config, "sprite_config") importer = Compass::SpriteImporter.new assert_equal 2, Compass.configuration.sprite_load_path.compact.size assert Compass.configuration.sprite_load_path.include?(other_folder) assert_equal ["bar", "my"], Compass::SpriteImporter.sprite_names(uri) FileUtils.rm_rf other_folder end test "name should return the sprite name" do assert_equal 'selectors', Compass::SpriteImporter.sprite_name(URI) end test "path should return the sprite path" do assert_equal 'selectors', Compass::SpriteImporter.path(URI) end test "should return all the sprite names" do assert_equal ["ten-by-ten", "ten-by-ten_active", "ten-by-ten_hover", "ten-by-ten_target"], Compass::SpriteImporter.sprite_names(URI) end test "should have correct mtime" do thirtydays = Time.now.to_i + (60*60*24*30) file = Dir[File.join(@images_src_path, URI)].sort.first File.utime(thirtydays, thirtydays, file) assert_equal thirtydays, File.mtime(file).to_i assert_equal thirtydays, @importer.mtime(URI, {}).to_i end test "should return sass engine on find" do assert @importer.find(URI, {}).is_a?(Sass::Engine) end test "sass options should contain options" do opts = Compass::SpriteImporter.sass_options('foo', @importer, options) assert_equal 'bar', opts[:foo] end test "verify that the sass_engine passes the correct filename" do importer = Compass::SpriteImporter.new engine = Compass::SpriteImporter.sass_engine(URI, 'foo', importer, options) assert_equal engine.options[:filename], URI end test "should fail given bad sprite extensions" do @images_src_path = File.join(File.dirname(__FILE__), '..', '..', 'fixtures', 'sprites', 'public', 'images') file = StringIO.new("images_path = #{@images_src_path.inspect}\n") Compass.add_configuration(file, "sprite_config") importer = Compass::SpriteImporter.new uri = "bad_extensions/*.jpg" begin Compass::SpriteImporter.sass_engine(uri, Compass::SpriteImporter.sprite_name(uri), importer, {}) assert false, "An invalid sprite file made it past validation." rescue Compass::Error => e assert e.message.include?("invalid sprite path") end end end ================================================ FILE: cli/test/units/sprites/layout_test.rb ================================================ require 'test_helper' class LayoutTest < Test::Unit::TestCase include SpriteHelper def setup Hash.send(:include, Compass::SassExtensions::Functions::Sprites::VariableReader) clean_up_sprites create_sprite_temp file = StringIO.new("images_path = #{@images_tmp_path.inspect}\n") Compass.add_configuration(file, "sprite_config") Compass.configure_sass_plugin! @options = {'cleanup' => Sass::Script::Bool.new(true), 'layout' => Sass::Script::String.new('vertical')} end def teardown clean_up_sprites end # HELPERS def vertical opts = @options.merge("layout" => Sass::Script::String.new('vertical')) sprite_map_test(opts) end def smart options = @options.merge("layout" => Sass::Script::String.new('smart')) importer = Compass::SpriteImporter.new uri = "image_row/*.png" path, name = Compass::SpriteImporter.path_and_name(uri) sprite_names = Compass::SpriteImporter.sprite_names(uri) sass_engine = Compass::SpriteImporter.sass_engine(uri, name, importer, options) map = Compass::SassExtensions::Sprites::SpriteMap.new(sprite_names.map {|n| "image_row/#{n}.png"}, path, name, sass_engine, options) map.options = {:compass => {:logger => Compass::NullLogger.new}} map end def diagonal opts = @options.merge("layout" => Sass::Script::String.new('diagonal')) sprite_map_test(opts) end def horizontal(options= {}, uri=URI) opts = @options.merge("layout" => Sass::Script::String.new('horizontal')) opts.merge!(options) sprite_map_test(opts, uri) end # REPEAT_X test 'repeat-x layout single image' do opts = {"repeat_x_three_repeat" => Sass::Script::String.new('repeat-x'), 'sort_by' => Sass::Script::String.new('width')} map = sprite_map_test(@options.merge(opts), 'repeat_x/*.png') assert_equal 6, map.width assert_equal [0, 1, 3, 6, 10, 3, 3], map.images.map(&:top) assert_equal [0, 0, 0, 0, 0, 0, 3], map.images.map(&:left) end test 'repeat-x layout multi image' do opts = {"repeat_x_three_repeat" => Sass::Script::String.new('repeat-x'), "repeat_x_four_repeat" => Sass::Script::String.new('repeat-x')} map = sprite_map_test(@options.merge(opts), 'repeat_x/*.png') assert_equal 12, map.width end test "repeat-y layout single image" do opts = {"layout" => Sass::Script::String.new('horizontal'), "squares_ten_by_ten_repeat" => Sass::Script::String.new('repeat-y')} map = sprite_map_test(@options.merge(opts), 'squares/*.png') assert_equal 30, map.width assert_equal 20, map.height assert_equal 3, map.images.size assert_equal [[0,0], [0,10], [10,0]], map.images.map { |img| [img.top, img.left] } assert map.horizontal? end test "repeat-y layout multi image" do opts = {"layout" => Sass::Script::String.new('horizontal'), "repeat_x_three_repeat" => Sass::Script::String.new('repeat-y'), "repeat_x_four_repeat" => Sass::Script::String.new('repeat-y')} map = sprite_map_test(@options.merge(opts), 'repeat_x/*.png') assert_equal [[0, 0], [0, 5], [0, 9], [0, 10], [0, 13], [4, 5], [8, 5], [3, 10], [6, 10], [9, 10]], map.images.map { |img| [img.top, img.left] } end # VERTICAL LAYOUT it "should have a vertical layout" do vert = vertical assert_equal [0, 10, 20, 30], vert.images.map(&:top) assert_equal [0, 0, 0, 0], vert.images.map(&:left) assert vert.vertical? end it "should have a vertical layout with spacing" do vert = sprite_map_test(@options.merge({"spacing" => Sass::Script::Number.new(10, ['px'])})) assert_equal [0, 20, 40, 60], vert.images.map(&:top) end it "should layout vertical with position" do vert = sprite_map_test("selectors_ten_by_ten_active_position" => Sass::Script::Number.new(10, ['px'])) assert_equal [0, 10, 0, 0], vert.images.map(&:left) end it "should generate vertical sprites in decending order" do sizes = vertical.images.map{|image| File.size(image.file) } assert_equal sizes.min, File.size(vertical.images.first.file) assert_equal sizes.max, File.size(vertical.images.last.file) end # SMART LAYOUT it "should have a smart layout" do base = smart base.generate assert base.smart? assert_equal 400, base.width assert_equal 60, base.height assert_equal [[0, 0], [20, 120], [20, 0], [20, 100], [20, 160]], base.images.map {|i| [i.top, i.left]} assert File.exists?(base.filename) FileUtils.rm base.filename end # DIAGONAL LAYOUT it "should generate a diagonal sprite" do base = diagonal base.generate assert base.diagonal? assert_equal 40, base.width assert_equal 40, base.height assert_equal [[30, 0], [20, 10], [10, 20], [0, 30]], base.images.map {|i| [i.top, i.left]} assert File.exists?(base.filename) FileUtils.rm base.filename end # HORIZONTAL LAYOUT it "should have a horizontal layout" do base = horizontal assert base.horizontal? assert_equal 10, base.height assert_equal 40, base.width end it "should layout images horizontaly" do base = horizontal assert_equal [0, 10, 20, 30], base.images.map(&:left) assert_equal [0, 0, 0, 0], base.images.map(&:top) end it "should layout horizontaly with spacing" do base = horizontal("spacing" => Sass::Script::Number.new(10, ['px'])) assert_equal [0, 20, 40, 60], base.images.map(&:left) assert_equal [0, 0, 0, 0], base.images.map(&:top) assert_equal 80, base.width end it "should layout horizontaly with spacing and and position" do base = horizontal({"spacing" => Sass::Script::Number.new(10, ['px']), "position" => Sass::Script::Number.new(50, ['%'])}, 'squares/*.png') assert_equal [0, 20], base.images.map(&:left) assert_equal [5, 0], base.images.map(&:top) assert_equal 50, base.width end it "should layout horizontaly with position" do base = horizontal("selectors_ten_by_ten_active_position" => Sass::Script::Number.new(10, ['px'])) assert_equal [0, 10, 0, 0], base.images.map(&:top) assert_equal 40, base.width assert_equal 20, base.height end it "should generate a horrizontal sprite" do base = horizontal base.generate assert File.exists?(base.filename) FileUtils.rm base.filename end end ================================================ FILE: cli/test/units/sprites/row_fitter_test.rb ================================================ require 'test_helper' require 'compass/sass_extensions/sprites/row_fitter' class RowFitterTest < Test::Unit::TestCase include SpriteHelper def setup file = StringIO.new("images_path = #{@images_src_path.inspect}\n") Compass.add_configuration(file, "sprite_config") end def row_fitter(images = nil) @row_fitter ||= Compass::SassExtensions::Sprites::RowFitter.new(images) end def teardown @row_fitter = nil end def create_images(dims) dims.collect { |width, height| image = Compass::SassExtensions::Sprites::Image.new('blah', 'blah', {}) image.stubs(:width => width, :height => height) image } end def basic_dims [ [ 100, 10 ], [ 80, 10 ], [ 50, 10 ], [ 35, 10 ], [ 20, 10 ] ] end it 'should use the fast placement algorithm' do images = create_images(basic_dims) row_fitter(images) assert_equal 100, row_fitter.width row_fitter.fit!(:fast) assert_equal 4, row_fitter.rows.length assert_equal [ images[0] ], row_fitter[0].images assert_equal [ images[1] ], row_fitter[1].images assert_equal [ images[2], images[3] ], row_fitter[2].images assert_equal [ images[4] ], row_fitter[3].images end it 'should use the scan placement algorithm' do images = create_images(basic_dims) row_fitter(images) row_fitter.fit!(:scan) assert_equal 3, row_fitter.rows.length assert_equal [ images[0] ], row_fitter[0].images assert_equal [ images[1], images[4] ], row_fitter[1].images assert_equal [ images[2], images[3] ], row_fitter[2].images end end ================================================ FILE: cli/test/units/sprites/sprite_command_test.rb ================================================ require 'test_helper' require 'compass/exec' class SpriteCommandTest < Test::Unit::TestCase include Compass::TestCaseHelper include Compass::CommandLineHelper include Compass::IoHelper attr_reader :test_dir include SpriteHelper def setup @before_dir = ::Dir.pwd create_temp_cli_dir create_sprite_temp @config_file = File.join(@test_dir, 'config.rb') File.open(@config_file, 'w') do |f| f << config_data end end def config_data return <<-CONFIG images_path = "#{@images_tmp_path}" CONFIG end def create_temp_cli_dir directory = File.join(File.expand_path('../', __FILE__), 'test') ::FileUtils.mkdir_p directory @test_dir = directory end def run_compass_with_options(options) output = 'foo' ::Dir.chdir @test_dir compass *options end def options_to_cli(options) options.map.flatten! end def teardown ::Dir.chdir @before_dir clean_up_sprites if File.exists?(@test_dir) ::FileUtils.rm_r @test_dir end end it "should create sprite file" do assert_equal 0, run_compass_with_options(['sprite', "-f", 'stylesheet.scss', "squares/*.png"]).to_i assert File.exists?(File.join(test_dir, 'stylesheet.scss')) end end ================================================ FILE: cli/test/units/sprites/sprite_map_test.rb ================================================ require 'test_helper' class SpriteMapTest < Test::Unit::TestCase include SpriteHelper def setup Hash.send(:include, Compass::SassExtensions::Functions::Sprites::VariableReader) create_sprite_temp file = StringIO.new(<<-CONFIG) project_path = "#{@images_proj_path}" images_dir = "#{@images_tmp_dir}" CONFIG Compass.add_configuration(file, "sprite_config") Compass.configure_sass_plugin! @options = {'cleanup' => Sass::Script::Bool.new(true), 'layout' => Sass::Script::String.new('vertical')} @base = sprite_map_test(@options) end def teardown clean_up_sprites @base = nil end it "should have the correct size" do assert_equal [10,40], @base.size end it "should have the sprite names" do assert_equal Compass::SpriteImporter.sprite_names(URI), @base.sprite_names end it 'should have image filenames' do assert_equal Dir["#{@images_tmp_path}/selectors/*.png"].sort, @base.image_filenames end it 'should need generation' do assert @base.generation_required? end test 'uniqueness_hash' do assert_equal '4c703bbc05', @base.uniqueness_hash end it 'should be outdated' do assert @base.outdated? end it 'should have correct filename' do assert_equal File.join(@images_tmp_path, "#{@base.path}-s#{@base.uniqueness_hash}.png"), @base.filename end it "should return the 'ten-by-ten' image" do assert_equal 'ten-by-ten', @base.image_for('ten-by-ten').name assert @base.image_for('ten-by-ten').is_a?(Compass::SassExtensions::Sprites::Image) end %w(target hover active).each do |selector| it "should have a #{selector}" do assert @base.send(:"has_#{selector}?", 'ten-by-ten') end it "should return #{selector} image class" do assert_equal "ten-by-ten_#{selector}", @base.image_for('ten-by-ten').send(:"#{selector}").name end it "should find file with '-' #{selector}" do map = sprite_map_test(:seperator => '-') map.images.each_index do |i| if map.images[i].name != 'ten-by-ten' name = map.images[i].name.gsub(/_/, '-') map.images[i].stubs(:name).returns(name) end end assert_equal "ten-by-ten-#{selector}", map.image_for('ten-by-ten').send(:"#{selector}").name end end it "should generate sprite" do @base.generate assert File.exists?(@base.filename) assert !@base.generation_required? assert !@base.outdated? end it "should remove old sprite when generating new" do @base.generate file = @base.filename assert File.exists?(file), "Original file does not exist" file_to_remove = File.join(@images_tmp_path, 'selectors', 'ten-by-ten.png') FileUtils.rm file_to_remove assert !File.exists?(file_to_remove), "Failed to remove sprite file" @base = sprite_map_test(@options) @base.generate assert !File.exists?(file), "Sprite file did not get removed" end test "should get correct relative_name" do Compass.reset_configuration! uri = 'foo/*.png' other_folder = File.join(@images_tmp_path, '../other-temp') FileUtils.mkdir_p other_folder FileUtils.mkdir_p File.join(other_folder, 'foo') %w(my bar).each do |file| FileUtils.touch(File.join(other_folder, "foo/#{file}.png")) end config = Compass::Configuration::Data.new('config') config.images_path = @images_tmp_path config.sprite_load_path = [@images_tmp_path, other_folder] Compass.add_configuration(config, "sprite_config") assert_equal 'foo/my.png', Compass::SassExtensions::Sprites::SpriteMap.relative_name(File.join(other_folder, 'foo/my.png')) FileUtils.rm_rf other_folder end test "should get correct relative_name for directories with similar names" do Compass.reset_configuration! uri = 'foo/*.png' other_folder = File.join(@images_tmp_path, '../other-temp') other_folder2 = File.join(@images_tmp_path, '../other-temp2') FileUtils.mkdir_p other_folder FileUtils.mkdir_p other_folder2 FileUtils.mkdir_p File.join(other_folder2, 'foo') %w(my bar).each do |file| FileUtils.touch(File.join(other_folder2, "foo/#{file}.png")) end config = Compass::Configuration::Data.new('config') config.images_path = @images_tmp_path config.sprite_load_path = [@images_tmp_path, other_folder, other_folder2] Compass.add_configuration(config, "sprite_config") assert_equal 'foo/my.png', Compass::SassExtensions::Sprites::SpriteMap.relative_name(File.join(other_folder2, 'foo/my.png')) FileUtils.rm_rf other_folder FileUtils.rm_rf other_folder2 end test "should create map for nested" do base = Compass::SassExtensions::Sprites::SpriteMap.from_uri OpenStruct.new(:value => 'nested/squares/*.png'), @base.instance_variable_get(:@evaluation_context), @options assert_equal 'squares', base.name assert_equal 'nested/squares', base.path end test "should have correct position on ten-by-ten" do percent = Sass::Script::Number.new(50, ['%']) base = sprite_map_test(@options.merge('selectors_ten_by_ten_position' => percent)) assert_equal percent, base.image_for('ten-by-ten').position end test 'gets name for sprite in search path' do Compass.reset_configuration! uri = 'foo/*.png' other_folder = File.join(@images_tmp_path, '../other-temp') FileUtils.mkdir_p other_folder FileUtils.mkdir_p File.join(other_folder, 'foo') %w(my bar).each do |file| FileUtils.touch(File.join(other_folder, "foo/#{file}.png")) end config = Compass::Configuration::Data.new('config') config.images_path = @images_tmp_path config.sprite_load_path = [@images_tmp_path, other_folder] Compass.add_configuration(config, "sprite_config") image = Compass::SassExtensions::Sprites::Image.new(@base, "foo/my.png", {}) assert_equal File.join(other_folder, 'foo/my.png'), image.file assert_equal 0, image.size end end ================================================ FILE: compass-style.org/.compass/config.rb ================================================ # Require any additional compass plugins here. require 'susy' require 'css-slideshow' # Set this to the root of your project when deployed: http_path = "/" project_path = File.expand_path(File.join(File.dirname(__FILE__), '..')) css_dir = "output/stylesheets" sass_dir = "content/stylesheets" images_dir = "assets/images" javascripts_dir = "assets/javascripts" fonts_dir = "assets/fonts" http_javascripts_dir = "javascripts" http_stylesheets_dir = "stylesheets" http_images_dir = "images" http_fonts_dir = "fonts" # To enable relative paths to assets via compass helper functions. Uncomment: # relative_assets = true ================================================ FILE: compass-style.org/.gitignore ================================================ bin vendor output vendor/ruby crash.log tmp .bundle sync .rvmrc ================================================ FILE: compass-style.org/.livereload ================================================ # Lines starting with pound sign (#) are ignored. # additional extensions to monitor #config.exts << 'haml' # exclude files with NAMES matching this mask #config.exclusions << '~*' # exclude files with PATHS matching this mask (if the mask contains a slash) #config.exclusions << '/excluded_dir/*' # exclude files with PATHS matching this REGEXP #config.exclusions << /somedir.*(ab){2,4}.(css|js)$/ # reload the whole page when .js changes #config.apply_js_live = false # reload the whole page when .css changes #config.apply_css_live = false # wait 100ms for more changes before reloading a page #config.grace_period = 0.1 ================================================ FILE: compass-style.org/Gemfile ================================================ source 'https://rubygems.org' gem 'nanoc', '~> 3.4.2' gem 'i18n' gem 'adsf' gem 'rb-inotify' gem 'thin' gem 'foreman' gem 'rdiscount' gem 'thor' gem 'rack' gem 'fssm' gem 'mime-types' gem 'nokogiri' gem 'coderay' gem 'haml' gem 'rake' gem 'activesupport', '~> 3.0.10', :require => 'active_support/inflector' gem 'sass', "~> 3.3.0" gem 'compass', :path => ".." gem 'susy' gem 'css-slideshow', "0.2.0" gem 'json' gem 'css_parser', "1.0.1" gem 'rb-fsevent' gem 'builder' ================================================ FILE: compass-style.org/Procfile ================================================ watch: bundle exec nanoc watch view: bundle exec nanoc view -H thin ================================================ FILE: compass-style.org/README.markdown ================================================ # Compass documentation * [About](#about) * [Documentation setup](#documentation-setup) * [Documentation project structure](#documentation-project-structure) * [HOW-TOs](#how-tos) If you want to work on a specific part of the docs, please let everyone know via the [Compass-devs google group](http://groups.google.com/group/compass-devs/browse_thread/thread/41dc723721a194f8). --- ## About This is the documentation for Compass. Much of the documentation is read from the Sass source files to keep the docs in-line with current state of the code as much as possible. If you're reading this, you might be thinking about helping to improve the Compass documentation by editing existing documentation or by adding new documentation. There are two main kinds of documentation: * Tutorials → Describe **how** to use Compass. * Reference → Details about **what** Compass has. It's possible and encouraged for related tutorials and reference documentation to link to each other. ## Documentation setup So you want to help documenting Compass? Setting up the documentation for Compass is not super-easy, but it's pretty doable. The Compass docs live in the source code of Compass. Not directly in the Sass files though: the documentation is a combination of inline comments and source code read directly from the Sass files, and hand-maintained documentation and examples. We use [nanoc](http://nanoc.stoneship.org/) to generate a static website, combined with some Ruby to read the Compass source. The reasons for this setup are simple: * to keep the documentation current, we need to read from the source code * to read from the source code, we need to be in the source code If you encounter any problems, there's usually some people around to help at #compass on freenode IRC. ### Prerequisites: * a Github account, setup to be able to clone repos (see [GitHub Help](http://help.github.com/)) * [Git](http://git-scm.com/downloads) installed on your computer * a basic knowledge of Git ([Pro Git](http://git-scm.com/book) is an excellent free guide) Make sure that you have RubyGems v1.3.6 or greater: ```sh $ gem -v ``` If that doesn't work, RubyGems is probably out of date, try: ```sh $ (sudo) gem update --system ``` You will need the [Bundler](http://gembundler.com/) gem, so if you don't have it: ```sh $ (sudo) gem install bundler ``` A list of the gems on your system can be accessed via `gem list`. Run `gem list bundler` to see if you have bundler installed. ### 1. Get your own copy of Compass (fork) Make your own fork of Compass on Github by clicking the "Fork" button on [http://github.com/chriseppstein/compass](http://github.com/chriseppstein/compass), then go to your fork of Compass on GitHub. Your compass fork will be available at `http://github.com//compass` . ### 2. Directory setup `git clone` your fork of the Compass repository: ```sh $ git clone git@github.com:/compass.git ``` ### 3. Bundler If you haven't yet done so, install bundler: ```sh $ (sudo) gem install bundler ``` Bundle the gems for this application: ```sh $ cd compass-style.org $ bundle install ``` ### 3/4. Binstubs If your bundler is still stuck with generating binstubs (an approach we used before), check if there's a `.bundler` directory in `compass-style.org`. If there is, delete it and try again. If you don't know what we're talking about, then everything is fine, continue... :) ### 4. Compile the docs First, make sure you're in the `compass-style.org` directory. To watch the folder for changes and to preview the site in your browser, run: ```sh $ foreman start ``` Then go to [http://localhost:3000](http://localhost:3000) to view the site. We use [foreman](https://github.com/ddollar/foreman) to combine two nanoc commands using a `Procfile`, which you'll find in `compass-style.org`. If you take a look a it, you'll see two processes, `watch` and `view`: ```sh watch: bundle exec nanoc watch view: bundle exec nanoc view -H thin ``` `nanoc watch` watches for changes and `nanoc view -H thin` previews the site using thin (rather than WEBrick, which it would use by default). We suggest you install [Growl](http://growl.info/) or [rb-inotify](https://github.com/nex3/rb-inotify) so you can receive notifications when the site is done compiling. Your basic workflow might look like this: 1. run `foreman start` 1. open [http://localhost:3000](http://localhost:3000) 1. make changes in the project files (and save them) 1. wait for the notification that the compilation is complete 1. refresh the browser to see the changes 1. go to 3. If you refresh the browser before the compilation is complete, nothing bad will happen, you just won't see the change until the compilation finishes (and you refresh again). That's because the site is compiling asynchronously. Auto-compiling on file change might not be your thing. In that case, keep this process running in a separate terminal window: ```sh $ bundle exec nanoc view -H thin ``` and run: ```sh $ bundle exec nanoc (compile) ``` every time you want to compile the site and see the changes. If this doesn't work for you, you could try nanoc's `aco` (or `autocompile`) command: ```sh $ bundle exec nanoc aco -H thin ``` It compiles and previews the site in the browser (also at [http://localhost:3000](http://localhost:3000)), then recompiles it on each request. The difference from the previous approach is that the site is recompiled each time a page is requested, not when a file is changed. This approach is usually more sluggish because it's synchronous. For convenience, all these commands are written as rake tasks: ```sh $ rake watch # bundle execn nanoc watch $ rake view # bundle exec nanoc view -H thin $ rake compile # bundle exec nanoc (compile) $ rake aco # bundle exec nanoc aco -H thin ``` if you choose not to use the Procfile approach. It is recommended that you read the 5 minute [tutorial](http://nanoc.stoneship.org/tutorial/) on nanoc. ### 5. Commit your changes to your fork When you're happy with the changes you made and you're ready to submit them, use `git add` to stage the changes, then commit them with: ```sh $ git commit ``` When you're ready to push your changes to your Compass fork on GitHub, run: ```sh $ git push -u origin ``` depending on which branch you want to push. Your changes are now reflected on your github repo. Go to Github and click the "Pull Request" button on top of your repo to notify Chris of changes. He will verify them and merge them into the master. #### How to pull in new changes Add the original Compass repository to your Git remotes: ```sh $ git remote add chris git://github.com/chriseppstein/compass.git ``` Then get the new changes with fetch: ```sh $ git fetch chris ``` And merge them with your local docs branch: ```sh $ git merge chris ``` ## Documentation project structure
.compass/config.rb Compass configuration of the project.
content/ Content of the project.
content/reference/ Reference documentation.
content/examples/ Examples.
content/help/tutorials/ Tutorial documentation.
content/stylesheets/ Sass stylesheets for the project.
assets/css/ Third-party, plain old CSS files.
assets/images/ Images.
assets/javascripts/ JavaScript files.
layouts/ Layouts for the project.
layouts/partials/ Partials for the project.
lib/ Ruby code – helper code and Sass source inspection is done here.
## HOW-TOs ### How to Add an Asset If you are adding an asset (e.g. image, CSS, JavaScript) place the file(s) in the appropriate directories under the `assets` directory. ### How to Add a New Example (Again, make sure you're in the `compass-style.org` directory.) We're using [Thor](https://github.com/wycats/thor) to generate examples and references. The command for generating examples is `generate:example`, you can see command's description and available options by running: ```sh $ thor help generate:example ``` which produces: ```sh Usage: thor generate:example path/to/module Options: -t, [--title=TITLE] # Title of the example. -d, [--description=DESCRIPTION] # Description of the example, which is shown below the link. -m, [--mixin=MIXIN] # Name of the specific mixin in the module if the example isn't about the whole module. Generates a new example. ``` All of these are optional and have reasonable defaults, you can use them when understand what exactly they are setting. They are all simple metadata values, so you can change them later on. **Note**: When generating examples or references, Thor is searching for the appropriate module stylesheet. If it doesn't find one, it raises an error and doesn't generate anything. So before generating anything make sure the stylesheet exists and is under `../frameworks/compass/stylesheets/compass/path/to/module` (relative to the `compass-style.org` directory). If the path confuses you, just take a few minutes to study how other modules are organized and you'll quickly get the hang of it. Let's do an example: ```sh $ thor generate:example typography/lists/inline-block-list ``` which produces the following output: ``` Generating /examples/compass/typography/lists/inline-block-list/ DIRECTORY content/examples/compass/typography/lists/inline-block-list/ CREATE content/examples/compass/typography/lists/inline-block-list.haml CREATE content/examples/compass/typography/lists/inline-block-list/markup.haml CREATE content/examples/compass/typography/lists/inline-block-list/stylesheet.scss ``` The command generated three files: 1. `inline-block-list.haml` → The main container, it contains example metadata and description. 1. `markup.haml` → The markup for the example, it will be shown as HTML and as Haml and it's styled with `stylesheet.scss`. 1. `stylesheet.scss` → The style for the example, it will be shown as SCSS, Sass and as CSS. This is the main file as it is demonstrating the module. `markup.haml` and `stylesheet.scss` are pretty self-explanatory, but we might want take a look at `inline-block-list.haml`. ``` --- title: Inline Block List description: How to use Inline Block List framework: compass stylesheet: compass/typography/lists/_inline-block-list.scss example: true --- - render "partials/example" do %p Lorem ipsum dolor sit amet. ``` The stuff between `---` is called YAML front matter, it's describes example's metadata which is used to associate the example to the reference documentation. If your example covers only a specific mixin, not the whole module, you can add `mixin: ` to the metadata. This will display the example link right below that mixin in the reference (otherwise, it will appear near the top, below the module description). After adding the example and adjusting the metadata, go to the reference page in your browser and you can verify that a link to the example has appeared. ### How to Add New Reference Documentation Existing modules already have reference files, so you'll most likely be adding reference files to new modules. So we got a great idea for an awesome module, and after a lot of thinking we decided to name it `super-awesome-module`. The first step to adding a new module is creating the stylesheet. Let's say this will be a Compass CSS3 module, so we'll create a new file as `../frameworks/compass/stylesheets/compass/css3/_super-awesome-module.scss` (relative to the `compass-style.org` directory). Keep in mind that the comments inside those stylesheets are parsed with Markdown and output into the reference. The easiest way to find out how you should write your stylesheet is to take a look at some existing modules. This module won't be very useful, but you'll get the point: ```scss @import "shared"; // Super awesomeness variable. $default-super-awesomeness : true !default; // Super awesome mixin. @mixin super-awesome { @if $default-super-awesomeness { $a: 5; } } ``` Now that we have a stylesheet, we can generate the reference for it using the `generate:reference` command. We can first see what it does by running: ```sh $ thor help generate:reference ``` which produces: ```sh Usage: thor generate:reference path/to/module Options: -t, [--title=TITLE] # Title of the reference. Generate a reference page for the given module. ``` Now we can create a reference file for our new module: ```sh $ thor generate:reference css3/super-awesome-module ``` Which produces the following output: ``` Generating /reference/compass/css3/super-awesome-module/ DIRECTORY content/reference/compass/css3/super-awesome-module/ CREATE content/reference/compass/css3/super-awesome-module.haml ``` If we open `super-awesome-module.haml`, we can see our reference template: ``` --- title: Compass Super Awesome Module crumb: Super Awesome Module framework: compass stylesheet: compass/css3/_super-awesome-module.scss layout: core classnames: - reference - core --- - render "reference" do %p Lorem ipsum dolor sit amet. ``` If `title` and `crumb` are the way you want them to be, your metadata should be good to go. Check the reference in your browser (it should be listed as a module in CSS3), if the style appears broken, take a look at the metadata of sibling stylesheets and adjust yours accordingly. If everything looks fine you can start writing the module's description below. Unlike what you might have guessed, the reference file only holds the main description of the module. Descriptions of specific variables, functions and mixins should be written as comments in the stylesheet file. Happy documenting! ================================================ FILE: compass-style.org/Rakefile ================================================ require "bundler" Bundler.setup require "rake" desc "Watch the site for changes." task :watch do sh "nanoc watch" end desc "Compile the site." task :compile do sh "nanoc compile" end desc "View the site in a browser." task :view do sh "nanoc view -H thin" end desc "View the site in a browser with live updating (sluggish)." task :aco do sh "nanoc aco -H thin" end ================================================ FILE: compass-style.org/Rules ================================================ #!/usr/bin/env ruby require 'sass' require 'compass' Compass.add_configuration "#{File.dirname(__FILE__)}/.compass/config.rb" SITE_ROOT = "" compile '/assets/*/' do nil end ['markup', 'stylesheet', 'background'].each do |ex_file| compile "/examples/*/#{ex_file}/" do snapshot :raw nil end end compile '/' do filter :haml, :ugly => true layout item[:layout] ? item[:layout] : "main" end compile '/search-data/' do filter :erb end compile '/examples/*/' do filter :haml, :ugly => true filter :highlight layout item[:layout] ? item[:layout] : "example" end sass_options = Compass.sass_engine_options (0..5).each do |i| compile("/stylesheets/#{'*/' * i}_*/") {nil} end compile '/stylesheets/*' do filter :sass, sass_options.merge(:syntax => item[:extension].to_sym) end compile '/reference/*/' do filter :haml, :ugly => true filter :highlight layout item[:layout] ? item[:layout] : "main" end compile '/posts/*/' do filter :erb filter :rdiscount if item[:extension] == "markdown" layout 'post' end compile "/blog/atom/" do filter :haml, :attr_wrapper => '"' end compile 'sitemap' do filter :erb end compile '*' do if item[:extension] == "markdown" filter :erb filter :rdiscount elsif item[:extension] == "haml" filter :haml, :ugly => true end layout item[:layout] ? item[:layout] : "main" end route 'sitemap' do item.identifier.chop + '.xml' end route "/blog/atom/" do "/blog/atom.xml" end route '/search-data/' do "#{SITE_ROOT}/javascripts"+item.identifier[0..-2]+".js" end (0..5).each do |i| route("/stylesheets/#{'*/' * i}_*/") {nil} end route '/assets/htaccess/' do "#{SITE_ROOT}/.htaccess" end route '/assets/css/*/' do "#{SITE_ROOT}/stylesheets"+item.identifier.chop[11..-1] end route '/assets/images/*/' do SITE_ROOT+item.identifier.chop[7..-1] end route '/assets/javascripts/*/' do SITE_ROOT+item.identifier.chop[7..-1] end route '/assets/fonts/*/' do SITE_ROOT+item.identifier.chop[7..-1] end route '/stylesheets/*/' do # don't generate a directory like we do for HTML files SITE_ROOT+item.identifier.chop + '.css' end route '/posts/*/' do if item[:draft] puts "Skipping Draft post: #{item.identifier}" nil elsif item.identifier =~ %r{^/posts/(\d{4})-(\d{2})-(\d{2})-(.*)/$} "/blog/#{$1}/#{$2}/#{$3}/#{$4}/index.html" else puts "WARNING: malformed post name: #{item.identifier}" nil end end %w(markup stylesheet background).each do |ex_file| route "/examples/*/#{ex_file}/" do nil end end route '*' do SITE_ROOT+item.identifier + 'index.html' end layout '*', :haml, :ugly => true ================================================ FILE: compass-style.org/assets/htaccess ================================================ RedirectMatch 301 /docs/$ /reference/compass/ RedirectMatch 301 /docs/tutorials/(.*) /help/tutorials/$1 RedirectMatch 301 /docs/(.*) /$1 RedirectMatch 301 /reference/$ /reference/compass/ ================================================ FILE: compass-style.org/assets/javascripts/fixups.js ================================================ $(function(){ $('span.color').each(function(i,e){ e = $(e); e.after(''); }); $('span.arg[data-default-value]').each(function(i,e){ e = $(e); e.attr("title", "Defaults to: " + e.attr("data-default-value")) }); }); /*;(function() { typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null; function Brush(){}; Brush.prototype = new SyntaxHighlighter.Highlighter(); Brush.aliases = ['sass', 'scss', 'css', 'html']; SyntaxHighlighter.brushes.Sass = Brush; typeof(exports) != 'undefined' ? exports.Brush = Brush : null; })();*/ ================================================ FILE: compass-style.org/assets/javascripts/install.js ================================================ function showInstallCommand() { var cmd = $("#existence").val(); var commands = []; var notes = []; var project_name = "<myproject>"; var can_be_bare = true; var in_working_dir = false; var use_bundler = false; if ($("#app-type").val() != "rails") { commands.push("$ gem install compass"); } if (cmd == "init") { commands.push("$ cd " + project_name); in_working_dir = true project_name = "."; $(".creating").hide(); } else { $(".creating").show(); if ($("#project_name").val() != "") project_name = $("#project_name").val(); } if ($("#app-type").val() == "rails") { notes.push("

Rails 2.3 and 3.0 users require additional installation steps. For full rails installation and upgrade instructions please refer to the compass-rails README.

"); use_bundler = true; } if ($("#app-type").val() == "rails") { if (cmd == "create") { commands.push("$ rails new " + project_name); commands.push("$ cd " + project_name); in_working_dir = true project_name = "."; } commands.push("> Edit Gemfile and add this:"); commands.push(" group :assets do"); commands.push(" gem 'compass-rails'"); commands.push(" # Add any compass extensions here"); commands.push(" end"); commands.push("$ bundle"); cmd = "init rails"; can_be_bare = false; } else if ($("#app-type").val() == "other") { if (cmd == "init") { cmd = "create"; } } else if ($("#app-type").val() == "stand-alone") { if (cmd == "init") { cmd = "install"; can_be_bare = false; } } var framework = $("#framework").val(); var create_command; if (cmd == "install") { create_command = "$ compass install " + framework; } else { create_command = "$ compass " + cmd; } if (!in_working_dir) { create_command = create_command + " " + project_name; } if (framework != "compass" && framework != "bare" && cmd != "install") { create_command = create_command + " --using " + framework; } else if (framework == "bare") { if (can_be_bare) { create_command = create_command + " --bare"; } else { notes.push("

You cannot create a bare project in this configuration. Feel free to remove any stylesheets that you don't want.

"); } } if ($("#syntax").val() == "sass") { create_command = create_command + " --syntax sass"; } if ($("#options").val() == "customized") { $("#directories").show(); if ($("#sassdir").val() != "") create_command += " --sass-dir \"" + $("#sassdir").val() + "\""; if ($("#cssdir").val() != "") create_command += " --css-dir \"" + $("#cssdir").val() + "\""; if ($("#jsdir").val() != "") create_command += " --javascripts-dir \"" + $("#jsdir").val() + "\""; if ($("#imagesdir").val() != "") create_command += " --images-dir \"" + $("#imagesdir").val() + "\""; } else { $("#directories").hide(); } if (use_bundler) { create_command = "$ bundle exec " + create_command.replace(/\$ /,''); } commands.push(create_command); var instructions = "
" + commands.join("\n") + "
"; if (instructions.match(/</)) { notes.push("

Note: Values indicated by <> are placeholders. Change them to suit your needs."); } $("#steps").html(instructions + notes.join("")); } function attachMadlibBehaviors() { $("#app-type").change(function(event) { var val = $(event.target).val(); if (val == "other") { $("#options").val("customized"); $(".madlib").addClass("customizable"); } else if (val == "rails") { $("#options").val("default"); $(".madlib").removeClass("customizable"); } else { $(".madlib").addClass("customizable"); } }); $("#existence, #app-type, #framework, #syntax, #options").change(showInstallCommand); $(".madlib input").keyup(function(){setTimeout(showInstallCommand, 0.1)}); } function setupMadlib() { attachMadlibBehaviors(); showInstallCommand(); } $(setupMadlib); ================================================ FILE: compass-style.org/assets/javascripts/jquery.cookie.js ================================================ /** * Cookie plugin * * Copyright (c) 2006 Klaus Hartl (stilbuero.de) * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html * */ /** * Create a cookie with the given name and value and other optional parameters. * * @example $.cookie('the_cookie', 'the_value'); * @desc Set the value of a cookie. * @example $.cookie('the_cookie', 'the_value', { expires: 7, path: '/', domain: 'jquery.com', secure: true }); * @desc Create a cookie with all available options. * @example $.cookie('the_cookie', 'the_value'); * @desc Create a session cookie. * @example $.cookie('the_cookie', null); * @desc Delete a cookie by passing null as value. Keep in mind that you have to use the same path and domain * used when the cookie was set. * * @param String name The name of the cookie. * @param String value The value of the cookie. * @param Object options An object literal containing key/value pairs to provide optional cookie attributes. * @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object. * If a negative value is specified (e.g. a date in the past), the cookie will be deleted. * If set to null or omitted, the cookie will be a session cookie and will not be retained * when the the browser exits. * @option String path The value of the path atribute of the cookie (default: path of page that created the cookie). * @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie). * @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will * require a secure protocol (like HTTPS). * @type undefined * * @name $.cookie * @cat Plugins/Cookie * @author Klaus Hartl/klaus.hartl@stilbuero.de */ /** * Get the value of a cookie with the given name. * * @example $.cookie('the_cookie'); * @desc Get the value of a cookie. * * @param String name The name of the cookie. * @return The value of the cookie. * @type String * * @name $.cookie * @cat Plugins/Cookie * @author Klaus Hartl/klaus.hartl@stilbuero.de */ jQuery.cookie = function(name, value, options) { if (typeof value != 'undefined') { // name and value given, set cookie options = options || {}; if (value === null) { value = ''; options.expires = -1; } var expires = ''; if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) { var date; if (typeof options.expires == 'number') { date = new Date(); date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000)); } else { date = options.expires; } expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE } // CAUTION: Needed to parenthesize options.path and options.domain // in the following expressions, otherwise they evaluate to undefined // in the packed version for some reason... var path = options.path ? '; path=' + (options.path) : ''; var domain = options.domain ? '; domain=' + (options.domain) : ''; var secure = options.secure ? '; secure' : ''; document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join(''); } else { // only name given, get cookie var cookieValue = null; if (document.cookie && document.cookie != '') { var cookies = document.cookie.split(';'); for (var i = 0; i < cookies.length; i++) { var cookie = jQuery.trim(cookies[i]); // Does this cookie string begin with the name we want? if (cookie.substring(0, name.length + 1) == (name + '=')) { cookieValue = decodeURIComponent(cookie.substring(name.length + 1)); break; } } } return cookieValue; } }; ================================================ FILE: compass-style.org/assets/javascripts/jquery.url.packed.js ================================================ jQuery.url=function(){var segments={};var parsed={};var options={url:window.location,strictMode:false,key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}};var parseUri=function(){str=decodeURI(options.url);var m=options.parser[options.strictMode?"strict":"loose"].exec(str);var uri={};var i=14;while(i--){uri[options.key[i]]=m[i]||""}uri[options.q.name]={};uri[options.key[12]].replace(options.q.parser,function($0,$1,$2){if($1){uri[options.q.name][$1]=$2}});return uri};var key=function(key){if(!parsed.length){setUp()}if(key=="base"){if(parsed.port!==null&&parsed.port!==""){return parsed.protocol+"://"+parsed.host+":"+parsed.port+"/"}else{return parsed.protocol+"://"+parsed.host+"/"}}return(parsed[key]==="")?null:parsed[key]};var param=function(item){if(!parsed.length){setUp()}return(parsed.queryKey[item]===null)?null:parsed.queryKey[item]};var setUp=function(){parsed=parseUri();getSegments()};var getSegments=function(){var p=parsed.path;segments=[];segments=parsed.path.length==1?{}:(p.charAt(p.length-1)=="/"?p.substring(1,p.length-1):path=p.substring(1)).split("/")};return{setMode:function(mode){strictMode=mode=="strict"?true:false;return this},setUrl:function(newUri){options.url=newUri===undefined?window.location:newUri;setUp();return this},segment:function(pos){if(!parsed.length){setUp()}if(pos===undefined){return segments.length}return(segments[pos]===""||segments[pos]===undefined)?null:segments[pos]},attr:key,param:param}}(); ================================================ FILE: compass-style.org/assets/javascripts/placeholder.js ================================================ (function($) { $.fn.replaceholder = function(options) { var $placeholder; (this.length > 0) ? $this = $(this) : $this = $('input[placeholder]'); return $this.each(function() { settings = jQuery.extend(options); var $placeholder = $(this); if ($placeholder.length > 0) { var attrPh = $placeholder.attr('placeholder'); $placeholder.attr('value', attrPh); $placeholder.bind('focus', function() { var $this = $(this); if($this.val() === attrPh) $this.val('').removeClass('placeholder'); }).bind('blur', function() { var $this = $(this); if($this.val() === '') $this.val(attrPh).addClass('placeholder'); }); } }); }; })(jQuery); jQuery(function($){ $(document).ready(function(){ if (!Modernizr.input.placeholder) { $("input[placeholder], textarea[placeholder]").replaceholder() } }) }) ================================================ FILE: compass-style.org/assets/javascripts/shAutoloader.js ================================================ /** * SyntaxHighlighter * http://alexgorbatchev.com/SyntaxHighlighter * * SyntaxHighlighter is donationware. If you are using it, please donate. * http://alexgorbatchev.com/SyntaxHighlighter/donate.html * * @version * 3.0.83 (July 02 2010) * * @copyright * Copyright (C) 2004-2010 Alex Gorbatchev. * * @license * Dual licensed under the MIT and GPL licenses. */ eval(function(p,a,c,k,e,d){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(2(){1 h=5;h.I=2(){2 n(c,a){4(1 d=0;d

W =
Width of 1 column in pixels.
G =
Width of 1 gutter in pixels.
H =
Height of the typographic baseline in pixels.
Examples: # 40px column, 10px gutter, 20px height at /grid.png compass grid-img 40+10 # 40px column, 20px gutter, 28px height at /grid.png compass grid-img 40+20x28 # 60px column, 20px gutter, 28px height at images/wide_grid.png compass grid-img 60+20x28 images/wide_grid.png ### Enter into a console for testing SassScript in a compass environment. compass interactive ### Print out statistics about your stylesheets compass stats ### Emit the version of compass compass version ### Unpack a framework or extension into your project compass unpack Get Help on the Command Line ---------------------------- ### Get help on compass compass help ### Get help on an extension compass help extension_name ### Get help about an extension pattern compass help extension_name/pattern_name ### Get help about a particular sub command compass help command_name ================================================ FILE: compass-style.org/content/help/documentation/configuration-reference.markdown ================================================ --- title: Configuration Reference layout: documentation classnames: - documentation --- # Ruby-based Configuration Reference The compass configuration file is a ruby file, which means that we can do some clever things if we want to. But don’t let it frighten you; it’s really quite easy to set up your project. ## Basic format Most configuration properties are a simple assignment to a configuration property. For example: css_dir = "stylesheets" Most configuration properties have a value that is a “basic” type. There are three basic types that can be set to a property: * **String** – Text is surrounded by either single or double quotes. E.g. `"this is a string"` * **Symbol** – A symbol starts with a colon and has no spaces in it. Symbols are used to represent values where the set of possible values are limited. E.g. `:foo` or `:foo_bar_baz` * **Boolean** – `true` or `false` There are two kinds of composite values: * **Array** – An Array is a comma delimited list of basic values surrounded by square brackets. E.g. `["one", "two", "three"]`. * **Hash** – A Hash is an association or mapping of one value to another. It is a comma delimited list of associations surrounded by curly brackets. An association is two values separated by `=>`. E.g. `{:foo => "aaa", :bar => "zzz"}` ## Comments Use the hash sign `#` to comment out everything from the hash sign to the end of the line. ## Import Note for Windows Users The backslash character (`\`) is a special character in a string delimited by double quotes (`"`). If you are working with folders in your paths, you should either use **single quotes** to delimit your strings or escape your backslash by doubling it like `"some\\path"`. ## Loading Compass Plugins Compass relies on the ruby `require` mechanism to load other libraries of code. To load a compass-compatible plugin, simply require it at the top of your configuration file. If you used the -r option to access another library at project creation time, this will already be set up for you. Example: require 'ninesixty' require 'susy' ## Overriding Configuration Settings When using the compass command line, configuration options that you set on the command line will override the corresponding settings in your configuration file. ## Inspecting Configuration Settings passed via the Command Line When using the compass command line, configuration options that you set on the command line can be inspected within the configuration file. For instance, if you set the environment: $ compass compile -e production --force Then you can inspect the value like so: output_style = (environment == :production) ? :compressed : :expanded Values that are not set on the CLI will be `nil` even though they will have a default value later on. ## Configuration Properties
Property Name Type Description
project_type Symbol Can be :stand_alone or :rails. Defaults to :stand_alone.
environment Symbol The environment mode. Defaults to :development, can also be :production
project_path String Not needed in :stand_alone mode where it can be inferred by context. Sets the path to the root of the project.
http_path String The path to the project when running within the web server. Defaults to "/".
css_dir String The directory where the css stylesheets are kept. It is relative to the project_path. Defaults to "stylesheets".
css_path String The full path to where css stylesheets are kept. Defaults to <project_path>/<css_dir>.
http_stylesheets_path String The full http path to stylesheets on the web server. Defaults to http_path + "/" + css_dir.
sass_dir String The directory where the sass stylesheets are kept. It is relative to the project_path. Defaults to "sass".
sass_path String The full path to where sass stylesheets are kept. Defaults to <project_path>/<sass_dir>.
images_dir String The directory where the images are kept. It is relative to the project_path. Defaults to "images".
images_path String The full path to where images are kept. Defaults to <project_path>/<images_dir>.
http_images_path String The full http path to images on the web server. Defaults to http_path + "/" + images_dir.
generated_images_dir String The directory where generated images are kept. It is relative to the project_path. Defaults to the value of images_dir.
generated_images_path String The full path to where generated images are kept. Defaults to the value of <project_path>/<generated_images_dir>.
http_generated_images_path String The full http path to generated images on the web server. Defaults to http_path + "/" + generated_images_dir.
javascripts_dir String The directory where the javascripts are kept. It is relative to the project_path. Defaults to "javascripts".
javascripts_path String The full path to where javascripts are kept. Defaults to <project_path>/<javascripts_dir>.
http_javascripts_path String The full http path to javascripts on the web server. Defaults to http_path + "/" + javascripts_dir.
output_style Symbol The output style for the compiled css. One of: :nested, :expanded, :compact, or :compressed.
relative_assets Boolean Indicates whether the compass helper functions should generate relative urls from the generated css to assets, or absolute urls using the http path for that asset type.
additional_import_paths Array of Strings Other paths on your system from which to import sass files. See the add_import_path function for a simpler approach.
sourcemap Boolean Set this to true to enable sourcemap output.
disable_warnings Boolean Set this to true to silence deprecation warnings.
sass_options Hash These options are passed directly to the Sass compiler. For more details on the format of sass options, please read the sass options documentation.
line_comments Boolean Indicates whether line comments should be added to compiled css that says where the selectors were defined. Defaults to false in production mode, true in development mode.
preferred_syntax Symbol Can be :scss or :sass. Defaults to :scss.
fonts_dir String The directory where the font files are kept. Standalone projects will default to <css_dir>/fonts. Rails projects will default to "public/fonts".
fonts_path String The full path to where font files are kept. Defaults to <project_path>/<fonts_dir>.
http_fonts_path String The full http path to font files on the web server.
http_fonts_dir String The relative http path to font files on the web server.
sprite_engine Symbol Defaults to :chunky_png
chunky_png_options Hash Defaults to {:compression => Zlib::BEST_COMPRESSION}. See the chunky_png wiki for more information
sprite_load_path Array Defaults to [images_path]
## Configuration Functions **`add_import_path`** – Call this function to add a path to the list of sass import paths for your compass project. E.g.: add_import_path "/Users/chris/work/shared_sass" --- **`asset_host`** – Pass this function a block of code that will define the asset host url to be used. The block must return a string that starts with a protocol (E.g. http). The block will be passed the root-relative url of the asset. For example, this picks one of four asset hosts numbered 0-3, depending on the name of the asset: asset_host do |asset| "http://assets%d.example.com" % (asset.hash % 4) end By default there is no asset host used. When `relative_assets` is true the asset host configuration is ignored. --- **`asset_cache_buster`** – Pass this function a block of code that defines the cache buster strategy to be used. The block must return nil, a string or a hash. If the returned value is a hash the values of :path and/or :query is used to generate a cache busted path to the asset. If a string value is returned, it is added as a query string. The returned values for query strings must not include the starting `?`. The block will be passed the root-relative url of the asset. If the block accepts two arguments, it will also be passed a path that points to the asset on disk — which may or may not exist. # Increment the deploy_version before every release to force cache busting. deploy_version = 1 asset_cache_buster do |http_path, file| if file file.mtime.strftime("%s") else "v=#{deploy_version}" end end Busting the cache via path: asset_cache_buster do |path, file| if file pathname = Pathname.new(path) modified_time = file.mtime.strftime("%s") new_path = "%s/%s-%s%s" % [pathname.dirname, pathname.basename(pathname.extname), modified_time, pathname.extname] {:path => new_path, :query => nil} end end To disable the asset cache buster: asset_cache_buster :none --- **`watch`** -- React to changes to arbitrary files within your project. Can be invoked more than once. Example: watch "images/**/*" do |project_dir, relative_path| if File.exists?(File.join(project_dir, relative_path)) puts "File size of #{relative_path} is: #{File.size(File.join(project_dir, relative_path))}" end end This code will be called if the file is added, updated, or removed. Be sure to check for existence to avoid crashing the watcher in the case where the file has been removed. ## Callbacks **`on_sprite_saved`** -- Pass this function a block of code that gets executed after a sprite is saved to disk. The block will be passed the filename. Can be invoked more then once. Example: on_sprite_saved do |filename| post_process(filename) if File.exists?(filename) end **`on_sprite_generated`** -- Pass this function a block of code that gets executed after a sprite is generated but before its saved to disk. The block will be passed an instance of `ChunkyPNG::Image`. Can be invoked more then once. Example: on_sprite_generated do |sprite_data| sprite_data.metadata['Caption'] = "This Image is © My Company 2011" end **`on_stylesheet_saved`** -- Pass this function a block of code that gets executed after a stylesheet is processed. The block will be passed the filename. Can be invoked more then once. Example: on_stylesheet_saved do |filename| Growl.notify { self.message = "#{File.basename(filename)} updated!" self.icon = '/path/to/success.jpg' } end **`on_stylesheet_error`** -- Pass this function a block of code that gets executed if a stylesheet has an error while processing. The block will be passed the filename and the error message. Can be invoked more then once. Example: on_stylesheet_error do |filename, message| Growl.notify { self.message = "#{File.basename(filename)}: #{message}" self.icon = '/path/to/fail.jpg' sticky! } end ================================================ FILE: compass-style.org/content/help/documentation/sass-based-configuration-options.markdown ================================================ --- title: Sass-based Configuration Options layout: documentation classnames: - documentation --- # Sass-based Configuration Options Most of the options available in the Ruby-based configuration file are used to configure the Sass compiler. These options cannot be configured from within your Sass files. However some Compass options are possible to set from within Sass because they are only used to control how Compass's built-in functions work. For example, url generation using `image-url()` and `font-url()`. The options that can be set via Sass configuration are: * `asset-cache-buster` - String, Function reference, or `null`. The function reference must accept two arguments (url path, filename) and can return either a string to be interpreted as a query parameter or a map containing the keys query and/or path mapped to a string. The string is a simple value to set as the query parameter on all urls, when `null`, the cache busting feature is disabled. * `asset-host` - Function reference, or `null`. When `null` this feature is disabled (default). A referenced function must accept a single argument (the root relative url) and return a full url (starting with "http"). * `disable-warnings` - Boolean. When true, warnings will not be output. * `fonts-dir` - String. Relative to project directory. * `fonts-path` - String. Absolute path. * `generated-images-dir` - String. Relative to project directory. * `generated-images-path` - String. Absolute path. * `http-fonts-dir` - String. Relative to project directory. * `http-fonts-path` - String. Absolute path. * `http-generated-images-dir` - String. Relative to http path. * `http-generated-images-path` - String. Absolute path. * `http-images-dir` - String. Relative to project directory. * `http-images-path` - String. Absolute path. * `http-path` - String. URL Prefix of all urls starting with '/'. * `images-dir` - String. Relative to project directory. * `images-path` - String. Absolute path. * `relative-assets` - Boolean. When true, generate relative paths from the css file to the asset. The have the same meaning as the corresponding options in the ruby configuration format. However, there are some things that are different that are worth explaining. ## Working with paths. Compass provides a function called `absolute-path` that will turn any path relative to the sass file it is called from into an absolute path. In order to make your stylesheets work on both windows and unix-based operating systems, you should use the `join-file-segments` function instead of a file separator. For example. If your configuration partial was stored in a subdirectory of your sass folder you would want to set `$project-path` to `absolute-path(join-file-segments('..', '..'))`. In some cases it is useful to parse a url or filename. The function `split-filename($filename)` returns a triple of `(directory, basename, extension)`. ## Working with Function References Some configuration options passed to compass accept a function reference. This is an identifier that is the same name as a Sass function defined in either Sass or Ruby. What arguments the function accepts and should return depends on the particular configuration property. For example: @function my-cache-buster($url, $file) { $hash: md5sum($file); @if $hash { @return (query: "h=#{$hash}"); } @else { @return null; } } @include compass-configuration($asset-cache-buster: my-cache-buster); ## Configuration File Best Practices It is suggested that all compass configuration performed from within Sass should be kept in a single partial named `project-setup`. This file should be imported into every Sass file that is to be used with Compass. ## Understanding the project setup file $project-path: absolute-path(".."); The global `$project-path` must be set to an absolute path to the directory of the project. This global is used to initial compass when importing `compass/configuration`. $debug-configuration: true; Causes compass to output useful debugging information about how it is configured. @import "compass/configuration"; Initializes compass and makes some useful configuration utilities available. $compass-options: (http_path: "/"); @include compass-configuration($compass-options); Configures Compass according to your specific needs. If this mixin is called more than once it will give you a warning. To reconfigure compass with different options, pass `$reconfigure: true` to the compass-configuration mixin. ================================================ FILE: compass-style.org/content/help/documentation/tuning-vendor-prefixes.markdown ================================================ --- title: Tuning Vendor Prefix Support layout: documentation classnames: - documentation --- # Tuning Vendor Prefixes from Compass Stylesheets Underneath the covers of Compass's vendor prefixing and legacy browser support is the very same data that drives the website [caniuse.com](http://caniuse.com). This data allows Compass to correlate browser support with browser usage statistics and browser versions for you. By telling Compass the user thresholds where you're comfortable letting a user's experience degrade gracefully or break Compass will automatically add or remove vendor prefixes for particular features according to the browser statistics corresponding to them. ## Allowing Graceful Degradation in Legacy Browsers CSS features that can degrade gracefully (E.g. `border-radius`) are set by default to adhere to the `$graceful-usage-threshold` variable. This variable defaults to `0.1` which means that when 0.1% of users (1 in 1,000) would be affected by removing the prefix for that feature, it will be removed. ## Allowing Broken Design in Legacy Browsers CSS features that do not degrade gracefully (E.g. `flexbox`) are set by default to adhere to the `$critical-usage-threshold` variable. This variable defaults to `0.01` which means that when 0.01% of users (1 in 10,000) would be affected by removing the prefix for that feature, it will be removed. ## Ensuring a Browser Version Is Supported Sometimes you may wish to fully support a browser version no matter how few people are using it. Maybe the CEO uses it and it has to look perfect. In this case you can set the minimum browser version for each known browser with the `$browser-minimum-versions` map. For instance, if you need to support IE 6, you would set `$browser-minimum-versions` to `(ie: '6')`. Please note that since not all browser versions that Compass tracks are numbers, every version specified must be a string. ## Excluding a Browser no Matter How Many Users it Has The `$supported-browsers` variable defines which browsers your site supports. By default, all browsers are supported. You can use this setting to whitelist only certain browsers, or you can blacklist specific browsers by rejecting them from the full list. Example: `$supported-browsers: reject(browsers(), opera-mini, android)` ## Discovering Browsers and Versions The list of browsers and versions that are known to compass is guided by the underlying data. You can inspect these values in the console: $ compass interactive >> browsers() ("android", "android-chrome", "android-firefox", "blackberry", "chrome", "firefox", "ie", "ie-mobile", "ios-safari", "opera", "opera-mini", "opera-mobile", "safari") >> browser-versions(ie) ("5.5", "6", "7", "8", "9", "10", "11") ## Tweaking Support on a Per-Feature Basis Each CSS3 module provides feature-specific threshold variables. These default to either `$graceful-usage-threshold` or `$critical-usage-threshold`, which should be good enough, but if it's not, you can adjust the support for just the features that matter to you. For example, the border radius module has a configuration variable `$border-radius-threshold` which defaults to `$graceful-usage-threshold`. But if rounded corners are essential to your design, you may want to set it to something lower. ## Prefix Context There are two variables relating to prefix context. `$prefix-context` will be set to a prefix whenever a prefix is in scope. `$current-prefix` is set the prefix that is currently being emitted. This is different from `$prefix-context` in that sometimes it is null when rendering official syntax within the scope of some other prefix. All Compass mixins are aware of the prefix context and you can use them freely and get the output you expect. You can also check the context yourself if you feel it is necessary. For example, the keyframes mixin accepts a content block which is repeated several times: @import "compass/css3"; @include keyframes(my-animation) { 0% { @if $prefix-context == -moz { // Do something mozilla specific in your animation. } @include border-radius(5px); // only outputs the -moz prefix an } } However, Compass comes with a handy mixin for targeting content to a specific prefix context: `with-browser-prefix`. This mixin can be used to establish a context or prevent content from being placed into a context where it doesn't belong. For example, we could have written the example above as: @import "compass/css3"; @include keyframes(my-animation) { 0% { @include with-prefix(-moz) { // Do something mozilla specific in your animation. } @include border-radius(5px); // only outputs the -moz prefix an } } Similarly, you can constrain compass output to a particular prefix. The example below would only generate the mozilla and official keyframes directives and prefixed properties. @import "compass/css3"; @include with-prefix(-moz) { @include keyframes(my-animation) { 0% { @include border-radius(5px); // only outputs the -moz prefix an } } } ## Targeting Legacy Browsers When a generic mixin has support for a legacy browser, the legacy specific styles should be wrapped in a `for-legacy-browser` mixin. In this way, the legacy content will only appear when not in an incompatible context and will be automaticaly removed when the usage of that browser range falls below acceptable thresholds. ## Browser Context If you are in a selector or scope that you know is specific to a particular browser version, you can let compass know this with the `with-browser-ranges` mixins. ## Debugging Browser Support If you find yourself in a situation where you see a browser prefix you didn't expect or don't see one that you did, it may be helpful to turn on browser support debugging by setting `$debug-browser-support` to `true`. This will cause CSS comments to be generated into your output that explains why support for certain browsers was included or excluded. You can also use the `with-browser-support-debugging` mixin that will enable browser support debugging for all compass mixins uses within its content block. The output will look like this: /* Capability css-animation is prefixed with -moz because 1.03559% of users need it which is more than the threshold of 0.1%. */ /* Creating new -moz context. */ @-moz-keyframes foo { 0% { /* Content for ie 8 omitted. Not allowed in the current scope: ie 8 is incompatible with -moz. */ opacity: 0; } 100% { /* Content for ie 8 omitted. Not allowed in the current scope: ie 8 is incompatible with -moz. */ opacity: 1; } } /* Capability css-animation is not prefixed with -ms because 0% of users are affected which is less than the threshold of 0.1. */ /* Capability css-animation is not prefixed with -o because 0.04931% of users are affected which is less than the threshold of 0.1. */ /* Capability css-animation is prefixed with -webkit because 51.42143% of users need it which is more than the threshold of 0.1%. */ /* Creating new -webkit context. */ @-webkit-keyframes foo { 0% { /* Content for ie 8 omitted. Not allowed in the current scope: ie 8 is incompatible with -webkit. */ opacity: 0; } 100% { /* Content for ie 8 omitted. Not allowed in the current scope: ie 8 is incompatible with -webkit. */ opacity: 1; } } @keyframes foo { 0% { /* Content for ie 8 omitted. Not allowed in the current scope: The current scope only works with ie 10 - 11. */ opacity: 0; } 100% { /* Content for ie 8 omitted. Not allowed in the current scope: The current scope only works with ie 10 - 11. */ opacity: 1; } } ## More Information There are many useful mixins and functions in [the code reference for browser support in compass](/reference/compass/support/). ================================================ FILE: compass-style.org/content/help/documentation.haml ================================================ --- title: Compass Documentation crumb: Documentation classnames: - documentation layout: documentation --- %h1 Compass Documentation :markdown This documentation is still a work-in-progress, if something isn't covered here please submit an issue to the [Compass issue tracker](https://github.com/chriseppstein/compass/issues?labels=documentation&state=open). ================================================ FILE: compass-style.org/content/help/index.haml ================================================ --- title: Compass Help crumb: Help classnames: - help - getting-started layout: site --- %article %h1 Getting started with Compass :markdown Compass is an open-source CSS authoring framework which uses the [Sass stylesheet language](http://sass-lang.com) to make writing stylesheets powerful and easy. If you're not familiar with Sass, Go to [sass-lang.com](http://sass-lang.com/guide) to learn all about how it works. :markdown ## Installing Compass To install, please follow the steps found in the [Compass installation guide](/install/). This will install Compass and Sass too. If you want to verify that compass is installed, run: $ compass version ## Watching and Compiling your Project When doing development on your project, you can run the compass watcher to keep your CSS files up to date as changes are made. $ cd /path/to/project $ compass watch When it comes time to compile your css files for production use, pass the `-e production` compiler option to select defaults that optimize your output for end-users: $ compass compile -e production ## Using Compass without the command line tools You can use compass without the compass command line tools. In some cases, this may make it easier to integrate with sass-based compilers and frameworks that do not explicitly support Compass. $ gem install compass-core $ cat <<- EOF > _project-setup.scss \$project-path: absolute-path(join-file-segments("..")); @import "compass/configuration"; \$compass-options: (http_path: "/"); @include compass-configuration(\$compass-options); EOF # Add to the top of each sass file: @import "project-setup"; # Compile using the Sass command line: $ sass -r compass-core --update sass:css Read more: [Compass's Sass-based configuration options](/help/documentation/sass-based-configuration-options/). ## More command line options Full documentation of all compass commands can be found by running: $ compass help To see the options available and description for a compass command run: $ compass help Where `` is one of the compass commands (E.g. `compile`) ================================================ FILE: compass-style.org/content/help/tutorials/best_practices.markdown ================================================ --- title: Best practices crumb: Best practices layout: tutorial classnames: - tutorial --- # Best Practices Here are some best practices for making your projects easier to build and simpler to maintain. ## Use a Base stylesheet file Create a `_base.scss` [partial][1] to initialize your stylesheets with common variables and ([often][2]) the framework utilities you plan to use: ### _base.scss $blueprint-grid-columns : 24; $blueprint-grid-width : 30px; $blueprint-grid-margin : 10px; $font-color : #333; @import "compass/reset"; @import "compass/utilities"; @import "blueprint"; // etc. The `_base.scss` file is also a great place to keep your own custom mixins, so they’re available to any stylesheet that includes it. Then you can include this file in all other stylesheets: ### application.scss @import "base"; #wrapper { @include container; } // etc. It is important to define any compass/framework constants that you want to override in base.scss first, before @import-ing the framework files. See [Working with Configurable Variables][3], for a specific example. Note that you can refer to `_base.scss` without the leading underscore and without the extension, since it is a [partial][1]. ## Write your own Custom Mixins Mixins let you insert any number of style rules into a selector (and its descendants!) with a single line. This is a great way to [DRY][4] up your stylesheet source code and make it much more maintainable. Using mixins will also make your stylesheet look like self-documented source code -- It’s much more obvious to read something like `@include round-corners(6px, #f00)` than the whole list of rules which define that appearance. ## Presentation-free Markup CSS was created to extract the presentational concerns of a website from the webpage content. Following this best practice theoretically results in a website that is easier to maintain. However, in reality, the functional limitations of CSS force abstractions down into the markup to facilitate the [DRY][4] principle of code maintainability. Sass allows us to move our presentation completely to the stylesheets because it lets us create abstractions and reuse entirely in that context. Read [this blog post][5] for more information on the subject. Once you have clean markup, style it using Mixins and Inheritance. With clean and clear abstractions you should be able to read stylesheets and imagine what the webpage will look like without even loading the page in your web browser. If you find your CSS is getting too bloated due to sharing styles between semantic selectors, it may be time to refactor. For instance this stylesheet will be unnecessarily bloated: @mixin three-column { .container { @include container; } .header, .footer { @include column(24); } .sidebar { @include column(6); } article { @include column(10); } .rightbar { @include column(8); } } body#article, body#snippet, body#blog-post { @include three-column; } Instead, ask yourself "what non-presentational quality do these pages share in common?" In this case, they are all pages of content, so it's better to apply a body class of "content" to these pages and then style against that class. ## Nest selectors, but not too much. It's easier to style a webpage from scratch or starting from some common base point for your application than it is to contend with unwanted styles bleeding into your new design. In this way, it is better to use some basic nesting of styles using some selector early in the markup tree. And then to refactor as patterns of use emerge to reduce bloat. It's important to remember that long selectors incur a small rendering performance penalty that in aggregate can slow down your web page. There is no need to exactly mimic your document structure in your css. Instead nest only deep enough that the selector is unique to that part of the document. For instance, don't use `table thead tr th` when a simple `th` selector will suffice. This might mean that you have to separate your styles into several selectors and let the document cascade work to your advantage. [1]: http://sass-lang.com/docs/yardoc/file.SASS_REFERENCE.html#partials [2]: http://groups.google.com/group/compass-users/browse_frm/thread/0ed216d409476f88 [3]: http://compass-style.org/help/tutorials/configurable-variables/ [4]: http://c2.com/cgi/wiki?DontRepeatYourself [5]: http://chriseppstein.github.com/blog/2009/09/20/why-stylesheet-abstraction-matters/ ================================================ FILE: compass-style.org/content/help/tutorials/configurable-variables.haml ================================================ --- title: Working with Configurable Variables layout: tutorial classnames: - tutorial --- :markdown Working with Configurable Variables =================================== There are two ways of defining a variable in Sass. The first, most common, approach is simple assignment. For example: $my-constant : #fedcba The second approach is called guarded assignment. In this case, the constant is only set if it does not already have a value. For example: $my-constant : #fedcba !default Many compass modules use guarded assignment to allow you to set defaults for that module. In order for these configurable variables to work correctly, you must set the variables *before* you import the module. For example: $blueprint-grid-columns = 12 @import "blueprint/grid" Because of this, it is common to have one or more partials that set the constants first and get imported before any other imports in your stylesheet(s). This is commonly referred to as the "base" stylesheet and is usually named `_base.scss` or `_base.sass`. ================================================ FILE: compass-style.org/content/help/tutorials/contributing.markdown ================================================ --- title: Contributing Stylesheets crumb: Contributing layout: tutorial classnames: - tutorial --- Contributing Stylesheets to Compass =================================== Thank you for your interest in contributing to Compass. Our goal is to make it as easy as we can for you to contribute changes to compass -- So if there's something here that seems harder than it ought to be, please let us know. If you find a bug **in this document**, you are bound to contribute a fix. Stop reading now if you do not wish to abide by this rule. **Step 1**: If you do not have a github account, create one. **Step 2**: Fork Compass to your account. Go to the [main repo](http://github.com/chriseppstein/compass) and click the fork button. ![Fork Me](http://img.skitch.com/20101015-n4ssnfyj16e555cnn7wp2pg717.png) Now we're at a decision point. What kind of change do you intend to make? * [Fix a typo (or some other trivial change)](#trivial-changes) * [Documentation Changes](#documentation-changes) * [Fixing Stylesheet Bugs](#stylesheet-bugs) * [New Stylesheet Features](#stylesheet-changes) * [Ruby Changes](#ruby-changes) Here's some general information about the project you might find useful along the way: * [Submitting Patches](#patches) * [Project Structure](#project-structure) * [General Philosophy](#project-philosophy) * [Stylesheet Conventions](#stylesheet-conventions) * [Miscellaneous Stuff](#faq) * [Setting up Git](#setting-up-git) * [Using Compass while Under Development](#running-local-code) * [Running Tests](#running-tests) * [Recovering from a cherry-pick or a rebase](#recovering-from-rebased-or-cherry-picked-changesets)

Making Trivial Changes

Thanks to Github, making small changes is super easy. After forking the project navigate to the file you want to change and click the edit link. ![Edit Me](http://img.skitch.com/20101015-n2x2iaric7wkey2x7u4fa2m1hj.png) Change the file, write a commit message, and click the `Commit` button. ![Commit Me](http://img.skitch.com/20101015-br74tfwtd1ur428mq4ejt12kfc.png) Now you need to get your change [accepted](#patches).

Making Documentation Changes

The compass documentation is stored in two places. First, the `compass-style.org` directory is where the documentation lives -- however much of the documentation is generated from comments in the Sass files themselves. More information on [changing documentation][documentation]. Once your changes are pushed, please [submit them](#patches).

Fixing Stylesheet Bugs

**Step 3**: If this is a bug you discovered. Please [report it][issues] before working on a fix. This helps us better understand the patch. **Step 4**: Get [the code](#setting-up-git) if you haven't yet done so. **Step 5**: Fix the bug and commit the changes. Please make sure to mention the bug id in your commit message like so: Fixed the display of the fizzlebuzz in IE6. Closes GH-123. **Step 6**: Verify the fix in as many browsers as you can as well as against your own project. How to [use compass while changing it](#running-local-code). **Step 7**: Make sure the tests pass. More info on [running tests](#running-tests) If the tests fail, fix the tests or the stylesheets accordingly. If the tests, don't fail, that means this aspect was not well enough tested. Please [add or augment a test](#writing-tests). You're done. Please [submit your changes](#patches).

Making Stylesheet Changes

It is a good idea to discuss new features ideas with the compass users and developers before building something. Please don't be shy; send an email to the [compass mailing list](http://groups.google.com/group/compass-users). Many feature ideas are good but not obviously a good fit for the compass core library. In these cases, you can and should create a [compass extension][extensions]. Sometimes this is because the concept does not align with the [compass philosophy](#project-philosophy). But sometimes it's just because we think the idea needs time to bake. [Documentation on making extensions.][extensions] **Step 3**: Get [the code](#setting-up-git) if you haven't yet done so. **Step 4**: Add the feature -- contact the mailing list if you have any questions. **Step 5**: Add a test case. More info on [writing tests for compass](#writing-tests). **Step 6**: Documentation - Add or update the reference documentation. Add an example of using the feature. See the [doc readme for details][documentation]. You're done. Please [submit your changes](#patches).

Making Ruby Changes

At this time, if you're a rubyist who's planning on working on the ruby-side of things, it's assumed you know how to read code and use standard ruby tools like rake, gem, bundler, test/unit, cucumber, rspec, etc. If you have any questions, please ask. No changes will be accepted without accompanying tests.

Submitting Patches

If you are submitting features that have more than one changeset, please create a topic branch to hold the changes while they are pending merge and also to track iterations to the original submission. To create a topic branch: $ git checkout -b new_branch_name ... make more commits if needed ... $ git push origin new_branch_name You can now see these changes online at a url like: http://github.com/your_user_name/compass/commits/new_branch_name If you have single-commit patches, it is fine to keep them on master. But do keep in mind that these changesets might be [cherry-picked](#recovering-from-rebased-or-cherry-picked-changesets). Once your changeset(s) are on github, select the appropriate branch containing your changes and send a pull request. Make sure to choose the same upstream branch that you developed against (probably stable or master). Most of the description of your changes should be in the commit messages -- so no need to write a whole lot in the pull request message. However, the pull request message is a good place to provide a rationale or use case for the change if you think one is needed. More info on [pull requests][pulls]. ![Pull Request Example](http://img.skitch.com/20101015-rgfh43yhk7e61fchj9wccne9cq.png) Pull requests are then managed like an issue from the [compass issues page][issues]. A code review will be performed by a compass core team member, and one of three outcomes will result: 1. The change is rejected -- Not all changes are right for [compass's philosophy](#project-philosophy). If your change is rejected it might be better suited for a plugin, at least until it matures and/or proves itself with the users. 2. The change is rejected, *unless* -- Sometimes, there are missing pieces, or other changes that need to be made before the change can be accepted. Comments will be left on the commits indicating what issues need to be addressed. 3. The change is accepted -- The change is merged into compass, sometimes minor changes are then applied by the committer after the merge.

Project Structure

compass/ core/ - The core of compass's configuration and stylesheets. frameworks/ - All frameworks in this directory are loaded automatically compass/ - The compass framework stylesheets/ - The compass libraries templates/ - The compass project templates and patterns test/ - unit tests lib/ compass-core.rb - The main compass-core ruby library compass/ core/ sass_extensions/ - enhancements to Sass functions/ - Sass functions exposed by compass monkey_patches/ - Changes to sass itself configuration/ - support for project configuration cli/ - All the compass code that makes the command line work bin/ compass - CLI executable devbin/ - development scripts after installing the bundle test/ - unit tests features/ - tests for compass lib/ compass.rb - The main compass ruby library compass/ app_integration/ - integration with app frameworks commands/ - UI agnostic support for the CLI configuration/ - Some CLI specific configuration. exec/ - UI code for the CLI installers/ - support for installing templates compass-style.org/ - source for documentation output/ - generated documentation import-once/ - Compass's import-once importer for Sass.

General Philosophy

1. Users specify their own selectors. Compass never forces a user to use a presentational class name. 2. Compass does not require javascript. It is a CSS framework. 3. Compass core is "design agnostic". This is why compass core has no grid framework -- grids are not design agnostic. 4. Compass frameworks are not special. If compass can do it, so should an extension be able. 5. Sass is awesome -- Compass should make sass more accessible and demonstrate how to use Sass to its fullest potential. 6. Developing across browsers is hard and will always be hard. It takes a community to get it right. 7. By default, Compass supports as many browsers as it can. Where it can't it progressively enhances. Where it degrades, the documentation should make a note. Deviation from this requires an excellent reason. 8. Compass is a proving ground for Sass features. The watcher and color functions are examples of features that started in Compass and got moved to Sass.

Stylesheet Conventions

1. All framework stylesheets are partials. Their filename begin with an underscore. Otherwise, Sass will create stylesheets directly into the user's CSS directory. 2. Compass imports do not emit styles. There are a few limited exceptions to this like the resets and base classes for inheritance. 3. Mixins with two-level defaults. Mixins often provide two levels of default values. The first is a global default that can be overridden once. The second is a default that can be overridden when the mixin is included. 4. Mixin argument names are part of the public API, make sure they are understandable and not needlessly truncated or terse. 5. If adding a new folder of stylesheets, add a single stylesheet with the same name that imports all of the stylesheets in the folder. 6. Try to avoid passing selectors as arguments. This is what mixins are for.

Common Problems & Miscellaneous Info

Setting up Git

Please follow [these instructions](http://help.github.com/git-email-settings/) to set up your email address and attribution information. Download your git repo: git clone git@github.com:your_username/compass.git Set up a remote to the main repo: cd compass git remote add chriseppstein git://github.com/chriseppstein/compass.git Getting recent changes from the main repo: git fetch chriseppstein

Using Compass while Under Development

1. Use the bin script. `/path/to/compass/bin/compass` is a version of the compass command line that uses the local changes you have made. You can add `/path/to/compass/bin` to your `$PATH`, or refer to it directly. 2. Build and install a gem: 1. Edit VERSION and change the version to something like: `1.0.0.something-unique-to-me.0` 2. `gem build compass.gemspec` 3. `gem install compass-0.10.6.something-uniq-to-me.0.gem` -- If installing to your system gems, you'll probably need to add `sudo` to the front. If you don't know what that means, you probably need to add `sudo` to the front. 3. In a [bundled][bundler] environment, you can configure your gem to use compass while you work on it like so: gem 'compass', :path => "/Users/myusername/some/path/to/compass" Bundler will perform some sort of charm on ruby to make it work. 4. Configuring ruby directly. If you're a ruby pro, you probably don't need to be told that you can set compass on the load path like so: export RUBYLIB=/Users/myusername/some/path/to/compass/lib

Running Tests

1. You must have Ruby installed on your system. After [setting up git](#setting-up-git), change to the root directory of your git checkout of Compass. cd compass 2. Install the bundler Ruby gem. gem install bundler If installing to your system gems, you'll probably need to add `sudo` to the front of that command. If you don't know what that means, you probably need to add `sudo` to the front. 3. Install development dependencies: bundle install --binstubs devbin 4. Running core library and stylesheet tests: bundle exec rake test features 5. Running behavior tests ./devbin/cucumber If stylesheet tests fail, the output of the test project is captured in `test/fixtures/stylesheets//saved/` and the error message will report where the error was. Here's an example: ![Stylesheet Test Failure](http://img.skitch.com/20101015-k4t11k8n7xs2r53ftjhrji629d.png)

Writing Stylesheet Tests

Compass has stylesheet tests to ensure that each stylesheet compiles, can be imported directly without any other dependencies and that refactorings that should not affect the output, don't. At some point, it would be great to have a test system that verifies that the stylesheets *work correctly* in various browsers. If you have ideas for how to accomplish this in a sane way, please let us know. In the `test/fixtures/stylesheets` directory, there are a number of compass projects. The tests work by adding or updating the sass files, running the tests to make sure they fail, and then changing the expected css output to make the test pass. It is rudimentary, but as a safety net, it has caught a number of problems that might have been missed otherwise. If you add a new stylesheet to compass, please make sure to add a new test stylesheet that only imports the newly added stylesheet and add rules that use the new features in that stylesheet.

You cherry-picked/rebased my changes. What should I do?

Depending on any number of reasons, including but not limited to the alignment of the stars, Your changes might not be merged into compass using a simple merge. For instance, we might decide to place a change against master into stable instead, or we might squish all your changes together into a single commit at the time of merge, or we might want a change you've submitted but not a change that it was placed onto top of. In these cases, there are a couple of ways you can react: 1. If you have some changes on a branch that were not yet accepted, but other changes on that branch were accepted then you should run the following command (make sure to fetch first): `git checkout branch_name; git rebase chriseppstein/master` (assuming the change was applied to the master branch) 2. If all your changes on the topic branch were accepted or you don't care to keep it around anymore: `git checkout master; git branch -D branch_name; git push origin :branch_name` [pulls]: http://help.github.com/pull-requests/ [issues]: http://github.com/chriseppstein/compass/issues [documentation]: http://github.com/chriseppstein/compass/blob/stable/compass-style.org/README.markdown [bundler]: http://gembundler.com/ [extensions]: /help/tutorials/extensions/ ================================================ FILE: compass-style.org/content/help/tutorials/extending.markdown ================================================ --- title: Extending Compass layout: tutorial crumb: Extending Compass classnames: - tutorial --- # Extending Compass ## Sprite engine The sprite engine is the work horse of sprite generation it's the interface for assembling and writing the image file to disk. ### Requirements A sprite engine requires two methods `construct_sprite`, and `save(filename)` Once inside the class you have access to `images` which is a collection of [Compass::SassExtensions::Sprites::Image](http://rdoc.info/github/chriseppstein/compass/dda7c9/Compass/SassExtensions/Sprites/Image) ### Configuration To enable your sprite engine from the config file set sprite_engine = : The example below will load `Compass::SassExtension::Sprites::ChunkyPngEngine.new(width, height, images)` sprite_engine = :chunky_png ### Class Definition module Compass module SassExtensions module Sprites class ChunkyPngEngine < Compass::SassExtensions::Sprites::Engine def construct_sprite #do something end def save(filename) #save file end end end end end ## Adding Configuration Properties to Compass To add a new configuration property to Compass: Compass::Configuration.add_configuration_property(:foobar, "this is a foobar") do if environment == :production "foo" else "bar" end end This will do several things: 1. make it possible for users to set the `foobar` configuration property in their configuration file. 2. Ruby code can read and write the `foobar` attribute from any configuration object. 3. It will add the comment `# this is a foobar` above the property in the configuration file. A comment is not required, you can simply omit this argument if you like. 4. The block of code provided allows you to assign a sensible default value according to other settings in the configuration or by using arbitrary code to determine what the value should be. For instance it could read from another configuration file or it could change based on the user's operating system. ================================================ FILE: compass-style.org/content/help/tutorials/extensions.markdown ================================================ --- title: Creating Compass Extensions layout: tutorial classnames: - tutorial --- Compass Extensions ================== Compass, at its heart, is a framework upon which sass-based stylesheet frameworks are built. It provides the tools for building, installing and using reusable stylesheets that provide anything from full-fledged layout frameworks to designs for widgets or even full page designs. All using the power of sass to keep the semantic meaning of the html pages clear and free of design details. This document describes the compass extension toolset so that you can build your own compass extension. Basic Extension Layout ----------------------
my_extension
|
|- stylesheets (this directory will be on the sass load path)
|  |
|  |- my_extension (not technically required, but it's good to scope imports by the name of the extension)
|  |  |
|  |  |- _module_one.sass (this file would be imported using @import my_extension/module_one.sass)
|  |  |- _module_two.sass (this file would be imported using @import my_extension/module_two.sass)
|  |  |- ...
|  |
|  |- _my_extension.sass (This file will import the entire extension using @import my_extension.sass)
|
|- templates (this is where templates/patterns go)
|  |
|  |- project (this should be provided if you'd like people to be able to base their project on the extension)
|  |  |
|  |  |- manifest.rb (this file should declare the contents of the template)
|  |  |- screen.sass (this would be the main stylesheet, importing from your extension and demonstrating its use)
|  |  |- print.sass (this file would set up basic print styles)
|  |  |- ie.sass (if you want, you can provide custom styles for IE)
|  |
|  |- some_pattern
|     |
|     |- manifest.rb
|     |- some.sass (some sass is probably in order, always import from the extension library as much as possible)
|     |- some_script.js (yes, you can provide javascript code)
|     |- some_image.png (and images)
|     |- some_content.html.haml (and even html and haml)
|     |- some_other_file.txt (and other arbitrary files)
|
|- lib (optional ruby code)
   |
   |- my_extension.rb (this code can register your framework if you deviate from conventions and require sass extensions, etc.)
   |- compass-my_extension.rb (This file is automatically required by compass if it is present. Avoiding the need to pass -r to the compass command line tool.)
   |
   |- my_extension
      |
      |- sass_extensions.rb (this is the standard location to place sass functions)
Names in bold are part of the extension naming convention. Generating an Extension ----------------------- If you want a leg up to get started working on your extension, you can use compass to generate an extension with the following command: compass create my_extension --using compass/extension This will create a few basic files and folders to get you started. If you prefer to use the scss syntax for your extension run the following command instead: compass create my_extension --using compass/extension -x scss Advanced Layout Options ----------------------- ### Library File Location The extension library file referenced above as `my_extension/lib/my_extension.rb` can actually be stored at any of the following three locations: 1. `my_extension/compass_init.rb` 2. `my_extension/lib/my_extension.rb` (NOTE: You must use this one if you're distributing as a rubygem.) 3. `my_extension/my_extension.rb` The first of those locations found (in the above order) will be loaded. The compass_init.rb file takes priority, so that extensions that want to work differently as compass extensions than they do as normal ruby libraries, have a way of targeting compass. ### Stylesheet and Template Locations If you'd like to store your stylesheets and/or templates in a non-standard location within your extension, you must provide a library file and register the extension explicitly like so: base_directory = File.join(File.dirname(__FILE__), '..') stylesheets_dir = File.join(base_directory, 'my', 'stylesheets') templates_dir = File.join(base_directory, 'my', 'templates') Compass::Frameworks.register('my_extension', :stylesheets_directory => stylesheets_dir, :templates_directory => templates_dir) If you're following the standard naming convention, but the stylesheet and template directories are not at the top level, you can just do this instead: # path from the library file to where you're keeping your compass stuff. base_directory = File.join(File.dirname(__FILE__), '..', 'compass') Compass::Frameworks.register('my_extension', :path => base_directory) ### Adding Configuration Options to Compass For details on how to add new configuration options to compass [read this](/help/tutorials/extending/#adding-configuration-properties). Conventions to Follow --------------------- The following are not required, but are standards that your framework should attempt to adhere to unless there's a good reason not to do so. 1. Have a single import for your framework. 2. Break up your framework into modules so that people can import just smaller pieces for faster load times when they're not using everything. 3. Use partials (files starting with an underscore) for stylesheets that are meant to be imported. If you do not Sass will generate css files for your libraries in some configurations. 4. Provide a project template. If you do not, your project should only be providing widgets or page designs, etc. Building a Template (a.k.a. Pattern) ==================================== Manifest Files -------------- The manifest file declares the template contents and tells compass information about the files in the template. ### An Example Manifest File description "My awesome compass plugin." stylesheet 'screen.sass', :media => 'screen, projection' stylesheet 'partials/_base.sass' stylesheet 'print.sass', :media => 'print' stylesheet 'ie.sass', :media => 'screen, projection', :condition => "lt IE 8" image 'grid.png' javascript 'script.js' html 'welcome.html.haml', :erb => true file 'README' help %Q{ This is a message that users will see if they type compass help my_extension You can use it to help them learn how to use your extension. } welcome_message %Q{ This is a message that users will see after they install this pattern. Use this to tell users what to do next. } You may also see some real manifest files here: * [blueprint](http://github.com/chriseppstein/compass/blob/master/frameworks/blueprint/templates/project/manifest.rb) * [compass-css-lightbox](http://github.com/ericam/compass-css-lightbox/blob/master/templates/project/manifest.rb) ### Manifest Declarations **Easy Mode:** If you just have some basic files and nothing fancy going on, simply place this line in your manifest: discover :all If the file is missing `discover :all` is the default This will cause compass to find all the files in your template and use the files' extension to determine where they should go. Alternatively, you can request that compass only discover files of a certain type. For example, the following will only discover javascript and image assets, you could then declare other file types on your own. discover :javascripts discover :images The following types may be discovered: `:stylesheets`, `:images`, `:javascripts`, `:fonts`, `:html`, `:files`, and `:directories` **Normal Mode:** There are seven kinds of manifest declarations: 1. `stylesheet` - Declares a sass file. 2. `image` - Declares an image. 3. `javascript` - Declares a javascript file. 4. `font` - Declares a font file. 5. `html` - Declares an html file. 6. `file` - Declares a random file. 7. `directory` - Declares a directory should be created. All declarations take the path to the file as their first argument. Note that the normal slash `/` can and should be used in a manifest. Compass will take care of the cross platform issues. The path to the file will be reproduced in the user's project, so please keep that in mind when creating folders. The location where files are going to be installed is dictated by the user's project configuration, however, a template can place things into subdirectories relative to those locations. Common options: * `:erb` - When set to true, the file will be processed via the ERB templating language. See the "Advanced Manifests" section below for more details. * `:to` - The location where the file should be installed relative to the type-specific location. * `:like` - Most often used with a `file` declaration, this option allows you to install into the location of another manifest type (and also :css). E.g. :like => :css Stylesheet options: * `:media` - this is used as a hint to the user about the media attribute of the stylesheet link tag. * `:condition` - this is used to hint the user that a conditional comment should be used to import the stylesheet with the given condition. Directory options: * `:within` - where the directory should be created. If omitted, the directory will be relative to the project directory. Can be one of: the following * `sass_dir` * `javascripts_dir` * `fonts_dir` * `images_dir` HTML files: You can provide html as haml or as plain html. If you provide haml, the haml will be converted to html when it is installed, unless the project allows haml files. Providing html files is usually done to demonstrate how to use a more complicated design and to get the user started off with working product. ### Advanced Manifests and Templates * ERB Processing - This can be used to customize the contents of the file in an extension template. The template will be processed in the context of a TemplateContext instance, which gives you access to the full project configuration information as well as the command line options. Since it's unlikely many templates will need this functionality, I leave it as an exercise of the user to figure it out and if they can't to contact the compass-devs mailing list for assistance. * `no_configuration_file!` - calling this method within the manifest will tell the installer to skip the creation of a configuration file. * `skip_compilation!` - calling this method within the manifest will tell the installer to skip compilation of sass files to css. Distributing Extensions as Ruby Gems ------------------------------------ Rubygems is a flexible, easy-to-use system for distributing ruby software. If you have any questions about rubygems, I suggest that you start looking for help [here](http://help.rubygems.org/). The big advantages of using rubygems to distribute your extension is that it allows your extension to be a dependency for other projects and that each install is versioned, which makes supporting your extension easier. If distributing as a rubygem, it is a good idea to have a file `compass-.rb` in your lib directory that registers the compass framework. This will allow compass to automatically require the framework from within rubygems. Tips for Developing Extensions ------------------------------ * If you're developing a simple extension, you may find it convenient to place your extension within an existing compass project in the extension folder. * Never specify an extension in your imports as this can cause issue when the syntax of a file changes. Packaging an Extension as a RubyGem ----------------------------------- You do not _have_ to make your extension a ruby gem. But if you do, you get some benefits you would not have otherwise: * Releases * Versions * A standard way of asking your users what release they are using. * Better integration with ruby-based projects via tools like [Bundler](http://gembundler.com/). ### Creating a Gem Before you begin, please ensure you have gem version `1.3.6` or greater. `gem -v` will tell you the currently installed version. 1. Define your gemspec file at the top of your extension. Here's [an example of one](http://github.com/ericam/compass-css-lightbox/blob/master/css-lightbox.gemspec). The gemspec should have the same name as your gem. 2. Register your framework by adding `lib/my_extension.rb` and registering it: require 'compass' extension_path = File.expand_path(File.join(File.dirname(__FILE__), "..")) Compass::Frameworks.register('my_extension', :path => extension_path) This is how compass knows where to find your extension's files when a user requires it. For more options, go back up and read about [Stylesheet and Template Locations](#registration). 3. Build a gem: `gem build my_extension.gemspec`. This will build your gem file and add the current version to the name. E.g. `my_extension-0.0.1.gem` 4. Test your gem by installing it locally: `gem install my_extension-0.0.1.gem` ### Releasing a Gem The ruby community is nice and will host your gem files for free. To release your gem: gem push my_extension-0.0.1.gem Your ruby gem will be hosted on [rubygems.org](http://rubygems.org/). Please familiarize yourself with [their documentation](http://rubygems.org/pages/gem_docs). Installing Extensions ===================== How extensions are installed varies according to the decisions you make about how you are packaging and releasing your gem. There will be a standard approach in a future release, but until then, it is suggested that you provide your users with succinct installation instructions. Installing Extensions Released as RubyGems ------------------------------------------ When creating a new project: sudo gem install my_extension compass create my_project -r my_extension --using my_extension The `-r` option is annoying and will not be needed in a future version of compass. But for now, it tells compass to find and load the extension from the local rubygems repository. To install via rubygems into an existing project: gem install my_extension # edit the project configuration file and add: require 'my_extension' compass install my_extension Or if you have other patterns besides the project pattern: compass install my_extension/pattern Installing Ad-hoc Extensions ---------------------------- Ad-hoc extensions are any set of files and folders following the basic conventions described above. They could be installed via a zip file or by checking the code out from source control. Ad-hoc extensions will be automatically found in the extensions directory of a project and registered for import without needing a `require` statement in the compass configuration file. Currently, ad-hoc extensions can only be installed into the extensions directory of an existing compass project. This will be fixed in a future release of compass. Until then, you may need to instruct your users to create a bare project to get started: compass create my_project --bare This will create a project directory, a sass directory (with no sass files) and a configuration file. The standard location for extensions is `project_root/extensions` for stand-alone projects and `project_root/vendor/plugins/compass_extensions` for rails projects. Additionally, the user may customize their extensions directory by setting `extensions_dir` in their compass configuration file. To install into an existing project, simply place the extension into a project's extension directory. This could be done via a git clone or by extracting an archive. The name of the directory it creates should be the name of the extension. The project will now have access to the extension. Verifying that an Extension is Installed Correctly -------------------------------------------------- The user can verify that they have access to your extension by typing: compass help And they should see the framework in the list of available frameworks. Alternatively, if you've provided a `help` message in the manifest, then the user can type: compass help my_extension - or - compass help my_extension/pattern_name *Note:* The user might need to provide the `-r` option to help in order for compass to find a gem-based extension before a project exists. This is not needed for extensions installed into the extensions directory, or if the project is already required in the current directory's project configuration. ================================================ FILE: compass-style.org/content/help/tutorials/integration.markdown ================================================ --- title: Application Integration layout: tutorial crumb: Application Integration classnames: - tutorial --- # Application Integration ## Ruby on Rails ### Rails 3.1 Just add compass to your Gemfile like so: gem 'compass' Also checkout this [gist](https://gist.github.com/1184843) ### Rails 3 compass init rails /path/to/myrailsproject ### Rails 2.3 rake rails:template LOCATION=http://compass-style.org/rails/installer ## Sinatra require 'compass' require 'sinatra' require 'haml' configure do set :haml, {:format => :html5} set :scss, {:style => :compact, :debug_info => false} Compass.add_project_configuration(File.join(settings.root, 'config', 'compass.rb')) end get '/stylesheets/:name.css' do content_type 'text/css', :charset => 'utf-8' scss :"stylesheets/#{params[:name]}", Compass.sass_engine_options end get '/' do haml :index end This assumes you keep your Compass config file in `config/compass.rb`. If you keep your stylesheets in “views/stylesheets/” directory instead of just “views/”, remember to update `sass_dir` configuration accordingly. Check out this [sample compass-sinatra project](http://github.com/chriseppstein/compass-sinatra) to get up and running in no time! [Sinatra Bootstrap](http://github.com/adamstac/sinatra-bootstrap) - a base Sinatra project with support for Haml, Sass, Compass, jQuery and more. ## nanoc ### Minimal integration: just drop it in One simple route for lightweight integration is to simply install compass inside nanoc. Then edit `config.rb` to point to the stylesheets you want to use. This means you have to have the Compass watch command running in a separate window from the Nanoc compilation process. Example project that works this way: [unthinkingly](http://github.com/unthinkingly/unthinkingly-blog). ### More formal integration At the top of the Nanoc Rules file, load the Compass configuration, like this: require 'compass' Compass.add_project_configuration 'compass.rb' # when using Compass > 0.10 sass_options = Compass.sass_engine_options # when using Compass > 0.10 Compass.configuration.parse 'compass.rb' # when using Compass < 0.10 sass_options = Compass.config.to_sass_engine_options # when using Compass < 0.10 Then create a `compass.rb` file in your site's root folder and add your Compass configuration. An example configuration could look like this: http_path = "/" project_path = File.expand_path(File.join(File.dirname(__FILE__), '..')) css_dir = "output/stylesheets" sass_dir = "content/stylesheets" images_dir = "assets/images" javascripts_dir = "assets/javascripts" fonts_dir = "assets/fonts" http_javascripts_dir = "javascripts" http_stylesheets_dir = "stylesheets" http_images_dir = "images" http_fonts_dir = "fonts" You may need to change the path to some directories depending on your directory structure and the setup in your Rules file. To filter the stylesheets using Sass and Compass, call the sass filter with Sass engine options taken from Compass, like this: compile '/stylesheets/*' do filter :sass, sass_options.merge(:syntax => item[:extension].to_sym) end ### nanoc projects using the formal approach * [This Site](https://github.com/chriseppstein/compass/tree/stable/compass-style.org) ================================================ FILE: compass-style.org/content/help/tutorials/production-css.markdown ================================================ --- title: Production Stylesheets layout: tutorial classnames: - tutorial --- Production Stylesheets ====================== See the [Configuration Reference](/help/tutorials/configuration-reference/) for a complete list of available configuration options. Strategies for Compiling Stylesheets for Production --------------------------------------------------- **Option A:** Use the compass production defaults. compass compile -e production --force *Note:* This only changes the compass defaults, options you've specified explicitly in your configuration will not be changed. **Option B:** Override your configuration file settings on the command line compass compile --output-style compressed --force **Option C:** Create a separate configuration file for production cp config.rb prod_config.rb ..edit prod_config.rb to suit your needs.. compass compile -c prod_config.rb --force ================================================ FILE: compass-style.org/content/help/tutorials/spriting/customization-options.markdown ================================================ --- title: Sprite Customization layout: tutorial crumb: Customization classnames: - tutorial --- #Sprite Tutorial <%= sprite_tutorial_links %> ## Customization Options ### Options Applying to All Sprite Maps These options allow you to customize the behavior of all sprites referenced in your stylesheet. In many cases, there's a configuration option that allows you to change the default for that sprite map or even an individual sprite image. **NOTE:** These configuration options must be set **before** you import the sprites. * `$sprite-selectors` - Which interaction states should be considered for creating [magic sprite selectors](/help/tutorials/spriting/magic-selectors/). * `$disable-magic-sprite-selectors` - Set to `true` to turn off magic selectors. Defaults to `false`. * `$default-sprite-separator` - Defaults to a dash. You can set this to an underscore (`"_"`) if you're one of *those* people. ### Options per Sprite Map When constructing the sprite map, the entire sprite map and its associated stylesheet can be configured in the following ways. Each option is specified by setting a [configuration variable](/help/tutorials/configurable-variables/) before importing the sprite. The variables are named according to the name of the folder containing the sprites. In the examples below the sprites were contained within a folder called `icon`. * `$-spacing` -- The amount of transparent space, in pixels, around each sprite. Defaults to `0px`. E.g. `$icon-spacing: 20px`. * `$-repeat` -- Whether or not each sprite should repeat along the x axis. Defaults to `no-repeat`. E.g. `$icon-repeat: repeat-x`. * `$-position` -- The position of the sprite in the sprite map along the x-axis. Can be specified in pixels or percentage of the sprite map's width. `100%` would cause the sprite to be on the right-hand side of the sprite map. Defaults to `0px`. E.g. `$icon-position: 100%`. * `$-sprite-dimensions` -- Whether or not the dimensions of the sprite should be included in each sprite's CSS output. Can be `true` or `false`. Defaults to `false`. * `$-sprite-base-class` -- The base class for these sprites. Defaults to `.-sprite`. E.g. `$icon-sprite-base-class: ".action-icon"` * `$-clean-up` -- Whether or not to removed the old sprite file when a new one is created. Defaults to true * `$-class-separator` -- If you set this to an underscore (`"_"`) then all the generated selectors for this sprite will use underscores instead dashes. To change this value for all sprites, set `$default-sprite-separator` to an underscore. ### Options per Sprite When constructing the sprite map, each sprite can be configured in the following ways: * `$--spacing` -- The amount of transparent space, in pixels, around the sprite. Defaults to the sprite map's spacing which defaults to `0px`. E.g. `$icon-new-spacing: 20px`. * `$--repeat` -- Whether or not the sprite should repeat along the x axis. Defaults to the sprite map's repeat which defaults to `no-repeat`. E.g. `$icon-new-repeat: repeat-x`. * `$--position` -- The position of the sprite in the sprite map along the x-axis. Can be specified in pixels or percentage of the sprite map's width. `100%` would cause the sprite to be on the right-hand side of the sprite map. Defaults to the sprite map's position value which defaults to `0px`. E.g. `$icon-new-position: 100%`. ================================================ FILE: compass-style.org/content/help/tutorials/spriting/magic-selectors.markdown ================================================ --- title: Sprite Magic Selectors layout: tutorial crumb: Magic Selectors classnames: - tutorial --- # Sprite Tutorial <%= sprite_tutorial_links %> ## Magic Selectors If you want to add selectors for your sprites, it's easy todo by adding `_active` `_target` or `_hover` to the file name, In the example below we have a sprite directory that looks like: * note you can use `-` in file names also ex. `glossy-active.png` * * `my-buttons/glossy.png` * `my-buttons/glossy_hover.png` * `my-buttons/glossy_active.png` * `my-buttons/glossy_target.png` Now in our sass file we add: @import "my-buttons/*.png"; a { @include my-buttons-sprite(glossy) } And your stylesheet will compile to: .my-buttons-sprite, a { background: url('/my-buttons-sedfef809e2.png') no-repeat; } a { background-position: 0 0; } a:hover, a.glossy_hover, a.glossy-hover { background-position: 0 -40px; } a:target, a.glossy_target, a.glossy-target { background-position: 0 -60px; } a:active, a.glossy_active, a.glossy-active { background-position: 0 -20; } Alternatively you can use the `@include all-my-buttons-sprites;` after the import and get the following output: .my-buttons-sprite, .my-buttons-glossy { background: url('/my-buttons-sedfef809e2.png') no-repeat; } .my-buttons-glossy { background-position: 0 0; } .my-buttons-glossy:hover, .my-buttons-glossy.glossy_hover, .my-buttons-glossy.glossy-hover { background-position: 0 -40px; } .my-buttons-glossy:target, .my-buttons-glossy.glossy_target, .my-buttons-glossy.glossy-target { background-position: 0 -60px; } .my-buttons-glossy:active, .my-buttons-glossy.glossy_active, .my-buttons-glossy.glossy-active { background-position: 0 -20px; } ## Disabling To disable this feature set `$disable-magic-sprite-selectors` to true before calling the sprite mixin a { $disable-magic-sprite-selectors:true; @include my-buttons-sprite(glossy) } ================================================ FILE: compass-style.org/content/help/tutorials/spriting/sprite-layouts.markdown ================================================ --- title: Sprite layouts layout: tutorial crumb: Sprite layouts classnames: - tutorial --- # Sprite Tutorial <%= sprite_tutorial_links %> ## Sorting Default is `none` sprites will be orderd however they are recived from the file system You can sort by: * width * height * size * name * none Example $my-sprite-sort-by : 'width'; Default search direction is acending if you wish to sort decending prepend a `!` $my-sprite-sort-by : '!width'; ## Sprite Layouts Example: $icon-layout:horizontal; @import "icon/*.png"; $dropcap-layout:diagonal @import "dropcap/*.png"; ## Vertical @import "mysprite/*.png"; Example Output: ![Vertical Example](/images/tutorials/sprites/layout/vert.png) ## Horizontal $mysprite-layout:horizontal; @import "mysprite/*.png"; Example Output: ![Horizontal Example](/images/tutorials/sprites/layout/horizontal.png) Notes: * Responds to the same configuration options that vertical has. ## Diagonal $mysprite-layout:diagonal; @import "mysprite/*.png"; Example Output: ![Diagonal Example](/images/tutorials/sprites/layout/diagonal.png) Notes: * Configuration options do not effect the layout * This is incredibly resource intensive on the browser ## Smart $mysprite-layout:smart; @import "mysprite/*.png"; Example Output: ![Smart Example](/images/tutorials/sprites/layout/smart.png) Notes: * Configuration options do not effect the layout * Most efficient use of browser memory Example icons from [Open Icon Library](http://openiconlibrary.sourceforge.net/) and are released under public domain ================================================ FILE: compass-style.org/content/help/tutorials/spriting.markdown ================================================ --- title: Spriting with Compass layout: tutorial crumb: Spriting classnames: - tutorial --- # Spriting with Compass Spriting has never been easier than it is with Compass. You place the sprite images in a folder, import them into your stylesheet, and then you can use the sprite in your selectors in one of several convenient ways. ****Note**: Only PNG images are supported at this time using [`chunky_png`](https://github.com/wvanbergen/chunky_png)[*](#Oily-PNG). ## Sprite Tutorial Contents <%= sprite_tutorial_links(true) %> ## Setup For this tutorial, let's imagine that in your project's image folder there are four icons: * `images/my-icons/new.png` * `images/my-icons/edit.png` * `images/my-icons/save.png` * `images/my-icons/delete.png` Each is an icon that is 32px square. ## Basic Usage ****Note**: The use of `my-icons` is only for this example, "my-icons" represents the folder name that contains your sprites. The simplest way to use these icon sprites is to let compass give you a class for each sprite: @import "compass/utilities/sprites"; @import "my-icons/*.png"; @include all-my-icons-sprites; And you'll get the following CSS output: .my-icons-sprite, .my-icons-delete, .my-icons-edit, .my-icons-new, .my-icons-save { background: url('/images/my-icons-s34fe0604ab.png') no-repeat; } .my-icons-delete { background-position: 0 0; } .my-icons-edit { background-position: 0 -32px; } .my-icons-new { background-position: 0 -64px; } .my-icons-save { background-position: 0 -96px; } You can now apply the `my-icons-XXX` classes to your markup as needed. Let's go over what happened there. The import statement told compass to [generate a stylesheet that is customized for your sprites](https://gist.github.com/729507). This stylesheet is [magic](#magic-imports), it is not written to disk, and it can be customized by setting configuration variables before you import it. See the page on [Customization Options](/help/tutorials/spriting/customization-options/). The goal of this stylesheet is to provide a simple naming convention for your sprites so that they are easy to remember and use. You should never have to care what is the name of the generated sprite map, nor where a sprite is located within it. ## Nested Folders ****Note**: The use of `orange` is only for this example, "orange" represents the folder name that contains your sprites. Sprites stored in a nested folder will use the last folder name in the path as the sprite name. Example: @import "themes/orange/*.png"; @include all-orange-sprites; ## Selector Control ****Note**: The use of `my-icons` is only for this example, "my-icons" represents the folder name that contains your sprites. If you want control over what selectors are generated, it is easy to do. In this example, this is done by using the magic `my-icons-sprite` mixin. Note that the mixin's name is dependent on the name of the folder in which you've placed your icons. @import "my-icons/*.png"; .actions { .new { @include my-icons-sprite(new); } .edit { @include my-icons-sprite(edit); } .save { @include my-icons-sprite(save); } .delete { @include my-icons-sprite(delete); } } And your stylesheet will compile to: .my-icons-sprite, .actions .new, .actions .edit, .actions .save, .actions .delete { background: url('/images/my-icons-s34fe0604ab.png') no-repeat; } .actions .new { background-position: 0 -64px; } .actions .edit { background-position: 0 -32px; } .actions .save { background-position: 0 -96px; } .actions .delete { background-position: 0 0; } ## Sass Functions ****Note**: The use of `my-icons` is only for this example, "my-icons" represents the folder name that contains your sprites. Getting the image dimensions of a sprite You can get a unit value by using the magical dimension functions `-sprite-height` and `-sprite-width` If you are looking to just return the dimensions see the [docs](/reference/compass/utilities/sprites/base/#mixin-sprite-dimensions) Example: @import "my-icons/*.png"; $box-padding: 5px; $height: my-icons-sprite-height(some_icon); $width: my-icons-sprite-width(some_icon); .somediv { height:$height + $box-padding; width:$width + $box-padding; } ## Magic Imports ****Note**: The use of `my-icons` is only for this example, "my-icons" represents the folder name that contains your sprites. As noted above, compass will magically create sprite stylesheets for you. Some people like magic, some people are scared by it, and others are curious about how the magic works. If you would like to avoid the magic, you can use compass to generate an import for you. On the command line: compass sprite "images/my-icons/*.png" This will create file using your project's preferred syntax, or you can specify the output filename using the `-f` option and the syntax will be inferred from the extension. If you do this, you'll need to remember to regenerate the import whenever you rename, add, or remove sprites. Using the magic imports is recommended for most situations. But there are times when you might want to avoid it. For instance, if your sprite map has more than about 20 to 30 sprites, you may find that hand crafting the import will speed up compilation times. See the section on [performance considerations](#performance) for more details. ## Performance Considerations Reading PNG files and assembling new images and saving them to disk might have a non-trivial impact to your stylesheet compilation times. Especially for the first compile. Please keep this in mind. ## Large numbers of sprites The magic stylesheet can get very large when there are large numbers of sprites. 50 sprites will cause there to be over 150 variables created and then passed into the `sprite-map` [function](/reference/compass/helpers/sprites/#sprite-map). You may find that customizing the sprite function call to only pass those values that you are overriding will provide a small performance boost. See a [concrete example](https://gist.github.com/747970). ## Oily PNG Compass generates PNG files using a pure-ruby library called [`chunky_png`](https://github.com/wvanbergen/chunky_png). This library can be made faster by installing a simple C extension called [`oily_png`](https://github.com/wvanbergen/oily_png). Add it to your `Gemfile` if you have one in your project: gem 'oily_png' Or install the Rubygem: gem install oily_png Compass will automatically detect its presence. ================================================ FILE: compass-style.org/content/help/tutorials/testing.markdown ================================================ --- title: Testing Your Stylesheets layout: tutorial crumb: Testing classnames: - tutorial --- # Test Unit require 'compass/test_case' class StylesheetsTest < Compass::TestCase def test_stylesheets my_sass_files.each do |sass_file| assert_compiles(sass_file) do |result| assert_not_blank result end end end protected def my_sass_files Dir.glob(File.expand_path(File.join(File.dirname(__FILE__), "../..", "app/stylesheets/**/[^_]*.sass"))) end end ================================================ FILE: compass-style.org/content/help/tutorials/upgrading/antares.markdown ================================================ --- title: Compass v0.11 Upgrade layout: tutorial crumb: Upgrading to v0.11 classnames: - tutorial --- # Upgrading to the Compass Antares Release (v0.11) Many mixins and certain uses of mixins have been deprecated, but your existing stylesheets should still work out of the box with one exception: users who are using the `css3/transform` module should update their imports to import `css/transform-legacy` when they upgrade. They should then upgrade to the new `css/transform` module at their convenience. You should read about what changed, update your stylesheets accordingly and then update your imports to the new version. ## Box Shadow You may get a deprecation warning using the `box-shadow` mixin. You can resolve this in one of the following ways: 1. Change your use of the `box-shadow` and instead use `single-box-shadow`. This mixin has the same behavior and arguments as the old `box-shadow` mixin. 2. Keep using `box-shadow`, change how you pass the arguments. The new `box-shadow` takes up to 10 comma-delimited shadows. Each shadow is how the values should appear in the CSS (space separated). ## Text Shadow You may get a deprecation warning using the `text-shadow` mixin. You can resolve this in one of the following ways: 1. Change your use of the `text-shadow` and instead use `single-text-shadow`. This mixin has the same behavior and arguments as the old `text-shadow` mixin. 2. Keep using `text-shadow`, change how you pass the arguments. The new `text-shadow` takes up to 10 comma-delimited shadows. Each shadow is how the values should appear in the CSS (space separated). ## CSS Transforms The transform module was largely re-written to support 3D transforms. If you are using it, it is suggested that you read the [new module's documentation][new_transform] and adjust your code appropriately. Many mixin names and constants have changed. For your convenience, the [old CSS transform module][old_transform] can still be imported, but it is deprecated and will be removed in the next release. ## Gradients The Compass gradient support now more closely emulates the CSS3 specification of how gradients are represented and passed around. The `linear-gradient` and `radial-gradient` mixins have been deprecated and instead, you should use the `linear-gradient()` and `radial-gradient()` functions in conjunction with mixins for the [properties that support gradients][image_stylesheet] like `background` / `background-image`, `border-image`, `list-style` / `list-style-image`, and `content`. After upgrading, you'll receive deprecation warnings for your usage of the old gradient mixins and a suggested replacement value for each. If you'd rather keep the old mixins in your project for convenience, just copy the following to your project after changing your imports: @mixin radial-gradient($color-stops, $center-position: center center, $image: false) { @include background-image($image, radial-gradient($center-position, $color-stops)); } @mixin linear-gradient($color-stops, $start: top, $image: false) { @include background-image($image, linear-gradient($start, $color-stops)); } Or for sass files: =radial-gradient($color-stops, $center-position: center center, $image: false) +background-image($image, radial-gradient($center-position, $color-stops)) =linear-gradient($color-stops, $start: top, $image: false) +background-image($image, linear-gradient($start, $color-stops)) ## Typography Module With the addition of vertical-rhythms to the compass core, we have created a new [typography module][typography_module], and moved several items that were formerly listed as "utilities" into it. The moved modules are "links", "lists" and "text". These will all remain part of the basic compass include, but if you were including them individually in your stylesheets, you will need to adjust the include paths as follows: * "compass/utilities/links" becomes "compass/typography/links" * "compass/utilities/lists" becomes "compass/typography/lists" * "compass/utilities/text" becomes "compass/typography/text" [new_transform]: /reference/compass/css3/transform/ [old_transform]: /reference/compass/css3/transform-legacy/ [image_stylesheet]: /reference/compass/css3/images/ [typography_module]: /reference/compass/typography/ ================================================ FILE: compass-style.org/content/help/tutorials/upgrading/im-scared.markdown ================================================ --- title: I'm Scared to Upgrade layout: tutorial crumb: Scared to Upgrade? classnames: - tutorial --- # I'm scared to upgrade. Why? Don't ya trust me? I won't break your stylesheets. Cross my heart. All those 200+ github issues were feature requests. Honest. But you know, they might change a little. Probably not in any meaningful way. Like a default that used to be specified in the output might be omitted because it's the browser default anyway. ## Trust but verify. But you should probably keep me on my toes. Follow these simple steps to see what changed to your stylesheets: *(Steps beginning with a $ are command line commands. Don't type the $.)* 1. $ cd my_compass_project 2. $ compass compile --force 3. $ cp -r stylesheets stylesheets.backup 4. $ gem install compass # you might need to type sudo first if you're on mac or linux. 5. $ compass compile --force 6. Take note of any deprecation warnings printed in red during the compile. 7. If you have textmate and installed the `mate` command line tool:
$ diff -r stylesheets.backup stylesheets | mate 8. If you have not installed the `mate` tool:
$ sudo ln -s /Applications/TextMate.app/Contents/Resources/mate /usr/local/bin/mate Then perform step 7. 9. If you do not have Textmate, run the diff command like so: $ diff -y -r stylesheets.backup stylesheets | less 10. Scroll or use your arrow keys to review the differences between the files. 11. If you're satisfied: $ git commit -a -m "Upgraded compass" 12. If you're scared again: 1. Don't panic. 2. Read the [CHANGELOG](http://compass-style.org/CHANGELOG/) and see if the changes are explained there. 3. Send an email to the [mailing list](http://groups.google.com/group/compass-users) explaining the problem and providing enough context like snippets from your diff and the relevant snippets of your sass/scss files. In rare cases we might request that you construct a simple compass project that exhibits the issue and make an archive of it and send us an email with it attached. 4. If it's pretty obviously a bug. Please file an issue on [github](http://github.com/chriseppstein/compass/issues). If you're experiencing a crash, please run the command with the --trace option and record the output for diagnostic purposes. 5. $ sudo gem uninstall compass Select the newest version of compass. You have now downgraded to the old version of compass. 6. $ compass compile --force 7. Diff the folders as in steps 7 through 9. 13. Breathe a sigh of relief. ================================================ FILE: compass-style.org/content/help/tutorials/upgrading/lemonade_upgrade_guide.markdown ================================================ --- title: Lemonade Upgrade Guide layout: tutorial crumb: Lemonade Upgrade classnames: - tutorial --- # Lemonade Upgrade Guide ## Example 1 ### Lemonade .logo { background: sprite-image("lemonade/lemonade-logo.png"); } .lime { background: sprite-image("lemonade/lime.png"); } .coffee { background: sprite-image("other-drinks/coffee.png") no-repeat; } ### Compass @import "lemonade/*.png"; @import "other-drinks/*.png" @include all-lemonade-sprites; @include all-other-drinks-sprites; Compass will return class names `.lemonade-logo`, `.lemonade-lime`, `.other-drinks-coffee` # Example 2 ### Lemonade .lemonade-example-1 { background: sprite-image("lemonade/example-1/blue-10x10.png", 10px, 2px); } ### Compass With compass you need to flatten the image directory to be `images/lemonade` instead of `images/lemonade/example-1` @import "lemonade/*.png" .lemonade-example-1 { @include lemonade-sprite(blue-10x10, true, 10px, 2px); background-color: yellow; } ================================================ FILE: compass-style.org/content/help/tutorials/upgrading.markdown ================================================ --- title: Upgrading Compass layout: tutorial crumb: Upgrading classnames: - tutorial --- Upgrading Compass ================= So a new version of compass is out and you'd like to upgrade, but you're not sure how. Well you've come to the right place. There's a few things you should know. 1. **What is my currently installed compass version?** You can find out your compass version by running `compass version` on the command line. 2. **What is the latest compass version?** The latest version of compass is proudly displayed [here](https://rubygems.org/gems/compass).
![rubygems](http://img.skitch.com/20101116-xkd9mtmqearh5mwhca33pa5yyy.png) 3. **What is the latest preview release?** There's not always a preview release, but when there is, you can see the latest version [here](https://rubygems.org/gems/compass)
![rubygem versions](http://img.skitch.com/20101116-d3j5hf8ishb9x5249et8b6i23i.png) 4. Compass keeps a very detailed list of changes in every release. You can read the [changelog](/CHANGELOG/) to get up to speed on what has changed. If you're scared to upgrade, that's silly. Read [this](./im-scared/). ================================================ FILE: compass-style.org/content/help/tutorials.haml ================================================ --- title: Compass Tutorials crumb: Tutorials classnames: - tutorial layout: tutorial --- %h1 Compass Tutorials :markdown These tutorials are still a work-in-progress, if you have questions that aren't covered here let us know on the [Compass users mailing list](http://groups.google.com/group/compass-users) where there are lots of friendly Compass users standing by to help you out. ## New to Compass? If you're new to Compass, you might be interested in [best practices](/help/tutorials/best_practices/), the [configuration reference](/help/documentation/configuration-reference/), [configurable variables](/help/tutorials/configurable-variables/), or the [command line documentation](/help/documentation/command-line/). ## Want to contribute? If you've been using Compass for a while and you'd like to give back, check out the tutorials on [contributing](/help/tutorials/contributing/) and [creating extensions](/help/tutorials/extensions/). ================================================ FILE: compass-style.org/content/index/functions.haml ================================================ --- title: Compass Documentation | All Functions crumb: Docs body_id: home --- %article %h1#logo Sass Based Functions - all_functions.sorted_and_grouped_by_name{|f| f.last.name }.each do |(group, functions)| %h3= group %ul - functions.each do |(i, f)| %li %a{:href=>"#{i.path}#function-#{f.name}"}= f.sass_signature(:html) - sass_function_list = [] %h1#logo All Ruby Based Functions %h3 Compass Functions %ul - Sass::Script::Functions.public_instance_methods.sort_by{|m| m.to_s}.each do |m| - name = m.to_s.gsub("_","-") - unless name =~ /^\-compass/ # Private Fuctions! - if i = item_for_function_name(name) %li %a{:href=>"#{i.path}##{name}"}= name - elsif sass_functions().include? m - sass_function_list << '%s' % [m.to_s, name] - else %li = name %h3 Sass Functions %ul - sass_function_list.each do |m| %li= m ================================================ FILE: compass-style.org/content/index/mixins.haml ================================================ --- title: Compass Documentation | All Mixins crumb: Docs body_id: home --- %article %h1#logo Compass Mixins - all_mixins.sorted_and_grouped_by_name{|m| m.last.name }.each do |(group, mixins)| %h3= group %ul - mixins.each do |(i, m)| %li %a{:href=>"#{i.path}#mixin-#{m.name}"}= m.sass_signature(:none, :html) ================================================ FILE: compass-style.org/content/index/variables.haml ================================================ --- title: Compass Documentation | All Variables crumb: Docs body_id: home --- %article %h1#logo Compass Variables - all_constants.sorted_and_grouped_by_name{|v| v.last.name }.each do |(group, variables)| %h3= group %ul - variables.each do |(i, v)| %li %a{:href=>"#{i.path}#const-#{v.name}"}= "$" + v.name ================================================ FILE: compass-style.org/content/index.haml ================================================ --- title: Compass Home crumb: Home body_id: home layout: homepage --- %h1#logo Compass %h2 Compass is an open-source CSS Authoring Framework. .overview .info-box.compass %h4 Why designers love Compass. %ol %li Experience cleaner markup without presentational classes. %li It’s chock full of the web’s best reusable patterns. %li It makes creating sprites a breeze. %li Compass mixins make CSS3 easy. %li Create beautiful typographic rhythms. %li Download and create extensions with ease. .info-box.sass %h4 Compass uses Sass. %p Sass is an extension of CSS3 which adds nested rules, variables, mixins, selector inheritance, and more. Sass generates well formatted CSS and makes your stylesheets easier to organize and maintain. = render 'partials/ad' %h3 Brilliant people use Compass, including these wildly talented folks: %ul#featured_sites %li %a(href="http://linkedin.com/") %img(src="/images/sites/linkedin.png") %span.title LinkedIn %span.url http://linkedin.com/ %li %a(href="http://status.heroku.com/") %img(src="/images/sites/status.heroku.jpg") %span.title Heroku Addons %span.url http://status.heroku.com %li %a(href="http://sencha.com/products/touch/") %img(src="/images/sites/sencha.jpg") %span.title Sencha Touch %span.url http://sencha.com/products/touch %li %a(href="http://caring.com/") %img(src="/images/sites/caring.jpg") %span.title Caring.com %span.url http://caring.com %li %a(href="http://hubblesite.org/") %img(src="/images/sites/hubblesite.jpg") %span.title HubbleSite %span.url http://hubblesite.org %li %a(href="http://dailymile.com/") %img(src="/images/sites/dailymile.jpg") %span.title DailyMile %span.url http://dailymile.com %li %a(href="http://cofamilies.com/") %img(src="/images/sites/cofamilies.jpg") %span.title Cofamilies %span.url http://cofamilies.com %li %a(href="http://jumpstartlab.com") %img(src="/images/sites/jumpstartlab.jpg") %span.title Jumpstart Lab %span.url http://jumpstartlab.com %li %a(href="http://busyconf.com/") %img(src="/images/sites/busyconf.jpg") %span.title BusyConf %span.url http://busyconf.com %section.book %h3 Save 37% on the Book: (Currently In Beta) %p %a(href="http://www.manning.com/netherland/") %img(src="http://www.manning.com/netherland/netherland_cover150.jpg" alt="Sass & Compass in Action") Compliments of Manning.com is a standing 37% discount on Sass and Compass in Action. Use promo code sasscomp37 at manning.com on the MEAP, eBook and pBook of Sass and Compass in Action. All pBook purchases include free eFormats (PDF, ePub, and Kindle) as soon as available. %section.gui %h3 Hate the Command Line? %a(href="http://compass.handlino.com/") %img(src="/images/compass.app.png") %p Buy Compass.app for Windows and Mac for just $10. %p.note Note: Compass.app is a product of Handlino, Inc but 30% of all proceeds go to Compass's charity of choice: UMDF.org. ================================================ FILE: compass-style.org/content/install.haml ================================================ --- title: Install the Compass Stylesheet Authoring Framework crumb: Install body_id: install --- - content_for :javascripts do %script(src="/javascripts/install.js") %h2 Installing Ruby %p Compass runs on any computer that has ruby installed. %p For more advanced users you may want to install rvm. %h2 Setting up the ruby environment %ol %li $ gem update --system %li $ gem install compass %h2 Looking for the next release's preview version? %p To install the preview version of Compass: %ol %li gem install compass --pre %h2 Tell us about your project and we'll help you get it set up: %blockquote.madlib.customizable< I would like to set up my %select#existence %option{:value => "create"} new %option{:value => "init"} existing %select#app-type %option{:value => "stand-alone"} compass %option{:value => "rails"} rails %option{:value => "other"} other project %span.creating named %input#project_name(placeholder="") with %select#framework %option{:value => "compass"} compass's %option{:value => "bare"} no starter stylesheets. %br I prefer the %select#syntax %option{:value => "scss"} CSS based (SCSS) %option{:value => "sass"} Indent based (Sass) syntax and would like to %select#options %option{:value => "default"} use compass's recommended %option{:value => "customized"} customize my project's directory structure. %h4 Thanks. Now run the following steps in your terminal: %p.note Terminal newbies, read the Designer’s Guide to the OSX Command Prompt first! #steps Loading... %p.note Note: $ is a placeholder for your terminal's prompt. You don't type it. %h4 Then follow the instructions that compass provides in the output. %h2 Hate the Command Line? %p Try one of these Community supported GUI applications: %ul %li Compass.app from Handlino. %li Scout from Mutually Human. %h2 Next Steps %ul %li %a(href="http://sass-lang.com" target="_blank") Learn about Sass %li %a(href="/help/tutorials/") Read our tutorials %li %a(href="/reference/compass/") Study the reference documentation ================================================ FILE: compass-style.org/content/posts/2011-04-24-v011-release.markdown ================================================ --- title: "Compass v0.11 is Released!" description: "Months in the making, Compass v0.11 continues to revolutionize CSS Frameworks." author: chris --- The Compass team is proud to announce that v0.11 is released. With this release, Compass & Sass continue to revolutionize the world of CSS Frameworks bringing never-before-seen features and unmatched simplicity, quality, and flexibility to your stylesheets. In this post, we summarize the new features. For all the nitty gritty details, see the [CHANGELOG](/CHANGELOG/). Compass is Charityware. If you love this release, [please donate to the UMDF](http://umdf.org/compass) on our behalf and help find a cure for thousands of children suffering from mitochondrial disease. ## Sass 3.1 This release required you to upgrade to Sass 3.1. This release brings a ton of great new features that Compass now uses and you can too! * Proper List Support: Space and Comma separated lists used to cause values to become strings when passing them to mixins. Now the values in lists are preserved as their original types. * Sass-based Functions. Define your own value functions and use them anywhere. * Keyword Style Argument passing to Functions and Mixins. It can be hard to understand what the values being passed to a mixin or function are for, use keyword style arguments to make it easier to understand remember and read mixin includes. * `@media` bubbling. Responsive design meets nested selectors! Use a media declaration anywhere and it will be bubbled to the top level for you. For more information about the new Sass features, see the [Sass CHANGELOG](http://sass-lang.com/docs/yardoc/file.SASS_CHANGELOG.html). ## Embracing CSS3 The power and flexibility of CSS3 is well known and web developers and designers are finding many new and interesting ways to take advantage of it. In Compass v0.11 we have revisited each CSS3 feature to ensure the greatest ease of use and similarity to CSS3 syntax. The compass internals for managing cross-browser compatibility have been rewritten to provide a powerful platform for moving as fast as the browser implementors are. Going forward, expect small point releases to adapt to new browser support and changes much more rapidly. By default, Compass provides out-of-the-box support for **all** modern and legacy browsers as far back as IE6 and Firefox 2. But if you want slimmer stylesheets, it is [simple to configure](/reference/compass/support/) which browser support we provide. In this release, we embraced the CSS3 syntax as much as possible. It might seem obvious, but the Compass convention is now that all CSS3 mixin arguments should match the CSS3 syntax for their corresponding properties so that you never have to *learn* a compass CSS3 mixin. If you ever find a case where this is not true, it is a bug and we would appreciate it if you would [provide the details in a bug report](http://github.com/chriseppstein/compass/issues). After upgrading, you will encounter a number of deprecation warnings guiding you through the syntax changes. ### Gradients Evolved The best example of the changes in the CSS3 module are related to gradients. In Compass v0.10 we provided two simple mixins: `linear-gradient` and `radial-gradient` for setting the `background-image` property: .linear { @include linear-gradient(#FFF, #000, color-stops(#C00 25%, #0C0 75%)) } This syntax was inspired by the original webkit gradient syntax but tried to simplify it to some extent. But the gradient specification has evolved and because gradients can be used anywhere an image can, so we now provide a mixin for each property that can accept gradients and the arguments can be any legal CSS3 value for the that property: .linear { @include background-image(linear-gradient(#FFF, #C00 25%, #0C0 75%, #000)) } Which produces: .linear { background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(25%, #cc0000), color-stop(75%, #00cc00), color-stop(100%, #000000)); background-image: -webkit-linear-gradient(#ffffff, #cc0000 25%, #00cc00 75%, #000000); background-image: -moz-linear-gradient(#ffffff, #cc0000 25%, #00cc00 75%, #000000); background-image: -o-linear-gradient(#ffffff, #cc0000 25%, #00cc00 75%, #000000); background-image: linear-gradient(#ffffff, #cc0000 25%, #00cc00 75%, #000000); } ## Dead Simple Sprites Spriting has never been easier with Compass. Nico Hagenburger joined the Compass team and we have built on his popular Lemonade plugin to make Compass sprites. Existing Lemonade users will need to upgrade. The way they work is you place the sprite images in a folder, import them into your stylesheet, and then you can use the sprite in your selectors in one of several convenient ways. For example, let's imagine that in your project's image folder there are four icons: * `/icon/new.png` * `/icon/edit.png` * `/icon/save.png` * `/icon/delete.png` The simplest way to use these icon sprites is to let compass give you a class for each sprite: @import "icon/*.png"; @include all-icon-sprites; And you'll get the following CSS output: .icon-sprite, .icon-delete, .icon-edit, .icon-new, .icon-save { background: url('/images/icon-34fe0604ab.png') no-repeat; } .icon-delete { background-position: 0 0; } .icon-edit { background-position: 0 -32px; } .icon-new { background-position: 0 -64px; } .icon-save { background-position: 0 -96px; } You can now apply the `icon-XXX` classes to your markup as needed. Of course, this is Compass which means that underneath this simple veneer is a powerful system that you can use to customize your selectors and all kinds of other scenarios involving unicorns and rainbows. Get all the details in our [Spriting Tutorial](/help/tutorials/spriting/). ## New Typography Module New in this release is a typography module. Many of our utility mixins related to typography have been moved here, but the really exciting development is the addition of the [vertical rhythm module](/reference/compass/typography/vertical_rhythm/). Based on [this excellent tutorial](http://24ways.org/2006/compose-to-a-vertical-rhythm) from 24ways, it is now simpler than ever to compose to a vertical rhythm. ## Blueprint 1.0 Blueprint is 1.0 now and the Compass port is updated to match the changes there. Some of the changes that blueprint made might affect your design, so if you don't want to take this upgrade, you should unpack blueprint before you upgrade: compass unpack blueprint ## New Website As you can see, we have a spiffy new website design from Compass Core team member [Brandon](http://brandonmathis.com/). A testament to the separation of content and presentation, most of this redesign was done by throwing out our old stylesheets and building new ones. If you don't like the light text on dark background theme, you can turn on the lights by clicking the power button in the upper right hand corner of every page. ## Much, Much More There's more features in this release than would fit into this post. Here's some other things you'll find in this release: * Custom directory and file watching (E.g. for pngcrush support) * Compilation Callback support * Trigonometric functions Read the [CHANGELOG](/CHANGELOG/) for all the details. Additionally, expect a point release to follow shortly with support for: * Rails 3.1 Lastly, Compass v0.11 will have point releases as needed to adapt to changes in browser support for the CSS3 module. ## Many Thanks Compass wouldn't be possible without Natalie Weizenbaum and her hard work on Sass. The latest Sass release provides a ton of great features that have made this Compass release possible. Compass is far to big for one person to manage it now. I'd like to thank the hard work of the Compass core team members: * [Eric Suzanne](http://ericsuzanne.com/) * [Brandon Mathis](http://brandonmathis.com/) * [Scott Davis](https://github.com/jetviper21) * [Nico Hagenburger](http://www.hagenburger.net/) Additionally, there were commits from 10 other great folks in this release and there's been [contributions from 68 people](https://github.com/chriseppstein/compass/contributors) in total so far. Lastly thanks to the hundreds, if not thousands, of users who have helped test this release and provided valuable feedback, bug reports, and documentation suggestions. Together, we are making a real stylesheet framework and simplifying the lives of web developers across the world. ================================================ FILE: compass-style.org/content/posts/2011-04-26-compass-release-strategy.markdown ================================================ --- title: "Compass Release Strategy" description: "An overview of how Compass will be managing ongoing releases." author: chris --- Most of this is probably obvious, but it doesn't hurt to be explicit about such things. If you're interested in contributing to Compass, please read the [Contribution Guide](http://compass-style.org/help/tutorials/contributing/). Versioning ---------- Most stable releases will be released as release candidates first (e.g `0.11.1.rc.0`) and then made into official releases after a day or so if they don't cause any problems. Sass Dependency --------------- We will decouple major Compass releases from the Sass release schedule going forward. When Sass releases happen, we will issue patches to both stable and master branches to adjust to any deprecations and new features after they are fully released (which means we might have the changes waiting in a topic branch). Because Sass is very careful to not break existing stylesheets without deprecating first, this shouldn't be hard to pull off. Stylesheet Progress ------------------- I do not want to see the compass stylesheets get frozen again like they did in v0.10 while waiting for the next major release. Compass users expect us to keep up with browser developments and we will. If this means that we need to make v0.12 become v0.13 because the stylesheets need to make some major change, then we will do that. Communicating Change -------------------- All new features should have tests, docs, and CHANGELOG entries as appropriate as part of the commit. Additionally, we now have a compass team blog that we can use to communicate about new features, best practices, or other Compass related stuff. It's easy to add a post, you just drop a markdown file into [this directory](https://github.com/chriseppstein/compass/tree/stable/compass-style.org/content/posts). Guest posts are totally welcome via pull requests. Stable ------ The stable release is were code lives for the next v0.11 point release. Commits should only go here if they are ready for release, until that point the code should live in your compass fork or in a topic branch. Core team members, please use pull requests to manage the code review process for any change of significance and get sign-off from one other team member before committing to stable. Changes that can go on stable: * Browser support updates * Non-breaking stylesheet changes and minor features like new mixins or modules. * Bug fixes Changes that can't go on stable: * New deprecations * Major features * Big refactors If you're not sure where to put something, just ask. Rails 3.1 support is the exception to this rule, given the timeline assocated with that release, I will make a topic branch and we'll merge that to stable when it's ready. Core team members will, after committing/merging code to stable, then merge those changes to master so it is up to date. Master ------ Master is where code goes to be ready for v0.12. This focus of this next release is making extensions easy to make, share, discover, install, remove, and use. Any and all ideas that you have related to this are welcome. At a minimum, I would like to have an extension directory app hosted on compass-style.org and make sure that compass knows about it and can install extensions by name from there. ================================================ FILE: compass-style.org/content/posts/2011-05-09-compass-django.markdown ================================================ --- title: "How to use Compass/Sass with Django." description: "All the documentation is for Ruby/Rails development, so how does it work for the rest of us?" author: eric --- It's easy! Follow these two simple steps: 1. Use Compass/Sass. 2. Use Django. That's it. Compass works great as a stand-alone tool. Run "compass --watch" on the command line or use [compass.app](http://compass.handlino.com/) to compile your stylesheets, and then commit the CSS to your Django project, just like you always have. Done. ## What about integration? Compass and Sass are built in Ruby. When the rest of your project is also built in Ruby, it makes sense to squeeze every last ounce of convenient automatic integration, like having your project automatically compile Sass to CSS for you at runtime. But that integration is not actually necessary, and when the rest of your project is not Ruby, you pay a lot more for that little bit of convenience. A Rails/Ruby project already has a full Ruby stack and deployment infrastructure to make sure all the right Ruby gems are available on the server. Adding a few Compass gems makes very little difference in the complexity of your production deployment. For a Django project, integrating run-time Compass compilation (via something like [django-css](https://github.com/dziegler/django-css)) means requiring a full Ruby stack on your production servers, plus new deployment infrastructure for getting all the right gem versions in place. This is a significant chunk of additional moving parts on your production servers. Keeping your production servers simpler is A Very Good Thing. (And, as a bonus, it allows you to deploy your project to pure-Python managed hosting environments). ## In development. The disadvantage to our approach is that you are committing generated code to the repo. That's generally frowned upon. But we haven't seen any actual problems as a result of this. Nobody on the team is tempted to edit the generated CSS directly; we all know that we use Compass for that. There are no mysterious display inconsistencies between one developer and another, or between development and production, because of minor differences in something like a Compass plugin gem version. Everyone sees the same CSS. Differences between developers' Compass environments are caught quickly, because they show up right away as unexpected changes in the pre-commit diff of the generated CSS. And I, as the designer/front-end developer, keep full control of the css-generation process without needing to touch the server. If I want to update the gems and make some changes, I can do that. I make the change, I commit the change, and it just works. For everyone. That's important to me. It removes all the pretense of dark magic that can come with Sass/Compass. I'm writing CSS. I'm committing CSS. Compass, Sass and all their plugins are just tools towards that end. Of course, you'll want to commit the Sass as well, especially if you have multiple front-end developers on the team. That way the source is available for anyone who needs to update it, even though it's not needed by the server. You might also want a way of documenting the latest gems that should be used to compile it. That's easy enough to add in a comment or doc of it's own. ## Just Tools. I want to say that again because I think it is the most important and most often forgotten rule of using a css pre-processor. **Compass and Sass are simply tools for writing CSS. They are not a new styling language. They are not magic. They make writing css easier - and that is all. The css output is the only thing that matters.** ================================================ FILE: compass-style.org/content/posts/2012-01-29-compass-and-rails-integration.markdown ================================================ --- title: "Compass/Rails Integration in v0.12" description: "Starting in Compass v0.12 compass's rails integration is done via a new project called compass-rails." author: chris --- The Compass v0.12 release is way behind schedule but it's finally getting very close to release. The main goal of the v0.12 release has been to add support for the rails asset pipeline and we hope that you'll agree that this release achieves the very best integration with rails that compass has ever provided. In v0.12, we've create a new gem called `compass-rails` to provide full support for rails 2.3 and greater. Let me tell you, this was no small feat. 2.3 lacks Railtie support and 3.1 introduced the asset pipeline. Backflips were performed; blood, sweat, and tears were shed; Monkeys were patched and Ducks were punched. The compass command line tool will now be aware of and compass configuration settings you've made in your rails configuration files and/or in the compass configuration file. You can use the approach that best suites your workflow. While the asset pipeline is convenient, large applications with lots of stylesheets and many imports can become sluggish in development mode. To make things snappier, you can now run the compass watcher in a separate terminal to begin compilation as soon as you save. In combination with tools like [live-reload](https://github.com/mockko/livereload), you may not even need to reload your webpage to see the result in your browser. Compass extensions and their starter files can be added to your rails project following the extensions' existing installation instructions. No special consideration is needed to support rails except to note that the extension gem should be listed in the `:assets` group of your Gemfile and you might need to use `bundle exec` to launch the compass command line tool. Having a dedicated gem for integration provides a number of benefits. First, it means that we can release rails integration fixes on a separate release schedule from the main compass library. Second, it solves a chicken & egg problem we had where the command-line tools didn't know whether they were dealing with a rails project until it was too late. Finally, it allowed us to clean up some of the Compass internals. To be clear, this gem doesn't mean that Rails support is deprecated or a second class citizen in any way. Huge thanks go to [Scott Davis](https://github.com/scottdavis) for his hard work on the compass-rails gem. ================================================ FILE: compass-style.org/content/posts/2012-02-01-compass-0-12-is-released.markdown ================================================ --- title: "Compass v0.12 is Released" description: "Compass 0.12: Flexible Sprites, Rails Integration" author: chris --- Compass 0.12 is out! Install it now: $ (sudo) gem install compass This release is primarily to support the Rails Asset Pipeline which required major changes to the Compass internals. If you use rails with Compass please read the [blog post about the new compass-rails gem][compass-rails]. In addition to the rails improvements this release contains many updates to Compass Sprites: * **Sprite Layouts**: `vertical` (default), `horizontal`, `diagonal`, and `smart` layouts are now available. Different layouts may allow you to use sprites more easily with differing design requirements. The `smart` layout will efficiently pack sprites of different sizes -- resulting in smaller file sizes. To select a layout set the `$-layout` variable to your desired layout name. * **Sprite Load Path**: Sprite source files can now be stored in more locations than just your images directory. To add sprite locations in your compass configuration: `sprite_load_path << 'my/sprite/folder' * **Sprite output location**: If you need to output sprites to a location other than the images directory set `generated_images_dir`, `generated_images_path`, `http_generated_images_dir`, and `http_generated_images_path` in your compass configuration according to your needs. You can refer to images in your generated images directory using the `generated-image-url()` function. Additionally there are many new CSS3 improvements, bug fixes, and other small enhancements that you can read about in the [CHANGELOG](/CHANGELOG/). What's next for Compass? First, we've added [Anthony Short](/blog/2012/03/11/anthony-short-joins-the-compass-core-team/) to the team and we're really excited to see him come make our stylesheets even more awesome. The Sass 3.2 release is coming soon and the 0.13 release of compass will take advantage of the great features that it offers. Additionally, we're working on an extension registry where you can post your compass extensions and discover new ones. Lastly, we'll be extracting blueprint to a compass extension as that project seems to have stagnated. I'd say we're getting pretty close to a 1.0 release! [compass-rails]: /blog/2012/01/29/compass-and-rails-integration/ ================================================ FILE: compass-style.org/content/posts/2012-05-20-removing-blueprint.markdown ================================================ --- title: "Removing Blueprint from Compass in 0.13" description: "Blueprint will be extracted to a plugin" author: chris --- Five years ago, [Blueprint CSS](http://blueprintcss.org/) was an innovative CSS Framework. It was a boilerplate before [H5BP](http://html5boilerplate.com/) and it was the most popular CSS Grid Framework when the concept was still young. Blueprint's regular structure and common-sense approach, together with its inherent weaknesses, was a major inspiration for the development of Compass. In fact, Compass started solely as a rejected sass-based toolchain for the blueprint project. Sadly, the blueprint core team, while having never officially announced that the project is over, has through negligence, caused the project to fall behind. It has not kept up with layout and responsive approaches that are essential to web design in 2012. Furthermore, there are many new layout mechanisms coming in CSS: [columns][css-columns], [box-sizing][box-sizing], [regions][css-regions], [grid layout][css-grid], and [flexbox][css-flexbox]. The future of layout looks bright and we want Sass users to be at the forefront of their adoption, establishing the best practices of 2015 instead using the best practices from 2009. Given these developments, we have decided that it is time for Compass to get out of the "Grid Business". Starting in 0.13 (our next major release) we will have removed Blueprint from Compass. The stylesheets will be extracted as a plugin so that our users can continue to use it, if they need to. At that time, you can install it with two simple steps: 1. `gem install compass-blueprint` 2. Edit your compass configuration and add: `require 'compass-blueprint'` We hope that this means that the Compass community will think more carefully about the grids that they use and whether they meet their project's specific needs. If you are looking for a grid system for your next site, or to replace blueprint with something more modern. We suggest you look into [Susy](http://susy.oddbird.net/). It is written by Compass core team member, [Eric Suzanne](http://twitter.com/ericmsuzanne). Susy 1.0 has been completely overhauled to take advantage of modern browsers and the very latest features in Sass 3.2 and Compass 0.13. If you have a favorite grid framework, please feel free to mention it in the comments. **TL;DR** Starting in Compass 0.13, blueprint will be extracted from compass and available as a compass extension named `compass-blueprint`. [css-columns]: http://www.w3.org/TR/css3-multicol/ [css-grid]: http://dev.w3.org/csswg/css3-grid-layout/ [css-regions]: http://dev.w3.org/csswg/css3-regions/ [css-flexbox]: http://www.w3.org/TR/css3-flexbox/ [box-sizing]: http://caniuse.com/css3-boxsizing ================================================ FILE: compass-style.org/content/posts/2013-11-27-compass-versioning-change.markdown ================================================ --- title: "Compass Versioning Change" description: "Compass follows semantic versioning now. Chris shakes off his fear of releasing imperfect software." author: chris --- When I created compass I imagined a particular set of features Compass would have when it was done with the initial build out. I assigned that release a number of 1.0 and expected it would only take a few releases to get there. But then there was users and their needs and the features they wanted. And so there have been 77 releases at the time that I'm writing this post. And you know what? I don't know when, or if, compass will ever achieve the mythical feature set I imagined. Furthermore, it's been way too long since the last stable release. There was a hiatus, and then there was a mountain of bugs and feature requests that built up that I desperately wanted to get into the next release. And instead of just releasing incrementally better software every few weeks, I've been making a bigger and bigger release that is harder and harder to release. And so I've fallen into the trap that so many software developers fall into. I'm working hard every day and I'm not shipping because it's not done. But we all know, software is never done (unless you are Donald Knuth). And so I've decided to make a few changes. Sass 3.3 is ready for release and I want to get it out. Compass has to be released with it and there's no way I will get everything bug fix and new feature I need to get done. But what Compass development has right right now, is really a huge improvement. It's time to ship, even though it's not done and get this train moving. So here's what I'm doing to address these issues: ### 1.0.0 is the next release The next release will be version 1.0.0. This number doesn't mean anything. It's just an acknowledgement that compass is a mature project that has tens of thousands of users and that it is not in any way "not done". ### Semantic Versioning Semantic versioning is a [standard versioning scheme](http://semver.org/) with standard expectations about what a change to a version means. From the site: > Given a version number MAJOR.MINOR.PATCH, increment the: > > MAJOR version when you make incompatible API changes,
> MINOR version when you add functionality in a backwards-compatible manner, and
> PATCH version when you make backwards-compatible bug fixes. > > Additional labels for pre-release and build metadata are available as > extensions to the MAJOR.MINOR.PATCH format.

Compass releases will follow semantic versioning going forward. ### Compass Core The core stylesheets and configuration of Compass have been extracted to their own gem named `compass-core`. This gem allows projects that don't need Compass's command line tools, extension management, and compilation services, to work very simply using pure sass for much of configurable bits of compass. The compass core framework will have it's own version and will be released on it's own release train. If you don't care about this, don't worrry; `gem install compass` still works exactly like it used to. ### Regular Releases Once Compass 1.0.0 is released. There are a ton of bug fixes and new features we'll be releasing. Instead of waiting until there's a critical mass, we'll just release whenever new features land and ship non-critical bug fixes every two weeks. ### Gem Version Dependencies If you are the owner of a compass extension that declares a version dependency on compass, you need to update your gemspec to allow compass 1.0.0. Hit me up on [twitter](http://twitter.com/chriseppstein) if you're not sure how to do this. ### Install it now, help QA! There's a 1.0.0 preview release available right now (1.0.0.alpha.13) `gem install compass --pre` to get it. If you find a bug, please make sure to mention 1.0 in the description. ================================================ FILE: compass-style.org/content/posts/2014-08-15-omg-compass-1-0.markdown ================================================ --- title: "Compass 1.0 is Released!" description: "Better late than never." author: chris --- Compass 1.0 is now available! First, let's address the elephant in the room: This release took way too long. I can give you a list of reasons and excuses, but none of them really matter. Suffice it to say that if you ever find yourself owning an open source project that has gone unmaintained for more than a year like Compass had when I re-engaged with the project, the most prudent course of action is to shut it down. But I'm way too stubborn for that. What matters now is how things are going to work going forward. 1. Regular bug fix releases. Compass 1.0 is not perfect. Now that it is released, we will be shipping regular updates with bug fixes and fresh browser stats so that your prefixes are always up to date. You can expect a couple releases per month at a minimum. 2. New features. While compass 1.0 has undergone significant rewrites and refactoring, it is actually quite devoid of what I would consider any new significant features since 0.12. Now that it is released and following semantic versioning, we will be free to release new features. ### What's in Compass 1.0? * Vendor prefixing decisions are now data driven by [caniuse.com data](/help/documentation/tuning-vendor-prefixes/). You tell Compass what percentage of users you want to support and we'll take it from there. * Compass core library now enables you to [use compass without using the compass command-line tools](/help/documentation/sass-based-configuration-options/). * Compass speeds up your project compile times by enabling import-once importing. Existing projects should add `require "compass/import-once/activate"` to their configuration to enable this. [Documentation](https://github.com/Compass/compass/blob/master/import-once/README.md). * Sass sourcemap support. Set `sourcemap = true` in your compass configuration file to enable it. * Rewritten watcher/compiler. Compass now use's Sass builtin compiler guaranteeing tighter integration and consistency between the projects. * Blueprint is removed. Not that you were using it, but if you were it's now maintained as a [separate plugin](http://compass-blueprint.org/). * CSS3Pie integration is removed. * Support for recent CSS Developments: [Animation](/reference/compass/css3/animation/), [Flexbox](/reference/compass/css3/flexbox/), Official Gradient syntax support, [Input Placeholders](/reference/compass/css3/user_interface/), * Compass extensions that have Sass files that are not partials will now deliver compiled css files into a subdirectory of the css output folder. * And [much, much more](/CHANGELOG/). Compass has been a release candidate for a few weeks now. We've fixed many bugs, but given the magnitude of the changes here, we expect that there will be more. If you see something strange, please [file a bug](https://github.com/Compass/compass/issues)! Or better yet, send us a patch :) ================================================ FILE: compass-style.org/content/reference/compass/css3/animation.haml ================================================ --- title: Compass Animation crumb: Animation framework: compass stylesheet: compass/css3/_animation.scss meta_description: Specify the CSS3 animation property and all its sub-properties. layout: core classnames: - reference - core - css3 --- - render 'reference' do :markdown Provides a mixin for `animation` and all its sub-properties. See the CSS3 specification: [animation](http://www.w3.org/TR/css3-animations/). ================================================ FILE: compass-style.org/content/reference/compass/css3/appearance.haml ================================================ --- title: Compass Appearance crumb: Appearance framework: compass stylesheet: compass/css3/_appearance.scss meta_description: Specify the CSS3 appearance property. layout: core classnames: - reference - core - css3 --- - render 'reference' do :markdown Provides a mixin for `appearance`. See the CSS3 specification: [appearance](http://www.w3.org/TR/css3-ui/#appearance). ================================================ FILE: compass-style.org/content/reference/compass/css3/background_clip.haml ================================================ --- title: Compass Background Clip crumb: Background Clip framework: compass stylesheet: compass/css3/_background-clip.scss meta_description: Specify the background clip for all browsers. layout: core classnames: - reference - core - css3 --- - render 'reference' do %p Provides a mixin for background-clip. See CSS3 spec: background-clip. ================================================ FILE: compass-style.org/content/reference/compass/css3/background_origin.haml ================================================ --- title: Compass Background Origin crumb: Background Origin framework: compass stylesheet: compass/css3/_background-origin.scss meta_description: Specify the background origin for all browsers. layout: core classnames: - reference - core - css3 --- - render 'reference' do %p Provides a mixin for the background origin property. See CSS3 spec: background-origin property. ================================================ FILE: compass-style.org/content/reference/compass/css3/background_size.haml ================================================ --- title: Compass Background Size crumb: Background Size framework: compass stylesheet: compass/css3/_background-size.scss meta_description: Specify the background size for all browsers. layout: core classnames: - reference - core - css3 --- - render 'reference' do %p This mixin provides cross browser access to the CSS3 background-size attribute using supported vendor prefixes. See CSS3 spec: background-size. ================================================ FILE: compass-style.org/content/reference/compass/css3/border_radius.haml ================================================ --- title: Compass Border Radius crumb: Border Radius framework: compass stylesheet: compass/css3/_border-radius.scss meta_description: Specify the border radius for all browsers. layout: core classnames: - reference - core - css3 --- - render 'reference' do %p The border-radius mixin is used to give a block element rounded corners. It automatically outputs the correct vendor specific syntax for each browser (e.g. -webkit-border-radius and -moz-border-radius). See CSS3 spec: border-radius. ================================================ FILE: compass-style.org/content/reference/compass/css3/box.haml ================================================ --- title: Compass Box crumb: Box framework: compass stylesheet: compass/css3/_box.scss meta_description: This module provides mixins that pertain to the CSS3 Flexible Box. layout: core deprecated: true classnames: - reference --- - render 'reference' do %p.warning This module is deprecated and will be removed in the next release. Please use the flexbox module instead. ================================================ FILE: compass-style.org/content/reference/compass/css3/box_shadow.haml ================================================ --- title: Compass Box Shadow crumb: Box Shadow framework: compass stylesheet: compass/css3/_box-shadow.scss meta_description: Specify the box shadow for all browsers. layout: core classnames: - reference - core - css3 --- - render 'reference' do %p The box-shadow mixins are used to apply an inset or drop shadow to a block element. ================================================ FILE: compass-style.org/content/reference/compass/css3/box_sizing.haml ================================================ --- title: Compass Box Sizing crumb: Box Sizing framework: compass stylesheet: compass/css3/_box-sizing.scss meta_description: Specify the box sizing for all browsers. layout: core classnames: - reference - core - css3 --- - render 'reference' do %p Provides a mixin for the box-sizing property, which allows you to change how the box model works. See W3C CSS3 spec: box-sizing. ================================================ FILE: compass-style.org/content/reference/compass/css3/columns.haml ================================================ --- title: Compass Columns crumb: Columns framework: compass stylesheet: compass/css3/_columns.scss meta_description: Specify a columnar layout for all browsers. layout: core classnames: - reference - core - css3 --- - render 'reference' do %p Provides a mixin for the CSS3 Multi-column layout module. See CSS3 spec: Multi-colum layout module. ================================================ FILE: compass-style.org/content/reference/compass/css3/filter.haml ================================================ --- title: Compass Filter crumb: Filter framework: compass stylesheet: compass/css3/_filter.scss meta_description: Specify the (image) filter for all browsers. layout: core classnames: - reference - core - css3 --- - render 'reference' do %p The filter mixin is used to apply filters to images. ================================================ FILE: compass-style.org/content/reference/compass/css3/flexbox.haml ================================================ --- title: Compass Flexbox crumb: Flexbox framework: compass stylesheet: compass/css3/_flexbox.scss meta_description: This module provides mixins that pertain to CSS3 Flexbox. layout: core classnames: - reference --- - render 'reference' do :markdown This module provides prefixing support for the three versions of flexbox that have been implemented by browsers since 2009. However it does not attempt to provide a unified interface across these different versions. 1. [July 2009 Working Draft](http://www.w3.org/TR/2009/WD-css3-flexbox-20090723/) (box) 2. [March 2012 Working Draft](http://www.w3.org/TR/2012/WD-css3-flexbox-20120322/) (flexbox) 3. [September 2012 Candidate Recommendation](http://www.w3.org/TR/2012/CR-css3-flexbox-20120918/) (flex) The flexbox property mixins will only prefix the properties according the spec version 3. There are two ways to use this module. Per property mixins or by passing a map of properties to the generic flexbox module. ### Per-property mixins The per-property mixins only work with browsers implementing the most recent (3rd) version of the spec. If you want to support the legacy browsers, you will need to use the generic flexbox mixin. Example: .row { @include display-flex; @include flex-direction(row); } ### Generic Flexbox Mixin By default the flexbox mixin assumes it is applying prefixes for spec version 3 which will also output the unprefixed property. However the `$version` argument allows for prefixing according to the previous versions of the spec. Example: .row { @include flexbox(( display: box, box-orient: vertical ), $version: 1); @include flexbox(( display: flexbox, flex-direction: row ), $version: 2); @include flexbox(( display: flex, flex-direction: row )); } %ol ================================================ FILE: compass-style.org/content/reference/compass/css3/font_face.haml ================================================ --- title: Compass Font Face crumb: Font Face framework: compass stylesheet: compass/css3/_font-face.scss meta_description: Specify a downloadable font face for all browsers. layout: core classnames: - reference - core - css3 --- - render 'reference' do %p Provides a mixin to support @font-face. See CSS3 spec: @font-face. ================================================ FILE: compass-style.org/content/reference/compass/css3/hyphenation.haml ================================================ --- title: Compass Hyphenation crumb: Hyphenation framework: compass stylesheet: compass/css3/_hyphenation.scss meta_description: Mixin for breaking space and injecting hypens into overflowing text layout: core classnames: - reference - core - css3 --- - render 'reference' do :markdown Provides mixins that pertain to CSS3 Word Breaking and Hyphenation. See the CSS3 specification: [hyphens](http://www.w3.org/TR/css3-text/#hyphens) and [word-break](http://www.w3.org/TR/css3-text/#word-break). Firefox requires you to set the `lang` attribute in your markup. ================================================ FILE: compass-style.org/content/reference/compass/css3/images.haml ================================================ --- title: Compass Images crumb: Images framework: compass stylesheet: compass/css3/_images.scss meta_description: Specify linear gradients and radial gradients for many browsers. layout: core classnames: - reference - core - css3 --- - render 'reference' do :markdown Provides mixins that work across many modern browsers with the latest CSS3 image rendering primitives. These mixins provide intelligent cross-browser access to properties that accept images or image-like values (e.g. gradients). The syntax is very straightforward, it is exactly like the css syntax that you would use for the corresponding CSS3 properties: Values are comma and space delimited, just as they would be for a property. Vendor prefixes are used only when necessary. Example (more examples are available by following the links below):
.in-css3 {
      background: url(foo.png),
                  linear-gradient(to bottom right, #333, #0c0),
                  radial-gradient(#c00, #fff 100px);
    }
    .with-compass {
      @include background(image-url("foo.png"),
                          linear-gradient(to bottom right, #333, #0c0),
                          radial-gradient(#c00, #fff 100px));
    }
To enable SVG gradient support in Opera and IE9, lower the SVG shim threshold $svg-gradient-shim-threshold to 0.1 (or to whatever threshold you feel is best) in your stylesheet. NOTE: At this time, Opera renders incorrectly an SVG background on a element with a border, repeating the gradient towards the end. You can set background-repeat: no-repeat to avoid this, but the gradient will not fill the area completely. ================================================ FILE: compass-style.org/content/reference/compass/css3/inline_block.haml ================================================ --- title: Compass Inline Block crumb: Inline Block framework: compass stylesheet: compass/css3/_inline-block.scss meta_description: Declare an element inline block for all browsers. layout: core classnames: - reference - core - css3 --- - render 'reference' do %p Provides a cross-browser method to implement display: inline-block;. Note that this was actually introduced in CSS2, but badly implemented across browsers. See CSS2.1 spec: display. %blockquote This value causes an element to generate a block box, which itself is flowed as a single inline box, similar to a replaced element. The inside of an inline-block is formatted as a block box, and the element itself is formatted as an inline replaced element. ================================================ FILE: compass-style.org/content/reference/compass/css3/opacity.haml ================================================ --- title: Compass Opacity crumb: Opacity framework: compass stylesheet: compass/css3/_opacity.scss meta_description: Specify the opacity for all browsers. layout: core classnames: - reference - core - css3 --- - render 'reference' do %p Provides cross-browser CSS opacity. See CSS3 spec: transparency. ================================================ FILE: compass-style.org/content/reference/compass/css3/pie.haml ================================================ --- title: CSS3 Pie crumb: CSS3 Pie framework: compass stylesheet: compass/css3/_pie.scss meta_description: Compass integration with the css3pie tool. layout: core classnames: - reference - core - css3 --- - render 'reference' do :markdown ### Installing CSS PIE is a javascript library that enhances Internet Explorer to render many modern CSS3 capabilities wherever possible. To install: compass install compass/pie This will install an example stylesheet and a PIE.htc behavior file that must be loaded into your pages for IE. This file must be delivered with the following mime-type: Content-Type: text/x-component ### Conventions The example stylesheet will walk you through setting up your project with css3pie support. ### Properties Supported The following css3 properties are supported: * border-radius * box-shadow * border-image * background (in the form of -pie-background, use the [background mixin](/reference/compass/css3/images/#mixin-background)) Additionally, PIE supports the following CSS3 features: * rgba color values * linear gradients in backgrounds [Full Documentation on Supported Properties](http://css3pie.com/documentation/supported-css3-features/) ### Caveats 1. PIE only understands shortcut properties, long-hand properties don't work because the code, in order to be fast, does not attempt to resolve the stylesheet cascade and so it cannot determine which order to apply the long-hand properties. 2. Each element that has a PIE behavior attached adds about 10ms to the page render time. Moderation is recommended. 3. PIE generates content that contains the css3 graphical elements. It has to insert this content into your page and so it needs a little help from you. You have two choices: 1. You can make your element `position: relative`. 2. You can give your element a z-index. If you do this you should also give apply a z-index to an ancestor element that comes before or itself has a background. The compass mixins below and the example stylesheet will help get you set up. ### Best Practices It is suggested that you use Sass's `@extend` directive to mark elements as PIE elements. The example stylesheet you get when you install `compass/pie` into your project will walk you through the process of setting that up. ### Notes * For more information see the [css3pie website](http://css3pie.com/). * CSS PIE is written by and copyright to: [Jason Johnston](http://twitter.com/lojjic) * Compass is using css3pie version 1.0-beta3. It can be upgraded by downloading a new behavior file and replacing the one that comes with compass. ================================================ FILE: compass-style.org/content/reference/compass/css3/regions.haml ================================================ --- title: Compass CSS Regions crumb: CSS Regions framework: compass stylesheet: compass/css3/_regions.scss meta_description: Specify CSS Regions for supported browsers. layout: core classnames: - reference - core - css3 --- - render 'reference' do %p Provides two mixins for CSS regions, properties which allow you to flow content into new containers. See the spec draft and Adobe's page on the topic. ================================================ FILE: compass-style.org/content/reference/compass/css3/selection.haml ================================================ --- title: Compass Text Selection crumb: Selection framework: compass stylesheet: compass/css3/_selection.scss meta_description: Style text selection foreground and background color with CSS using the Compass selection mixin. layout: core classnames: - reference --- - render 'reference' do %p Styles text selection foreground and background color with CSS. ================================================ FILE: compass-style.org/content/reference/compass/css3/shared.haml ================================================ --- title: Shared CSS3 Utilities crumb: Shared Utilities framework: compass stylesheet: compass/css3/_shared.scss layout: core classnames: - reference - core - css3 --- - render 'reference' do %p This module provides support to the other CSS3 modules. You may want to use it to provide your own support for other CSS3 proposals as they are being worked on and before support is added to compass. ================================================ FILE: compass-style.org/content/reference/compass/css3/text-shadow.haml ================================================ --- title: Compass Text Shadow crumb: Text Shadow framework: compass stylesheet: compass/css3/_text-shadow.scss meta_description: Specify the text shadow for all browsers. layout: core classnames: - reference - core - css3 --- - render 'reference' do %p Provides a mixin for CSS text shadows. See CSS3 spec: text-shadow. ================================================ FILE: compass-style.org/content/reference/compass/css3/transform.haml ================================================ --- title: Compass Transform crumb: Transform framework: compass stylesheet: compass/css3/_transform.scss meta_description: Specify transformations for many browsers. layout: core classnames: - reference - core - css3 --- - render 'reference' do %p Provides mixins for CSS3 2D and 3D transforms. See W3C: CSS 2D transforms and See W3C: CSS 3D transforms. %p Safari is the only browser that currently supports 3D transforms. Because of that it can be important to control whether a given 2D transform uses the full range of experimental browser prefixes, or only the 3D list. To make that easy, all 2D transforms include an browser-targeting toggle ($only3d) to switch between the two support lists. The toggle defaults to 'false' (2D), and also accepts 'true' (3D). Currently the lists are as follows: 2D: Mozilla, Webkit, Opera, Official 3D: Webkit, Official **(Only Safari Supports 3D perspective)** ================================================ FILE: compass-style.org/content/reference/compass/css3/transition.haml ================================================ --- title: Compass Transition crumb: Transition framework: compass stylesheet: compass/css3/_transition.scss meta_description: Specify a style transition for all browsers. layout: core classnames: - reference - core - css3 --- - render 'reference' do %p Provides a mixin for CSS3 transitions. See CSS3 Spec: transitions. ================================================ FILE: compass-style.org/content/reference/compass/css3/user_interface.haml ================================================ --- title: Compass User Interface crumb: User Interface framework: compass stylesheet: compass/css3/_user-interface.scss meta_description: Declare an element inline block for all browsers. layout: core classnames: - reference - core - css3 --- - render 'reference' do %p Provides mixins for the CSS3 User Interface module. ================================================ FILE: compass-style.org/content/reference/compass/css3.haml ================================================ --- title: Compass CSS3 crumb: CSS3 framework: compass stylesheet: compass/_css3.scss sidebar: true layout: core classnames: - reference - core - css3 meta_description: Provides cross browser CSS3 mixins that take advantage of available pre-spec vendor prefixes. layout: core --- - render 'reference' do %p The CSS3 module provides cross-browser mixins for CSS properties introduced in CSS3, for example border-radius and text-shadow. %p What rendering engines you support for the experimental css properties is governed by the configurable variables defined in the browser support module. ================================================ FILE: compass-style.org/content/reference/compass/helpers/color-stops.haml ================================================ --- title: Compass Color Stops Helper crumb: Color Stops framework: compass meta_description: Helper function for color-stops. layout: core classnames: - reference - core - helpers documented_functions: - "color-stops" --- %h1 Compass Color Stops Helper #color-stops.helper %h3 %a(href="#color-stops") color-stops([$color-stop]*) .details %p The color-stops helper provides a way to pass an arbitrary number of colors stops to the gradient mixins. %p Any number of comma-delimited color stops can be passed, each color stop should take the form of a color followed by an optional stopping point (separated by a space). Where stop values are not provided they will be inferred by assuming an equal distribution of colors between any specified locations. %dl %dg.head %dt Example Call %dd Means %dg#ex1 %dt color-stops(#FFF,#F00,#00C) %dd \#FFF 0%, #F00 50%, #00C 100% %dg#ex2 %dt color-stops(#FFF, #F00 25%, #0C0, #00C) %dd \#FFF 0%, #F00 25%, #0C0 62.5%, #00C 100% %dg#ex3 %dt color-stops(#FFF, #F00 5px, #0C0, #00C 25px) %dd \#FFF 0px, #F00 5px, #0C0 15px, #00C 25px .examples %h4 Examples %ul %li %a(href="/examples/compass/css3/gradient/") Example of Gradients ================================================ FILE: compass-style.org/content/reference/compass/helpers/colors.haml ================================================ --- title: Compass Color Helpers crumb: Colors framework: compass meta_description: Helper function for colors. layout: core classnames: - reference - core - helpers documented_functions: - "adjust-lightness" - "adjust-saturation" - "scale-lightness" - "scale-saturation" - "shade" - "tint" --- %h1 Compass Color Helpers %p These color functions are useful for creating generic libraries that have to accept a range of inputs. For more color functions see the sass reference documentation #adjust-lightness.helper %h3 %a(href="#adjust-lightness") adjust-lightness($color, $amount) .details %p Adds $amount to $color's lightness value. $amount can be negative. #adjust-saturation.helper %h3 %a(href="#adjust-saturation") adjust-saturation($color, $amount) .details %p Adds $amount to $color's saturation value. $amount can be negative. #scale-lightness.helper %h3 %a(href="#scale-lightness") scale-lightness($color, $amount) .details %p Scales $color's lightness value by $amount. $amount can be negative. #scale-saturation.helper %h3 %a(href="#scale-saturation") scale-saturation($color, $amount) .details %p Scales $color's saturation value by $amount. $amount can be negative. #shade.helper %h3 %a(href="#shade") shade($color, $percentage) .details %p Darkens the $color by mixing it with black as specified by $percentage. #tint.helper %h3 %a(href="#tint") tint($color, $percentage) .details %p Lightens the $color by mixing it with white as specified by $percentage. ================================================ FILE: compass-style.org/content/reference/compass/helpers/constants.haml ================================================ --- title: Compass Constant Helpers crumb: Constants framework: compass meta_description: Helper functions for working with constants. layout: core classnames: - reference - core - helpers documented_functions: - "opposite-position" --- %h1 Compass Constant Helpers :markdown These helpers manipulate CSS Constants. #opposite-position.helper %h3 %a(href="#opposite-position") opposite-position($position) .details :markdown Returns the opposition position for the position given. Examples: Input Output ------------------------------- ------------ opposite-position(left) => right opposite-position(top) => bottom opposite-position(center) => center opposite-position(top left) => bottom right opposite-position(center right) => center left ================================================ FILE: compass-style.org/content/reference/compass/helpers/cross-browser.haml ================================================ --- title: Compass Cross Browser Helpers crumb: Cross Browser framework: compass meta_description: Helper functions for working with vendor prefixed functions. layout: core classnames: - reference - core - helpers documented_functions: - "prefixed" - "prefix" - "-webkit" - "-moz" - "-o" - "-ms" - "-svg" - "-pie" - "-css2" --- %h1 Compass Cross Browser Helpers :markdown These helpers are used by compass to create mixins that can insulate the user from cross browser syntax and vendor prefix complexities. If you need to support a new experimental (prefixed) function in your project using these helpers, you can add support for it adding the following to your compass configuration file: Compass::BrowserSupport.add_support("function-name", "webkit", "moz") For an example of how to use these functions see the [compass images module](https://github.com/chriseppstein/compass/blob/master/frameworks/compass/stylesheets/compass/css3/_images.scss). #prefixed.helper %h3 %a(href="#prefixed") prefixed($prefix, $arg, ...) .details %p Returns true if any of the arguments require the given prefix. #prefix.helper %h3 %a(href="#prefix") prefix($prefix, $arg, ...) .details %p Transforms the argument(s) into a representation for the rendering engine indicated by $prefix. Usually this means just adding a prefix, but in some cases, this may result in entirely different representations for the given rendering engine (E.g. linear-gradient). %p Values that do not have a specific representation are passed through without being transformed. #-webkit.helper %h3 %a(href="#-webkit") \-webkit($arg, ...) .details %p This is a shortcut for calling prefix(-webkit, $arg, ...). #-moz.helper %h3 %a(href="#-moz") \-moz($arg, ...) .details %p This is a shortcut for calling prefix(-moz, $arg, ...). #-o.helper %h3 %a(href="#-o") \-o($arg, ...) .details %p This is a shortcut for calling prefix(-o, $arg, ...). #-ms.helper %h3 %a(href="#-ms") \-ms($arg, ...) .details %p This is a shortcut for calling prefix(-ms, $arg, ...). #-svg.helper %h3 %a(href="#-svg") \-svg($arg, ...) .details %p This is a shortcut for calling prefix(-svg, $arg, ...). Instead of adding a prefix, it returns a representation of the arguments using SVG to render them where it can. #-pie.helper %h3 %a(href="#-pie") \-pie($arg, ...) .details %p This is a shortcut for calling prefix(-pie, $arg, ...). It it used to get CSS3 PIE support where necessary. #-css2.helper %h3 %a(href="#-css2") \-css2($arg, ...) .details %p This is a shortcut for calling prefix(-css2, $arg, ...). It is a kind of hack to sanitize the output of experimental code into a form that can be parsed by a css2.1 compliant parser. Usually this results in causing some functions to be omitted. #css2-fallback.helper %h3 %a(href="#css2-fallback") css2-fallback($value, $css2-value) .details %p This function returns a value that is normally $value, but is $css2-value when passed through the -css2() helper function. Many of the compass css3 mixins will create a css2 fallback value if the arguments have a css2 representation (gradients have a null css2 representation). ================================================ FILE: compass-style.org/content/reference/compass/helpers/display.haml ================================================ --- title: Compass Display Helpers crumb: Display Helpers framework: compass meta_description: Helper functions for working with the display property. layout: core classnames: - reference - core - helpers documented_functions: - "elements-of-type" --- %h1 Compass Display Helpers %p Helper functions for working with the display property. #elements-of-type.helper %h3 %a(href="#elements-of-type") elements-of-type($display) .details %p The following display values exist and will return the elements listed below the display value. %dl %dg.head %dt Display Value %dd Elements Returned - display_map = Compass::Core::SassExtensions::Functions::Display::DEFAULT_DISPLAY - display_map.keys.each do |key| %dg %dt= key %dd= display_map[key].sort.join(", ") .examples %h4 Examples %ul %li %a(href="/examples/compass/helpers/elements-of-type/") Example of elements-of-type ================================================ FILE: compass-style.org/content/reference/compass/helpers/env.haml ================================================ --- title: Compass Environment Helpers crumb: Environment Helpers framework: compass meta_description: Helper functions for inspecting the environment of the current compilation. layout: core classnames: - reference - core - helpers documented_functions: - "compass-env" - "current-time" - "current-date" - "current-source-file" - "current-output-file" --- %h1 Compass Environment Helpers %p Helper functions for inspecting the environmental details of the current compilation #compass-env.helper %h3 %a(href="#compass-env") compass-env() .details %p Returns the compass environment for the current compile. (`development` or `production`) #current-time.helper %h3 %a(href="#current-time") current-time([$format]) .details :markdown Returns the current time when the file is compiled. With no arguments, the time will be returned in the format of `08:37:48-06:00`. However, if a `$format` string is provided, the time will be printed according to that format. Valid formats are any valid format string to [Ruby's strftime function](http://www.ruby-doc.org/core-2.0/Time.html#method-i-strftime). #current-date.helper %h3 %a(href="#current-date") current-date([$format]) .details :markdown Returns the current date when the file is compiled. With no arguments, the date will be returned in the format of `2013-05-13`. However, if a `$format` string is provided, the date will be printed according to that format. Valid formats are any valid format string to Ruby's strftime function. #current-source-file.helper %h3 %a(href="#current-source-file") current-source-file([$absolute]) .details :markdown Returns the file name of the Sass file that initiated the compilation. If the `$absolute` parameter is set to true, the full path of the stylesheet will be returned, otherwise it will be relative to the project's Sass directory. When the `$absolute` parameter is omitted, it defaults to false. #current-output-file.helper %h3 %a(href="#current-output-file") current-output-file([$absolute]) .details :markdown Returns the file name of the CSS file that is being generated. If the `$absolute` parameter is set to true, the full path of the stylesheet will be returned, otherwise it will be relative to the project's CSS stylesheets directory. When the `$absolute` parameter is omitted, it defaults to false. ================================================ FILE: compass-style.org/content/reference/compass/helpers/font-files.haml ================================================ --- title: Compass Font Files Helper crumb: Font Files framework: compass meta_description: Helper function for listing fonts. layout: core classnames: - reference - core - helpers documented_functions: - "font-files" --- %h1 Compass Font Files Helper #font-files.helper %h3 %a(href="#font-files") font-files([$font]*) .details %p The font-files function takes a list of arguments containing the path to each font files relative to your project's font directory. %p This helper is used with the font-face mixin and is what makes it possible to pass any number of font files. %p W3C Reference .examples %h4 Examples %ul %li %a(href="/examples/compass/css3/font-face/") Font-face Example ================================================ FILE: compass-style.org/content/reference/compass/helpers/image-dimensions.haml ================================================ --- title: Compass Image Dimension Helpers crumb: Image Dimensions framework: compass meta_description: Helper functions for working with image dimensions. layout: core classnames: - reference - core - helpers documented_functions: - "image-width" - "image-height" --- %h1 Compass Image Dimension Helpers #image-width.helper %h3 %a(href="#image-width") image-width($image) .details %p Returns the width of the image found at the path supplied by $image relative to your project's images directory. #image-height.helper %h3 %a(href="#image-height") image-height($image) .details %p Returns the height of the image found at the path supplied by $image relative to your project's images directory. ================================================ FILE: compass-style.org/content/reference/compass/helpers/inline-data.haml ================================================ --- title: Compass Inline Data Helpers crumb: Inline Data framework: compass meta_description: Helper functions for embedding inline data. layout: core classnames: - reference - core - helpers documented_functions: - "inline-image" - "inline-font-files" --- %h1 Compass Inline Data Helpers #inline-image.helper %h3 %a(href="#inline-image") inline-image($image, $mime-type) .details %p Embeds the contents of an image directly inside your stylesheet, eliminating the need for another HTTP request. For small images, this can be a performance benefit at the cost of a larger generated CSS file. %p Like the image-url() helper, the path specified should be relative to your project's images directory. #inline-font-files.helper %h3 %a(href="#inline-font-files") inline-font-files([$font, $format]*) .details %p Like the font-files() helper, but the font file is embedded within the generated CSS file. ================================================ FILE: compass-style.org/content/reference/compass/helpers/math.haml ================================================ --- title: Compass Math Helpers crumb: Math framework: compass meta_description: Helper math functions. layout: core classnames: - reference - core - helpers documented_functions: - "pi" - "sin" - "cos" - "tan" - "asin" - "acos" - "atan" - "e" - "logarithm" - "sqrt" - "pow" --- %h1 Compass Math Helpers :markdown Sass math functions are sufficient for most cases, but in those moments of extreme geekiness these additional functions can really come in handy. #pi.helper %h3 %a(href="#pi") pi() .details %p Returns the value of π. #sin.helper %h3 %a(href="#sin") sin($number) .details %p Returns the sine of a number. If the number is unitless or has a unit of deg then it will return a unitless result. Unless the number has a unit of deg it will be evaluated as radians. Degrees will first be converted to radians. If the number is any other unit, the units will be passed thru to the result, and the number will be treated as radians. #cos.helper %h3 %a(href="#cos") cos($number) .details %p Returns the cosine of a number. If the number is unitless or has a unit of deg then it will return a unitless result. Unless the number has a unit of deg it will be evaluated as radians. Degrees will first be converted to radians. If the number is any other unit, the units will be passed thru to the result, and the number will be treated as radians. #tan.helper %h3 %a(href="#tan") tan($number) .details %p Returns the tangent of a number. If the number is unitless or has a unit of deg then it will return a unitless result. Unless the number has a unit of deg it will be evaluated as radians. Degrees will first be converted to radians. If the number is any other unit, the units will be passed thru to the result, and the number will be treated as radians. #asin.helper %h3 %a(href="#asin") asin($number) .details %p Returns the arcsine of a number. If the number is unitless or has a unit of deg then it will return a unitless result. Unless the number has a unit of deg it will be evaluated as radians. Degrees will first be converted to radians. If the number is any other unit, the units will be passed thru to the result, and the number will be treated as radians. #acos.helper %h3 %a(href="#acos") acos($number) .details %p Returns the arccosine of a number. If the number is unitless or has a unit of deg then it will return a unitless result. Unless the number has a unit of deg it will be evaluated as radians. Degrees will first be converted to radians. If the number is any other unit, the units will be passed thru to the result, and the number will be treated as radians. #atan.helper %h3 %a(href="#atan") atan($number) .details %p Returns the arctangent of a number. If the number is unitless or has a unit of deg then it will return a unitless result. Unless the number has a unit of deg it will be evaluated as radians. Degrees will first be converted to radians. If the number is any other unit, the units will be passed thru to the result, and the number will be treated as radians. #e.helper %h3 %a(href="#e") e() .details %p Returns the value of e. #logarithm.helper %h3 %a(href="#logarithm") logarithm($number, $base) .details %p Calculates the logarithm of a number to a base. Base defaults to e. #sqrt.helper %h3 %a(href="#sqrt") sqrt($number) .details %p Calculates the square root of a number. #pow.helper %h3 %a(href="#pow") pow($number, $exponent) .details %p Calculates the value of a number raised to the power of an exponent. ================================================ FILE: compass-style.org/content/reference/compass/helpers/selectors.haml ================================================ --- title: Compass Selector Helpers crumb: Selectors framework: compass meta_description: Helper functions for working with selectors. layout: core classnames: - reference - core - helpers documented_functions: - "nest" - "append-selector" - "enumerate" - "headings" - "headers" --- %h1 Compass Selector Helpers #nest.helper %h3 %a(href="#nest") nest($selector1, $selector2, ...) .details %p Nest selectors as if they had been nested within a sass file. Each selector passed in can be a comma-delimited list of selectors and they will be permuted as they would be in a sass file. The generated selectors can be further nested within the sass file itself. %p This function can accept any number of selector arguments. %dl %dg %dt nest(".foo", ".bar", ".baz") %dd .foo .bar .baz %dg %dt nest(".foo, .bar", ".baz") %dd .foo .baz, .bar .baz %dg %dt nest(".foo, .bar", "a, span") %dd .foo a, .foo span, .bar a, .bar span #append-selector.helper %h3 %a(href="#append-selector") append-selector($selector, $to-append) .details %p This helper function appends any selector with some string. No space or punctuation is added when appending. The selector can be a comma-delimited list of selectors. %dl %dg %dt append-selector(".foo", ".bar") %dd .foo.bar %dg %dt append-selector("p, div, span", ".bar") %dd p.bar, div.bar, span.bar #enumerate.helper %h3 %a(href="#enumerate") enumerate($prefix, $from, $through, $separator) .details %p Enumerate the given $prefix from $from through $through. %p Note: Using the @extend directive is usually preferred to this helper, which was created before @extend existed. .examples %h4 Examples %ul %li %a(href="/examples/compass/helpers/enumerate/") Example of enumerate %li %a(href="/examples/compass/helpers/using-extend-in-place-of-enumerate/") Example of using @extend in place of enumerate %a(name="headers") #headings.helper %h3 %a(href="#append-selector") headings($from, $to) .details %p This helper function emits headings. It's best to just see it in action: %p Note: This function is aliased to headers(), both can be used interchangeably. %dl %dg %dt headings() %dd h1, h2, h3, h4, h5, h6 %dg %dt headings(all) %dd h1, h2, h3, h4, h5, h6 %dg %dt headings(2) %dd h1, h2 %dg %dt headings(2,5) %dd h2, h3, h4, h5 ================================================ FILE: compass-style.org/content/reference/compass/helpers/sprites.haml ================================================ --- title: CSS Sprite Helpers for Compass crumb: Sprites framework: compass meta_description: Helper functions for working with CSS Sprite images. layout: core classnames: - reference - core - helpers documented_functions: - "sprite-map" - "sprite" - "sprite-map-name" - "sprite-file" - "sprite-url" - "sprite-position" - "sprite-height" - "sprite-width" - "sprite-path" - "sprite-names" --- %h1 CSS Sprite Helpers for Compass :markdown These helpers make it easier to build and to work with css sprites. While it is allowed to use these directly, to do so is considered "advanced usage". It is recommended that you instead use the css sprite mixins that are designed to work with these functions. See the [Spriting Tutorial](/help/tutorials/spriting/) for more information. #sprite-map.helper %h3 %a(href="#sprite-map") sprite-map($glob, ...) .details :markdown Generates a css sprite map from the files matching the glob pattern. Uses the keyword-style arguments passed in to control the placement. Only PNG files can be made into css sprites at this time. The `$glob` should be glob pattern relative to the images directory that specifies what files will be in the css sprite. For example: $icons: sprite-map("icons/*.png"); background: $icons; This will generate a css sprite map and return a reference to it. It's important to capture this to a variable, because you will need to use it later when creating css sprites. In the above example you might end up with a new file named `images/sprites/icons-a2ef041.png` and your css stylesheet will have: background: url('/images/sprites/icons-a2ef041.png?1234678') no-repeat; The exact image name is not something you should depend on as it may change based on the arguments you pass in. Instead, you can use the `sprite-url()` function to create a reference to the css sprite map without generating the image again. Alternatively, simply using the sprite map variable in an property will have the same effect as calling `sprite-url()`. For each sprite in the css sprite map you can control the position, spacing, and whether or not it repeats. You do this by passing arguments to this function that tell each sprite how to behave. For instance if there is a icons/new.png then you can control it like so: $icon-sprite: sprite-map("icons/*.png", $new-position: 100%, $new-spacing: 15px, $new-repeat: no-repeat); If you don't specify these options they will default to `0%` for `position`, `0px` for spacing, and `no-repeat` for `repeat`. Default values for all sprites can be specified by passing values for `$position`, `$spacing`, and `$repeat`. #sprite.helper %h3 %a(href="#sprite") sprite($map, $sprite, $offset-x, $offset-y, $use-percentages) .details :markdown Returns the image and background position for use in a single shorthand property: $icons: sprite-map("icons/*.png"); // contains icons/new.png among others. background: sprite($icons, new) no-repeat; Becomes: background: url('/images/icons.png?12345678') 0 -24px no-repeat; Passing `true` for `$use-percentages` results in the background position being expressed in percentages instead of pixels. Example: background: url('/images/icons.png?12345678') 0 25% no-repeat; #sprite-width.helper %h3 %a(href="#sprite-width") sprite-width($map) .details :markdown Returns the width of the generated sprite #sprite-height.helper %h3 %a(href="#sprite-height") sprite-height($map) .details :markdown Returns the height of the generated sprite #sprite-path.helper %h3(href="#sprite-path") sprite-path($map) .details :markdown Returns the filesystem path of the generated sprite #sprite-names.helper %h3(href="#sprite-names") sprite-names($map) .details :markdown Returns a list of all sprite names within the supplied map #sprite-map-name.helper %h3 %a(href="#sprite-map-name") sprite-map-name($map) .details :markdown Returns the name of a css sprite map The name is derived from the folder than contains the css sprites. #sprite-file.helper %h3 %a(href="#sprite-file") sprite-file($map, $sprite) .details :markdown Returns the path to the original file used when construction the sprite. This is suitable for passing to the `image-width` and `image-height` helpers. #sprite-url.helper %h3 %a(href="#sprite-url") sprite-url($map) .details :markdown Returns a url to the sprite image. #sprite-position.helper %h3 %a(href="#sprite-position") sprite-position($map, $sprite, $offset-x, $offset-y, $use-percentages) .details :markdown Returns the position for the original image in the sprite. This is suitable for use as a value to background-position: $icons: sprite-map("icons/*.png"); background-position: sprite-position($icons, new); Might generate something like: background-position: 0 -34px; You can adjust the background relative to this position by passing values for `$offset-x` and `$offset-y`: $icons: sprite-map("icons/*.png"); background-position: sprite-position($icons, new, 3px, -2px); Would change the above output to: background-position: 3px -36px; Passing `true` for the `$use-percentages` argument will return the sprite position in percentages instead of pixels. This is useful if you need to be able to scale the sprite up and down. Following the example above, this: background-position: sprite-position($icons, new, 0, 0, true); Would result in something like: background-position: 0 25%; ================================================ FILE: compass-style.org/content/reference/compass/helpers/urls.haml ================================================ --- title: Compass URL Helpers crumb: URLs framework: compass meta_description: Helper functions for working with URLs. layout: core classnames: - reference - core - helpers documented_functions: - "stylesheet-url" - "font-url" - "image-url" - "generated-image-url" --- %h1 Compass URL Helpers :markdown These url helpers isolate your stylesheets from environmental differences. They allow you to write the same stylesheets and use them locally without a web server, and then change them to be using asset hosts in production. They might also insulate you against some code reorganization changes. #stylesheet-url.helper %h3 %a(href="#stylesheet-url") stylesheet-url($path, $only-path) .details %p Generates a path to an asset found relative to the project's css directory. %br Passing a true value as the second argument will cause pronly the path to be returned instead of a url() function #font-url.helper %h3 %a(href="#font-url") font-url($path, $only-path, $cache-buster) .details %p Generates a path to an asset found relative to the project's font directory. %br Passing a true value as the second argument will cause only the path to be returned instead of a url() function %p The third argument is used to control the cache buster on a per-use basis. When set to false no cache buster will be used. When a string, that value will be used as the cache buster. #image-url.helper %h3 %a(href="#image-url") image-url($path, $only-path, $cache-buster) .details %p Generates a path to an asset found relative to the project's images directory. %p Passing a true value as the second argument will cause only the path to be returned instead of a url() function %p The third argument is used to control the cache buster on a per-use basis. When set to false no cache buster will be used. When a string, that value will be used as the cache buster. #generated-image-url.helper %h3 %a(href="#generated-image-url") generated-image-url($path, $cache-buster: false) .details %p Generates a path to an image generated during compilation using the generated_image related configuration properties. %p Most users will never call this helper directly, it is primarily provided for use by plugins that need to generate paths to images they create. E.g. The sprite-url() helper calls this helper. %p The second argument is used to control the cache buster on a per-use basis. Defaults to false, meaning that no cache buster will be used. When a string, that value will be used as the cache buster, when true Compass will generate a cache-buster based on the image's modification time. ================================================ FILE: compass-style.org/content/reference/compass/helpers.haml ================================================ --- title: Compass Helpers crumb: Helpers framework: compass sidebar: true layout: core classnames: - reference - core - helpers meta_description: Provides cross browser CSS3 mixins that take advantage of available pre-spec vendor prefixes. layout: core --- %h1 Compass Helper Functions :markdown The compass helpers are functions that augment the [functions provided by Sass](http://sass-lang.com/docs/yardoc/Sass/Script/Functions.html). All Helpers: * [adjust-lightness()](/reference/compass/helpers/colors/#adjust-lightness) * [adjust-saturation()](/reference/compass/helpers/colors/#adjust-saturation) * [append-selector()](/reference/compass/helpers/selectors/#append-selector) * [color-stops()](/reference/compass/helpers/color-stops/) * [cos()](/reference/compass/helpers/math/#cos) * [compass-env()](/reference/compass/helpers/env/#compass-env) * [css2-fallback()](/reference/compass/helpers/cross-browser/#css2-fallback) * [current-date()](/reference/compass/helpers/env/#current-date) * [current-source-file()](/reference/compass/helpers/env/#current-source-file) * [current-time()](/reference/compass/helpers/env/#current-time) * [current-output-file()](/reference/compass/helpers/env/#current-output-file) * [e()](/reference/compass/helpers/math/#e) * [elements-of-type()](/reference/compass/helpers/display/) * [enumerate()](/reference/compass/helpers/selectors/#enumerate) * [font-files()](/reference/compass/helpers/font-files/) * [font-url()](/reference/compass/helpers/urls/#stylesheet-url) * [headings()](/reference/compass/helpers/selectors/#headings) * [image-width()](/reference/compass/helpers/image-dimensions/#image-width) * [image-height()](/reference/compass/helpers/image-dimensions/#image-height) * [image-url()](/reference/compass/helpers/urls/#image-url) * [inline-font-files()](/reference/compass/helpers/inline-data/#inline-font-files) * [inline-image()](/reference/compass/helpers/inline-data/#inline-image) * [logarithm()](/reference/compass/helpers/math/#logarithm) * [nest()](/reference/compass/helpers/selectors/#nest) * [pow()](/reference/compass/helpers/math/#pow) * [prefix()](/reference/compass/helpers/cross-browser/#prefix) * [prefixed()](/reference/compass/helpers/cross-browser/#prefixed) * [pi()](/reference/compass/helpers/math/#pi) * [sin()](/reference/compass/helpers/math/#sin) * [sqrt()](/reference/compass/helpers/math/#sqrt) * [stylesheet-url()](/reference/compass/helpers/urls/#stylesheet-url) * [scale-lightness()](/reference/compass/helpers/colors/#scale-lightness) * [shade()](/reference/compass/helpers/colors/#shade) * [tan()](/reference/compass/helpers/math/#tan) * [tint()](/reference/compass/helpers/colors/#tint) * [-css2()](/reference/compass/helpers/cross-browser/#-css2) * [-moz()](/reference/compass/helpers/cross-browser/#-moz) * [-ms()](/reference/compass/helpers/cross-browser/#-ms) * [-o()](/reference/compass/helpers/cross-browser/#-o) * [-pie()](/reference/compass/helpers/cross-browser/#-pie) * [-svg()](/reference/compass/helpers/cross-browser/#-svg) * [-webkit()](/reference/compass/helpers/cross-browser/#-webkit) - ================================================ FILE: compass-style.org/content/reference/compass/layout/grid_background.haml ================================================ --- title: Compass Grid Backgrounds crumb: Grid Background framework: compass stylesheet: compass/layout/_grid-background.scss layout: core classnames: - reference - core - layout --- - render 'reference' do %p The grid-background mixins allow you to generate fixed, fluid and elastic grid-images on-the-fly using css3 gradients. These can be used for testing both horizontal and vertical grids. ================================================ FILE: compass-style.org/content/reference/compass/layout/sticky_footer.haml ================================================ --- title: Compass Sticky Footer crumb: Sticky Footer framework: compass stylesheet: compass/layout/_sticky-footer.scss layout: core classnames: - reference - core - layout --- - render 'reference' do :markdown This module provides tools needed to lay out your footer such that it sticks to the bottom of the page. Mix in to the top level of your stylesheet, so the footer stays at the bottom of the screen. This mixin relies on the following HTML structure, and a fixed-height `#footer` element:
If you use the default selectors, this mixin is simple to use. Just mix it into the top level of your stylesheet: @include sticky-footer(54px) You can also define the selectors yourself: @include sticky-footer(54px, "#my-root", "#my-root-footer", "#my-footer") ================================================ FILE: compass-style.org/content/reference/compass/layout/stretching.haml ================================================ --- title: Compass Stretching crumb: Stretching framework: compass stylesheet: compass/layout/_stretching.scss layout: core classnames: - reference - core - layout --- - render 'reference' do %p The stretch mixins allow you to style absolutely positioned elements such that they will stretch to fill their positioning parent. ================================================ FILE: compass-style.org/content/reference/compass/layout.haml ================================================ --- title: Compass Layout crumb: Layout framework: compass sidebar: true stylesheet: compass/_layout.scss meta_description: Page layout module. layout: core classnames: - reference - core - layout --- - render 'reference' do %p This module provides tools to help you with page layout. ================================================ FILE: compass-style.org/content/reference/compass/reset/utilities.haml ================================================ --- title: Compass Reset Utilities crumb: Reset Utilities framework: compass stylesheet: compass/reset/_utilities.scss layout: core meta_description: Mixins for resetting elements. classnames: - reference - core - utilities --- - render 'reference' do :markdown These utilities are used to reset your document. The easiest way to use them is to simply `@import "compass/reset"` which will import this module and apply the appropriate mixins for you. ================================================ FILE: compass-style.org/content/reference/compass/reset-legacy/utilities-legacy.haml ================================================ --- title: Compass Reset Utilities (legacy) crumb: Reset Utilities (legacy) framework: compass stylesheet: compass/reset/_utilities-legacy.scss layout: core deprecated: true meta_description: Mixins for resetting elements. classnames: - reference - core - utilities --- - render 'reference' do %p.warning This import is deprecated. Please import reset utilities instead. :markdown These utilities are used to reset your document. The easiest way to use them is to simply `@import "compass/reset"` which will import this module and apply the appropriate mixins for you. ================================================ FILE: compass-style.org/content/reference/compass/reset-legacy.haml ================================================ --- title: Compass Reset (legacy) crumb: Reset (legacy) framework: compass stylesheet: compass/_reset-legacy.scss layout: core sidebar: true deprecated: true classnames: - reference - core - reset meta_description: Adds a CSS Reset into your stylesheet. --- - render 'reference' do %p.warning This import is deprecated. Please import reset instead. :markdown This module applies the [global reset](/reference/compass/reset/utilities-legacy/#mixin-global-reset) to your stylesheet by simply importing it. **Note:** This module will place styles into your stylesheet by importing it. This is not the standard behavior of a compass module but it optimizes the common use case. If you want to control the reset, please use the mixins defined in the [reset utilities module](/reference/compass/reset/utilities-legacy/) ================================================ FILE: compass-style.org/content/reference/compass/reset.haml ================================================ --- title: Compass Reset crumb: Reset framework: compass stylesheet: compass/_reset.scss layout: core sidebar: true classnames: - reference - core - reset meta_description: Adds a CSS Reset into your stylesheet. --- - render 'reference' do :markdown This module applies the [global reset](/reference/compass/reset/utilities/#mixin-global-reset) to your stylesheet by simply importing it. **Note:** This module will place styles into your stylesheet by importing it. This is not the standard behavior of a compass module but it optimizes the common use case. If you want to control the reset, please use the mixins defined in the [reset utilities module](/reference/compass/reset/utilities/) ================================================ FILE: compass-style.org/content/reference/compass/support.haml ================================================ --- title: Compass Cross-Browser Support Configuration crumb: Browser Support framework: compass stylesheet: compass/_support.scss classnames: - reference - core - support meta_description: Provides configuration options for the Compass Browser Support Matrix. layout: core --- - render 'reference' do %p You can configure the compass default browser support matrix by setting these variables as needed. ================================================ FILE: compass-style.org/content/reference/compass/typography/links/hover_link.haml ================================================ --- title: Compass Hover Link crumb: Hover Link framework: compass stylesheet: compass/typography/links/_hover-link.scss layout: core meta_description: Underline a link when you hover over it. classnames: - reference - core - typography --- = render 'reference' ================================================ FILE: compass-style.org/content/reference/compass/typography/links/link_colors.haml ================================================ --- title: Compass Link Colors crumb: Link Colors framework: compass stylesheet: compass/typography/links/_link-colors.scss layout: core meta_description: Easy assignment of colors to link states. classnames: - reference - core - typography --- = render 'reference' ================================================ FILE: compass-style.org/content/reference/compass/typography/links/unstyled_link.haml ================================================ --- title: Compass Unstyled Link crumb: Unstyled Link framework: compass stylesheet: compass/typography/links/_unstyled-link.scss layout: core meta_description: Make a link appear like regular text. classnames: - reference - core - typography --- - render 'reference' do %p Makes a link appear like regular text. Not supported by IE 6 or 7. ================================================ FILE: compass-style.org/content/reference/compass/typography/links.haml ================================================ --- title: Compass Links crumb: Links framework: compass stylesheet: compass/typography/_links.scss sidebar: true layout: core meta_description: Tools for styling anchor links. classnames: - reference - core - typography --- - render 'reference' do %p Tools for styling anchor links. ================================================ FILE: compass-style.org/content/reference/compass/typography/lists/bullets.haml ================================================ --- title: Compass Bullets crumb: Bullets framework: compass stylesheet: compass/typography/lists/_bullets.scss layout: core meta_description: Mixins for managing list bullets. classnames: - reference - core - typography --- = render 'reference' ================================================ FILE: compass-style.org/content/reference/compass/typography/lists/horizontal_list.haml ================================================ --- title: Compass Horizontal List crumb: Horizontal List framework: compass stylesheet: compass/typography/lists/_horizontal-list.scss layout: core meta_description: Float a list so it appears horizontally. classnames: - reference - core - typography --- - render 'reference' do :markdown Easy mode using simple descendant li selectors: ul.nav +horizontal-list Advanced mode: If you need to target the list items using a different selector then use +horizontal-list-container on your ul/ol and +horizontal-list-item on your li. This may help when working on layouts involving nested lists. For example: ul.nav +horizontal-list-container > li +horizontal-list-item ================================================ FILE: compass-style.org/content/reference/compass/typography/lists/inline-block-list.haml ================================================ --- title: Compass Inline-Block List crumb: Inline-Block List framework: compass stylesheet: compass/typography/lists/_inline-block-list.scss layout: core meta_description: set list-elements to inline-block so they appear horizontally while retaining their structure. classnames: - reference - core - typography --- - render 'reference' do :markdown Easy mode using simple descendant li selectors: ul.nav +inline-block-list Advanced mode: If you need to target the list items using a different selector then use +inline-block-list-container on your ul/ol and +inline-block-list-item on your li. This may help when working on layouts involving nested lists. For example: ul.nav +inline-block-list-container > li +inline-block-list-item ================================================ FILE: compass-style.org/content/reference/compass/typography/lists/inline_list.haml ================================================ --- title: Compass Inline List crumb: Inline List framework: compass stylesheet: compass/typography/lists/_inline-list.scss layout: core meta_description: Style a list as inline text. classnames: - reference - core - typography --- = render 'reference' ================================================ FILE: compass-style.org/content/reference/compass/typography/lists.haml ================================================ --- title: Compass Lists crumb: Lists framework: compass stylesheet: compass/typography/_lists.scss sidebar: true layout: core meta_description: Tools for styling lists. classnames: - reference - core - typography --- = render 'reference' ================================================ FILE: compass-style.org/content/reference/compass/typography/text/ellipsis.haml ================================================ --- title: Truncating Text with Ellipses crumb: Ellipsis framework: compass stylesheet: compass/typography/text/_ellipsis.scss layout: core meta_description: Text truncation with ellipsis. classnames: - reference - core - typography --- - render 'reference' do :markdown There is an XML file that must be installed into your stylesheet directory in order for this utility to work correctly. To install it: compass install compass/ellipsis ================================================ FILE: compass-style.org/content/reference/compass/typography/text/force-wrap.haml ================================================ --- title: Wrapping Long Text and URLs crumb: Force Wrap framework: compass stylesheet: compass/typography/text/_force-wrap.scss layout: core meta_description: Wrap URLs and long lines of text. classnames: - reference - core - typography --- - render 'reference' do %p This mixin will wrap URLs and long lines of text to prevent text from breaking layouts. ================================================ FILE: compass-style.org/content/reference/compass/typography/text/nowrap.haml ================================================ --- title: Compass No Wrap crumb: No Wrap framework: compass stylesheet: compass/typography/text/_nowrap.scss layout: core meta_description: Remembering whether or not there's a hyphen in white-space is too hard. classnames: - reference - core - typography --- - render 'reference' do %p Remembering whether or not there's a hyphen in white-space is too hard. ================================================ FILE: compass-style.org/content/reference/compass/typography/text/replacement.haml ================================================ --- title: Compass Text Replacement crumb: Text Replacement framework: compass stylesheet: compass/typography/text/_replacement.scss layout: core meta_description: Replace text with images. classnames: - reference - core - typography --- = render 'reference' ================================================ FILE: compass-style.org/content/reference/compass/typography/text.haml ================================================ --- title: Compass Text crumb: Text framework: compass stylesheet: compass/typography/_text.scss layout: core sidebar: true meta_description: Style helpers for your text. classnames: - reference - core - typography --- - render 'reference' do %p Utilities for managing text. ================================================ FILE: compass-style.org/content/reference/compass/typography/vertical_rhythm.haml ================================================ --- title: Vertical Rhythm crumb: Vertical Rhythm framework: compass stylesheet: compass/typography/_vertical_rhythm.scss layout: core meta_description: Create and maintain a vertical rhythm for your type. classnames: - reference - core - typography --- - render 'reference' do :markdown Create a vertical rhythm for your site by setting the `$base-font-size` and `$base-line-height` variables and then including the `establish-baseline` mixin at the root of your document. Manage the vertical rhythm using the other vertical-rhythm mixins to adjust font and line-height values, extra vertical whitespace, borders, etc. ================================================ FILE: compass-style.org/content/reference/compass/typography.haml ================================================ --- title: Compass Typography crumb: Typography framework: compass sidebar: true stylesheet: compass/_typography.scss classnames: - reference - core - typography meta_description: Provides basic mixins for common typography patterns. layout: core nav_stylesheet: compass/_typography.scss --- - render 'reference' do %p The Compass Typography module provides some basic mixins for common text styling patterns. ================================================ FILE: compass-style.org/content/reference/compass/utilities/color/brightness.haml ================================================ --- title: Compass Color Brightness crumb: Color Brightness framework: compass stylesheet: compass/utilities/color/_brightness.scss layout: core meta_description: Compute the brightness of a color. classnames: - reference - core - utilities --- = render 'reference' ================================================ FILE: compass-style.org/content/reference/compass/utilities/color/contrast.haml ================================================ --- title: Compass Color Contrast crumb: Color Contrast framework: compass stylesheet: compass/utilities/color/_contrast.scss layout: core meta_description: Contrast foreground with background colors. classnames: - reference - core - utilities --- = render 'reference' ================================================ FILE: compass-style.org/content/reference/compass/utilities/color.haml ================================================ --- title: Compass Color crumb: Color framework: compass stylesheet: compass/utilities/_color.scss layout: core sidebar: true meta_description: Utilities for working with colors. classnames: - reference - core - utilities --- - render 'reference' do %p Utilities for working with colors. ================================================ FILE: compass-style.org/content/reference/compass/utilities/general/clearfix.haml ================================================ --- title: Compass Clearfix crumb: Clearfix framework: compass stylesheet: compass/utilities/general/_clearfix.scss layout: core meta_description: Mixins for clearfixing. classnames: - reference - core - utilities --- - render 'reference' do %p A clearfix will extend the bottom of the element to enclose any floated elements it contains. ================================================ FILE: compass-style.org/content/reference/compass/utilities/general/float.haml ================================================ --- title: Compass Float crumb: Float framework: compass stylesheet: compass/utilities/general/_float.scss layout: core meta_description: Mixins for cross-browser floats. classnames: - reference - core - utilities --- - render 'reference' do :markdown This module provides mixins that help you work around the [double-margin bug in IE5/6][dmb]. [dmb]: http://www.positioniseverything.net/explorer/doubled-margin.html ================================================ FILE: compass-style.org/content/reference/compass/utilities/general/hacks.haml ================================================ --- title: Compass Hacks crumb: Hacks framework: compass stylesheet: compass/utilities/general/_hacks.scss layout: core meta_description: Mixins for hacking specific browsers. classnames: - reference - core - utilities --- - render 'reference' do %p A collection of mixins for hacking specific browsers. ================================================ FILE: compass-style.org/content/reference/compass/utilities/general/min.haml ================================================ --- title: Minimum Dimensions crumb: Minimums framework: compass stylesheet: compass/utilities/general/_min.scss layout: core meta_description: Mixins for cross-browser min-height and min-width. classnames: - reference - core - utilities --- - render 'reference' do %p Cross browser implementation of min-height and min-width. ================================================ FILE: compass-style.org/content/reference/compass/utilities/general/reset.haml ================================================ --- title: Compass Reset crumb: Reset framework: compass stylesheet: compass/utilities/general/_reset.scss layout: core meta_description: Mixins for resetting elements (old import). classnames: - reference - core - utilities --- - render 'reference' do %p This is a legacy wrapper for the reset/utilities module. ================================================ FILE: compass-style.org/content/reference/compass/utilities/general/tag_cloud.haml ================================================ --- title: Compass Tag Cloud crumb: Tag Cloud framework: compass stylesheet: compass/utilities/general/_tag-cloud.scss layout: core meta_description: Mixin for styling tag clouds. classnames: - reference - core - utilities --- = render 'reference' ================================================ FILE: compass-style.org/content/reference/compass/utilities/general.haml ================================================ --- title: Compass General Utilities crumb: General framework: compass stylesheet: compass/utilities/_general.scss sidebar: true layout: core meta_description: Generally useful utilities that don't fit elsewhere. classnames: - reference - core - utilities --- - render 'reference' do %p Generally useful utilities. ================================================ FILE: compass-style.org/content/reference/compass/utilities/print.haml ================================================ --- title: Compass Print crumb: Print framework: compass stylesheet: compass/utilities/_print.scss layout: core meta_description: Control what elements gets printed. classnames: - reference - core - utilities --- - render 'reference' do :markdown Control what gets printed. Apply the `no-print` (or `noprint`) class to any elements that should be hidden when printing. Apply the `print-only` class to those elements which should only appear in your printed pages. The tricky part about `print-only` is getting the display right when you turn an element back on in the case where both styles are applied. This mixin uses the `elements-of-type` function to make sure that elements have the correct display value according to the element type. ================================================ FILE: compass-style.org/content/reference/compass/utilities/sprites/base.haml ================================================ --- title: Compass Sprite Base crumb: Sprite Base framework: compass stylesheet: compass/utilities/sprites/_base.scss layout: core classnames: - reference - core - utilities --- - render 'reference' do :markdown These mixins are useful for working with sprites. This file is imported by magic sprite imports. See the [Spriting Tutorial](/help/tutorials/spriting/) for more information. ================================================ FILE: compass-style.org/content/reference/compass/utilities/sprites/sprite_img.haml ================================================ --- title: Compass Sprite Image crumb: Sprite Image framework: compass stylesheet: compass/utilities/sprites/_sprite-img.scss layout: core classnames: - reference - core - utilities --- - render 'reference' do :markdown **Example 1** Simple mixins: a.twitter +sprite-img("icons-32.png", 1) a.facebook +sprite-img("icons-32.png", 2) **Example 2** Sharing a common base: a +sprite-background("icons-32.png") &.twitter +sprite-column(1) &.facebook +sprite-row(2) ================================================ FILE: compass-style.org/content/reference/compass/utilities/sprites.haml ================================================ --- title: Compass Sprites crumb: Sprites framework: compass stylesheet: compass/utilities/_sprites.scss sidebar: true layout: core meta_description: Sprite mixins. classnames: - reference - core - utilities --- - render 'reference' do %h3 Additional Resources %ul %li %a(href="/help/tutorials/spriting/") Spriting Tutorial %li %a(href="/reference/compass/helpers/sprites/") Sprite Helpers %li %a(href="/reference/compass/utilities/sprites/base/") Base Stylesheet ================================================ FILE: compass-style.org/content/reference/compass/utilities/tables/alternating_rows_and_columns.haml ================================================ --- title: Compass Table Striping crumb: Table Striping framework: compass stylesheet: compass/utilities/tables/_alternating-rows-and-columns.scss layout: core meta_description: Add striping to a table. classnames: - reference - core - utilities --- - render 'reference' do :markdown Add striping to a table in both directions based on a few colors. ================================================ FILE: compass-style.org/content/reference/compass/utilities/tables/borders.haml ================================================ --- title: Compass Table Borders crumb: Table Borders framework: compass stylesheet: compass/utilities/tables/_borders.scss layout: core meta_description: Add borders to a table. classnames: - reference - core - utilities --- = render 'reference' ================================================ FILE: compass-style.org/content/reference/compass/utilities/tables/scaffolding.haml ================================================ --- title: Compass Table Scaffolding crumb: Table Scaffolding framework: compass stylesheet: compass/utilities/tables/_scaffolding.scss layout: core meta_description: Basic styling of tables to get you started. classnames: - reference - core - utilities --- - render 'reference' do %p Basic styling of tables to get you started. ================================================ FILE: compass-style.org/content/reference/compass/utilities/tables.haml ================================================ --- title: Compass Tables crumb: Tables framework: compass stylesheet: compass/utilities/_tables.scss layout: core sidebar: true meta_description: Style helpers for your tables. classnames: - reference - core - utilities --- - render 'reference' do %p Style helpers for your tables. ================================================ FILE: compass-style.org/content/reference/compass/utilities.haml ================================================ --- title: Compass Utilities crumb: Utilities framework: compass sidebar: true stylesheet: compass/_utilities.scss classnames: - reference - core - utilities meta_description: Provides basic mixins for common styling patterns. layout: core nav_stylesheet: compass/_utilities.scss --- - render 'reference' do %p The Compass Utilities module provides some basic mixins for common styling patterns. ================================================ FILE: compass-style.org/content/reference/compass.haml ================================================ --- title: Compass Core Framework crumb: Compass Core framework: compass stylesheet: _compass.scss classnames: - reference - core meta_description: The Compass Core Framework. layout: core --- - render 'reference' do %p The compass core framework is a design-agnostic framework that provides common code that would otherwise be duplicated across other frameworks and extensions. %h2 Alphabetical index of all: %ul#indexes %li %a(href="/index/variables/") Variables %li %a(href="/index/mixins/") Mixins %li %a(href="/index/functions/") Functions %h2 Importing %h2 Non Imported Modules %em You can import these yourself if you want to use them. %ol %li= render "partials/reference/import", :import => "compass/_layout.scss" %li= render "partials/reference/import", :import => "compass/_reset.scss" ================================================ FILE: compass-style.org/content/reference.haml ================================================ --- title: Compass Documentation redirect: /reference/compass/ --- ================================================ FILE: compass-style.org/content/screencast.haml ================================================ --- title: Compass Documentation crumb: Docs body_id: home --- %h1 Screencast Tutorial %p This screencast will walk you through getting set up, learning Sass, and then how to use Compass to style a webpage. ================================================ FILE: compass-style.org/content/search-data.js.erb ================================================ function unique(arrayName) { var newArray = new Array(); label: for (var i = 0; i < arrayName.length; i++) { for (var j = 0; j < newArray.length; j++) { if (newArray[j] == arrayName[i]) continue label; } newArray[newArray.length] = arrayName[i]; } return newArray; } function search(query, callback) { var terms = $.trim(query).replace(/[\W\s_]+/m,' ').toLowerCase().split(/\s+/); var matching_ids = null; for (var i = 0; i < terms.length; i++) { var term = terms[i]; var exactmatch = index.terms[term] || []; var approxmatch = index.approximate[term] || []; var ids = unique(exactmatch.concat(approxmatch)); if (matching_ids) { matching_ids = $.grep(matching_ids, function(id) { return ids.indexOf(id) != -1; }); } else { matching_ids = ids; } } callback($.map(matching_ids, function(id){ return index.items[id]; })) } var index = <%= search_index.to_json %>; ================================================ FILE: compass-style.org/content/search.haml ================================================ --- title: Search | Compass Documentation crumb: Search body_id: search --- - content_for(:javascripts) do %script(type="text/javascript" src="/javascripts/search-data.js") %script(type="text/javascript" src="/javascripts/jquery.url.packed.js") :javascript $(function(){ if ($.url.param("q")) { var query = $.url.param("q").replace("+"," "); $('input#q').attr('value', query); search(query, displayResults); } $('input#q').keyup(function(){ search(this.value, displayResults); }); }) function displayResults(items) { if (items.length > 0) { var html = "" for (var i = 0; i < items.length; i++) { html += '
  • '+items[i].title+'
  • '; } $('ol#results').html(html) } else { $('ol#results').html("
  • Nothing found.
  • "); } } %input#q{:type => "text", :placeholder=>"Search"} %h2 Index of all: %ul#indexes %li %a(href="/index/variables/") Variables %li %a(href="/index/mixins/") Mixins %li %a(href="/index/functions/") Functions %h2 Results %ol#results %li.none Please enter a search term. ================================================ FILE: compass-style.org/content/sitemap.xml ================================================ <%= xml_sitemap %> ================================================ FILE: compass-style.org/content/stylesheets/core/_base-classes.sass ================================================ $default-rounded-corner: 4 .group +pie-clearfix .truncate +ellipsis .border-box +box-sizing(border-box) .round-corners-4 +border-radius(4px) .round-corners-em +border-radius(1em) =round-corners($num: $default-rounded-corner) @extend .round-corners-#{$num} =round-top-corners($num: $default-rounded-corner) +round-corners($num) @extend .clear-bottom-right-corner @extend .clear-bottom-left-corner =round-bottom-corners($num: $default-rounded-corner) +round-corners($num) @extend .clear-top-right-corner @extend .clear-top-left-corner =round-left-corners($num: $default-rounded-corner) +round-corners($num) @extend .clear-top-right-corner @extend .clear-bottom-right-corner =round-right-corners($num: $default-rounded-corner) +round-corners($num) @extend .clear-top-left-corner @extend .clear-bottom-left-corner =round-top-left-corner($num: $default-rounded-corner) +round-corners($num) @extend .clear-top-right-corner @extend .clear-bottom-right-corner @extend .clear-bottom-left-corner =round-top-right-corner($num: $default-rounded-corner) +round-corners($num) @extend .clear-top-left-corner @extend .clear-bottom-right-corner @extend .clear-bottom-left-corner =round-bottom-left-corner($num: $default-rounded-corner) +round-corners($num) @extend .clear-top-right-corner @extend .clear-bottom-right-corner @extend .clear-top-left-corner =round-bottom-right-corner($num: $default-rounded-corner) +round-corners($num) @extend .clear-top-right-corner @extend .clear-top-left-corner @extend .clear-bottom-left-corner =square-top-left-corner($num: $default-rounded-corner) +round-corners($num) @extend .clear-top-left-corner =square-top-right-corner($num: $default-rounded-corner) +round-corners($num) @extend .clear-top-right-corner =square-bottom-left-corner($num: $default-rounded-corner) +round-corners($num) @extend .clear-bottom-left-corner =square-bottom-right-corner($num: $default-rounded-corner) +round-corners($num) @extend .clear-bottom-right-corner ================================================ FILE: compass-style.org/content/stylesheets/core/_clearing-classes.sass ================================================ .clear-top-left-corner +border-top-left-radius(0) .clear-top-right-corner +border-top-right-radius(0) .clear-bottom-left-corner +border-bottom-left-radius(0) .clear-bottom-right-corner +border-bottom-right-radius(0) .hide display: none .clear-box-shadow +box-shadow(none) .clear-border-radius @extend .clear-rounded-corners .clear-rounded-corners +border-radius(0) ================================================ FILE: compass-style.org/content/stylesheets/core/_extensions.scss ================================================ @mixin reset($reset-type: false){ @if($reset-type){ @if($reset-type == global){ @include global-reset; } @if($reset-type == html5){ @include reset-html5; } } } ================================================ FILE: compass-style.org/content/stylesheets/core/_media-block.scss ================================================ .context { @include clearfix; } .media { @extend .context; .m { float: left; &.rt { float: right; } } .bd { @extend .context; } } ================================================ FILE: compass-style.org/content/stylesheets/home.scss ================================================ @import "compass"; @import "core/extensions"; @include reset(global); @include reset(html5); @import "core/base-classes"; @import "core/media-block"; @import "partials/theme"; @import "partials/layout"; @import "partials/nav"; @import "partials/typography"; @import "partials/main"; @import "partials/code"; @import "partials/home"; @import "partials/ads"; html.dark { @include dark-theme; } html.light { @include light-theme; } @import "core/clearing-classes"; ================================================ FILE: compass-style.org/content/stylesheets/ie.scss ================================================ ul#featured_sites li { margin-left: 4px; margin-top: 4px; &:hover{ padding: 6px; img { width: 240px; }}} ================================================ FILE: compass-style.org/content/stylesheets/partials/_ads.scss ================================================ .advertisement { padding: 8px 5px !important; text-align: center; line-height: 1.1em !important; @include opacity(0); @include transition(opacity 1s ease-in 1.5s); &.visible { @include opacity(1); } a:not(.pagerankspam) { display: block; color: white; @extend .heading-font; text-decoration: none; &:hover { @include text-shadow(0 0 2px #aaa); } } .pagerankspam { font-size: 9px; } .dark & { @extend .code-block-dark; img:hover { @include single-box-shadow($color: white); } } .light & { @extend .code-block-light; a:not(.pagerankspam) { color: #222} img:hover { @include single-box-shadow($color: #222); } } #home & { float: right; width: 380px; margin-top: 11px; .fusionimg { margin: 6px 8px; float: left; } .fusiontext { padding-top: 6px; } } } ================================================ FILE: compass-style.org/content/stylesheets/partials/_blog.scss ================================================ body#blog-archive { .timestamp { margin-right: 1em; font-size: 12px; } } ================================================ FILE: compass-style.org/content/stylesheets/partials/_code.scss ================================================ @import "compass/layout/stretching"; //html.sass .mixin-source .scss, html.scss .mixin-source .sass { @extend .hide;} .mixin-source, .example-source, .function-source, .selector-source { position: relative; @extend .fixed-font; .syntaxhighlighter, pre { &.scss, &.sass, &.css, &.haml, &.html { display: none; } } } html.sass { .mixin-source, .example-source, .function-source, .selector-source { .syntaxhighlighter.sass { display: block; } } } html.scss { .mixin-source, .example-source, .function-source, .selector-source { .syntaxhighlighter.scss { display: block; } } } html.css .example-source .syntaxhighlighter.css { display: block; } html.html .example-source .syntaxhighlighter.html { display: block; } html.haml .example-source .syntaxhighlighter.haml { display: block; } .mixin-source, .function-source, .selector-source { display: none; } html.light .syntaxhighlighter, html.dark .syntaxhighlighter { margin: 0 0 2px; code { padding: 0; } //font-size: 1.1em; text-shadow: none; .code-block { background: none; @extend .clear-box-shadow; } table td.gutter { .line { &:first-child { padding-top: 10px !important; } &:last-child { padding-bottom: 10px !important; } } } .toolbar { display: none; } //a.help { font-size: 1.5em; @extend .pictos; color: #aaa; position: relative; right: 6px; top: 2px; } } a[rel="github-source"] { position: relative; float: right; top: 1.1em; } pre { margin: 1.5em 0; overflow: auto; .code-block:first-child { padding: .6em; display: block; } .code-block:first-child { width: 100%; @include box-sizing(border-box); overflow: auto; } } .code-block { @extend .round-corners-4; @extend .fixed-font; display: inline-block; font-size: .95em; padding: 0 .4em; line-height: 1.5em; } .source-documentation { @extend .round-corners-4; padding: 10px 15px; @include round-bottom-corners } h3 { @include round-corners; padding: 10px 15px; margin: 20px 0 20px; font-weight: bold; position: relative; a { text-decoration: none;} code, .arg { font-weight: normal; } } h3.mixin, h3.function, h3.selector { @include round-top-corners; margin-bottom: 2px;} .arg { display: inline-block; padding: 0 2px; &[data-default-value] { font-style: italic; &:before { content: "[" ; } &:after { content: "]" ; }} } a[rel="view source"]{ float: right; padding: 9px 15px; margin-top: 20px; position: relative; z-index: 2; font-size: .8em; @include hover-link;} h2 + a[rel="view source"]{ margin-top: 6px;} .syntaxhighlighter { a, div, code, table, table td, table tr, table tbody, table thead, table caption, textarea { background: none; border: 0; bottom: auto; float: none; height: auto; left: auto; line-height: 1.2em !important; padding: 0; margin: 0; outline: 0; overflow: visible; position: static; right: auto; text-align: left; top: auto; vertical-align: baseline; width: auto; font: { weight: normal; style: normal; size: 1em; } min: { height: inherit; } } } .syntaxhighlighter { width: 100%; margin: 1em 0 1em 0; position: relative; overflow: auto; font-size: 1em; // set up bold and italic .bold { font-weight: bold; } .italic { font-style: italic; } .line { white-space: pre; } // main table and columns table { width: 100%; td.code { width: 100%; .line { padding: 0 .6em; } } td.gutter .line { text-align: right; padding: 0 0.8em 0 1em; } } // middle spacing between line numbers and lines // Styles for the toolbar .toolbar { position: absolute; right: 1px; top: 1px; width: 11px; height: 11px; font-size: 10px; z-index: 10; span.title { display: inline; } a { display: block; text-align: center; text-decoration: none; padding-top: 1px; } } .container { position: relative; } textarea { @include stretch(0, .65em, 0, .65em); @extend .fixed-font; font-size: .95em; line-height: 1.3em !important;} } .syntaxhighlighter, pre .code-block:first-child, pre { &::-webkit-scrollbar { height: 12px; } &::-webkit-scrollbar-button { &:start:decrement, &:end:increment { display: block; width: 0; height: 0; } } &::-webkit-scrollbar-thumb:horizontal { -webkit-border-radius: 5px; -webkit-background-clip: padding-box; } } ================================================ FILE: compass-style.org/content/stylesheets/partials/_example.scss ================================================ html.light #demo, html.dark #demo { color: #333; } #demo { @include round-corners; @extend .group; background: #fff; margin-bottom: 1.2em; padding: 40px; code { @include box-shadow(rgba(#000, .3) 0 1px 3px, rgba(#000, .15) 0 1px 0 0 inset); background: #fff; color: inherit; } } #how { section { width: 49%; float: left; } section + section { float: right; } .example-source { clear: both; } } #reference { float: right; margin-top: 1em; } ================================================ FILE: compass-style.org/content/stylesheets/partials/_home.scss ================================================ body#home { width: 810px; #page { padding-top: 31px;} h1#logo { $logo: 'compass-logo.png'; background: image-url($logo) no-repeat; text-indent: -9999px; overflow: hidden; width: image-width($logo); height: image-height($logo)/2; padding: 0; margin: 0 auto 18px; } #{headings()}{ @extend .heading-font; } h2 { text-align: center; font-size: 30px; padding-bottom: 15px; margin-bottom: 30px; line-height: 1.1em; } h3 { text-align: center; font-size: 25px; margin-top: 32px; } h4 { font-size: 1.5em; } .overview { @extend .group; .compass { width: 330px; float: left; h4:before { content: "k"; } } .sass { width: 350px; float: right; h4:before { content: "2"; } } .info-box { padding: 20px; h4 { padding-bottom: 12px; margin-bottom: 12px; padding-left: 40px; text-indent: -18px; line-height: 1.333em; &:before { @extend .pictos; color: #fb292d; display: inline-block; font-size: 1.2em; padding-right: .3em; } } } ol { padding-left: 18px; text-indent: -18px; list-style: inside decimal; margin-bottom: 0; } p { margin-bottom: 0; } ol, p { line-height: 1.8em; font-size: .95em;} } } ul#featured_sites { @extend .group; overflow: visible; margin-top: 30px; list-style: none; padding: 0px; li { float: left; text-shadow: none; overflow: visible; position: relative; &:nth-child(3n+2){ margin: 0 7px; } &:nth-child(1n+4){ margin-top: 7px; } &:nth-child(3n+4){ clear: left; } padding: 6px; a { text-decoration: none; } img { float: left; width: 240px; } span { display: none;} &:hover { z-index: 100; padding: 3px 2px; img { width: 248px; } span { display: block; position: absolute; text-shadow: none;} } .url { bottom: 2px; left: 2px; right: 2px; background: #000; background: rgba(#000, .8); z-index: 102; padding: 2.2em 10px 6px; font-size: .8em; border-top: 1px solid rgba(#fff, .2); } .title { bottom: 1.7em; left: 0; z-index: 103; text-decoration: none; padding: 0 11px; color: #fff; } } } section.book, section.gui { width: 48%; float: left; @extend .group; h3 { margin-bottom: 1em; height: 2em; text-align: left; } } section.book { margin-right: 2%; img { float: left; margin-right: 1em; margin-bottom: 1em; } } section.gui { text-align: center; .note { font-size: smaller; } } html.light body#home { h1#logo { background-position: bottom;} } ================================================ FILE: compass-style.org/content/stylesheets/partials/_install.scss ================================================ body#install { #steps, p.madlib, p.note, h4 { margin-top: 1em; } p.note { font-size: smaller; font-style: italic; } p.warning { color: #c00; } .customization { display: none; } .customizable .customization { display: inline; } blockquote { border-left: 2px solid #ccc; text-indent: 0; padding-left: 0.5em; } .customization input { width: 8em; } } ================================================ FILE: compass-style.org/content/stylesheets/partials/_layout.scss ================================================ $min-width: 700px; $side-nav-width: 160px; $main-min-width: $min-width - $side-nav-width; body { max-width: 1500px; min-width: $min-width; margin: 0 auto; @extend .sans-font; line-height: 1.45em; } #wrap { @extend .group; padding: 0 20px 20px; } #page { @extend .group; padding-bottom: 30px; } footer { @extend .group; clear: both; padding-top: 20px;} header { padding: 22px 0 0; position: relative; } #page aside + article { margin-left: $side-nav-width + 22px; padding-left: 23px; } aside { float: left; width: $side-nav-width; position: relative; z-index: 2;} body#home #page article { padding-left: 0;} body.site, body#changelog, body.default { max-width: 1024px; } ================================================ FILE: compass-style.org/content/stylesheets/partials/_main.scss ================================================ body.get-involved h1 + p { font-size: 1.2em; line-height: 1.45em; } #page { position: relative; padding-top: 40px; & > article { padding-top: 10px; font-size: 15px; img { max-width: 100%; } } } #theme_pref { a { display: block; font-size: 18px; width: .9em; position: relative; text-decoration: none; @extend .pictos; } } #docs_panel { position: absolute; top: 0; right: 0; width: 100%; & > div { float: right; margin-left: 10px; @include round-bottom-corners; border: 1px solid; border-top: 0;} a { text-decoration: none; } #theme_pref { padding: 3px 12px 6px; a { position: relative; top: 2px;} } #version { font-size: .75em; padding: 4px 0 5px; background: none; border: none; position: absolute; left: 0; a { @include hover-link; } } } #syntax_pref, .syntax_pref { padding: 4px 8px 5px; a { font-size: .9em; padding: 0px 6px 1px; display: inline-block; line-height: 1.45em;} } .syntax_pref { float: left; @include round-top-corners; border: 1px solid; border-bottom: 0; a { text-decoration: none; } } footer { .links { float: left; font-size: .9em; img { vertical-align: middle; padding-right: 5px; position: relative; top: -2px;} span { position: relative; top: -1px; } ul { @include horizontal-list(15px); overflow: visible; li { padding-top: 3px; } li:last-child {border: 0; @include box-shadow(none); } } } } #page article h2 { margin-top: 1.5em; } h2 a.help { text-indent: -9999px; display: inline-block; position: relative; text-decoration: none; @include opacity(.3); &:hover { @include opacity(.7); } &:before { @extend .pictos; content: "?"; text-indent: 0; position: absolute; top: 2px; left: 0; font-size: .85em; } } hr { height: 0px; border: 0; border-bottom-width: 4px; margin: 3em 0; background: transparent; } ================================================ FILE: compass-style.org/content/stylesheets/partials/_nav.scss ================================================ .triangle-marker { border-color: transparent transparent; content: "\00a0"; height: 0; width: 0; position: absolute; border-style: solid; } nav a { @include hover-link; } nav .selected a:hover { text-decoration: none;} header { @extend .group; font-size: 1.3em; @extend .heading-font; border-width: 4px;} #main-nav { display: inline-block; padding-bottom: 10px; ul { @include horizontal-list(10px); line-height: 2em; }} #sub-nav { @extend .group; padding: 8px 0; } #docs-nav, #module-nav { display: inline-block; float: left; a { padding: 2px 10px; display: inline-block; }} #docs-nav { padding-right: 30px; & + #module-nav { padding-left: 20px; }} #module-nav { display: inline-block; ul { @include horizontal-list(false); }} body.getting-started #module-nav li.getting-started, body.tutorial #module-nav li.tutorials, body.support #module-nav li.support, #module-nav li.selected { position: relative; a { text-decoration: none; } a:before{ @extend .triangle-marker; border-width: 0 8px 8px; z-index: 2; bottom: -9px; left: 50%; margin-left: -8px; border-bottom-color: #121212; } &:before { @extend .triangle-marker; border-bottom-color: #414141; border-width: 0 6px 6px; z-index: 3; bottom: -9px; left: 50%; margin-left: -6px; } &:after { @extend .triangle-marker; border-bottom-color: #343434; border-width: 0 5px 5px; z-index: 3; bottom: -10px; left: 50%; margin-left: -5px; } } #search-docs { width: 170px; float: right; position: relative; top: .3em; //position: absolute; top: 29px; right: 0; &:before { content: "s"; display: block; @extend .pictos; position: absolute; left: 6px; top: 4px; font-size: .8em; z-index: 20; @include opacity(.8) } input { @extend .sans-font; @include round-corners; @include box-sizing(border-box); width: 170px; border: 0; margin: 0; padding: 5px 8px 5px 26px; font-size: .8em; float: right; position: relative; } } ================================================ FILE: compass-style.org/content/stylesheets/partials/_sidebar.scss ================================================ aside { padding-top: 15px; text-align: right; padding-right: 22px; h2, h3 { text-align: left; font-size: 1.3em; line-height: 1.45em; padding-bottom: .2em; margin-bottom: .4em; @extend .clear-border-radius; } h3 { padding: 0 0 .5em; line-height: 1.1em; } a { font-size: .85em; } ul ul a { &.selected, &.selected:hover { font-weight: bold; text-decoration: underline; } } .deprecated { text-decoration: line-through; } .beta span:after { content: " (\3B2)"; } } ================================================ FILE: compass-style.org/content/stylesheets/partials/_theme.scss ================================================ @mixin site-theme($theme, $page-bg, $text, $strong-text, $heading, $link, $code, $search, $nav-link, $main-nav, $main-nav-selected, $option-panel-border, $option-panel-bg){ background: $page-bg; body { background: $page-bg; color: $text; a { color: $link; } } #page { @extend .horizontal-rule-#{$theme}; } header { @extend .horizontal-rule-#{$theme}; border-width: 4px; } nav a { color: $nav-link; } #main-nav a { color: $main-nav;} body#home #main-nav a[rel=home], body#help #main-nav a[rel=help], body.tutorial #main-nav a[rel=tutorial], body.reference #main-nav a[rel=documentation], body#changelog #main-nav a[rel=documentation], body.demo #main-nav a[rel=documentation], body#get-involved #main-nav a[rel=get-involved]{ color: $main-nav-selected; } #search-docs input { @extend .inset-panel-#{$theme}; color: $search; &::-webkit-input-placeholder { color: $search; } } #{headings()}{ color: $heading; strong { color: $main-nav-selected; } em { color: $code; } } #page > article h2 { @extend .horizontal-rule-top-#{$theme}; } hr { @extend .horizontal-rule-#{$theme}; border-bottom-width: 8px} body#home h2 { @extend .horizontal-rule-#{$theme}; } #page aside + article { @extend .vertical-rule-left-#{$theme}; } aside { h2 a { color: $strong-text; } h2, h3 { @extend .horizontal-rule-#{$theme}; } } footer .links li { @extend .vertical-rule-#{$theme}; } code { @extend .code-block-#{$theme}; color: $code; } #theme_pref { @extend .theme-switch-#{$theme}; } #docs_panel div, .syntax_pref { background: $option-panel-bg; border-color: $option-panel-border; } body#home .overview .info-box { @extend .inset-panel-#{$theme}; h4 { @extend .horizontal-rule-#{$theme}; } } #featured_sites li { @extend .inset-panel-#{$theme}; } body.tutorial #page article img { @extend .image-border-#{$theme}; } } @mixin docs-theme($theme, $heading, $code, $nav-link, $docs-nav-selected, $module-nav-selected){ #page > article { h1 { @extend .horizontal-rule-#{$theme}; } h2 { @extend .horizontal-rule-top-#{$theme}; } h3 { @extend .heading-panel-#{$theme}; } h1 + h2, hr + h2 { @extend .clear-box-shadow; border-top: 0; margin-top: 0;} } #sub-nav { @extend .horizontal-rule-#{$theme}; } #docs-nav { @extend .vertical-rule-#{$theme}; } body.core a[rel=core], body.blueprint a[rel=blueprint]{ @extend .inset-panel-#{$theme}; color: $docs-nav-selected; @extend .round-corners-4;} #main-nav a[rel=home] { @include replace-text-with-dimensions("compass-logo-small-#{$theme}.png"); display: inline-block; float: left; } #module-nav { ul { overflow: visible; }} body.getting-started #module-nav li.getting-started, body.tutorial #module-nav li.tutorials, body.support #module-nav li.support, #module-nav li.selected { @extend .selected-marker-#{$theme}; a { color: $module-nav-selected; } } a[rel=sass], a[rel=scss], a[rel=css], a[rel=html], a[rel=haml] { @extend .syntax-switch-#{$theme}; } &.sass a[rel=sass], &.scss a[rel=scss], &.css a[rel=css], &.html a[rel=html], &.haml a[rel=haml] { color: $heading; color: rgba($heading, .7); @extend .round-corners-em; @extend .inset-panel-#{$theme}; } #version { color: rgba($heading, .3); a { color: rgba($nav-link, .7); } } .mixin-source, .example-source, .function-source, .selector-source { @extend .mixin-panel-#{$theme}; .container textarea { color: $code; } } h2 a.help { color: $heading;} .source-documentation { @extend .doc-panel-#{$theme}; } #demo { @extend .demo-#{$theme}; } .arg { color: $code; } .arg[data-default-value] { color: rgba($code, .7); } a[rel="view source"]{ color: rgba($heading, .5); &:hover{ color: rgba($heading, .8);} } } // Dark theme .inset-panel-dark { @include box-shadow(rgba(#fff, .1) 0 1px 0, rgba(#000, .8) 0 1px 7px 0px inset); background: darken(#2f2f2f, 6); background-color: rgba(#000, .3); } .horizontal-rule-dark { @include box-shadow(rgba(#fff, .07) 0 1px 0); border-bottom: 1px solid #121212; } .horizontal-rule-top-dark { @include box-shadow(rgba(#fff, .07) 0 1px 0 inset); border-top: 1px solid #121212; } .vertical-rule-dark { @include box-shadow(rgba(#fff, .07) 1px 0 0); border-right: 1px solid #121212; } .vertical-rule-left-dark { @include box-shadow(rgba(#fff, .07) 1px 0 0 inset); border-left: 1px solid #121212; } .code-block-dark { @extend .code-block; @extend .inset-panel-dark; } .demo-dark { @include box-shadow(rgba(#000, .5) 0 2px 10px inset, rgba(#fff, .3) 0 1px 2px 0px, rgba(#000, .8) 0 0 0 1px inset); } .heading-panel-dark { background: darken(#2f2f2f, 6); background: rgba(#000, .2); @include box-shadow(rgba(#000, .2) 0 0 0 1px inset); a:hover { color: #fff; .arg { color: rgba(#fff, .6);} } } .doc-panel-dark { background: darken(#2f2f2f, 4); background: rgba(#000, .1); @include box-shadow(rgba(#000, .2) 0 0 0 1px inset); } .syntax-switch-dark { color: #000; text-shadow: rgba(#fff, .08) 0 1px 0; &:hover { color: #fff; text-shadow: #000 0 1px 0; } } .theme-switch-dark { cursor: pointer; a { color: #000; color: rgba(#000, .8); text-shadow: rgba(#fff, .08) 0 1px 0; } &:hover a { color: #eee; text-shadow: #000 0 1px 0; } } .selected-marker-dark { a:before{ border-bottom-color: #121212; } &:before { border-bottom-color: #414141; } &:after { border-bottom-color: #323232; } } .mixin-panel-dark { @extend .inset-panel-dark; td.gutter { background: rgba(#fff, .05); .line { border-right: 2px solid rgba(#fff, .15); color: rgba(#fff, .5); }} .container textarea { background: darken(#2f2f2f, 6); } } .image-border-dark { border:2px solid #BFBFBF; @extend .round-corners-4; } @mixin dark-theme($docs: false) { $page-bg: #2f2f2f; $text: #c6c6c6; $heading: white; $strong-text: #dbdbdb; $search: #6e6e6e; $code: #dadbb1; $nav-link: #bfbfbf; $link: saturate(lighten(#85AFC9, 4), 19); $main-nav: white; $main-nav-selected: #fb292d; $docs-nav-selected: $strong-text; $module-nav-selected: $link; $option-panel-border: rgba(#000, .5); $option-panel-bg: rgba(#fff, .06); @include site-theme(dark, $page-bg, $text, $strong-text, $heading, $link, $code, $search, $nav-link, $main-nav, $main-nav-selected, $option-panel-border, $option-panel-bg); @if($docs){ @include docs-theme(dark, $heading, $code, $nav-link, $docs-nav-selected, $module-nav-selected); .syntaxhighlighter, pre, pre .code-block:first-child { &::-webkit-scrollbar-track-piece { -webkit-box-shadow: rgba(#000, .5) 0 0 3px 1px inset; background: rgba(#000, .2); } } .syntaxhighlighter, pre, pre .code-block:first-child { &::-webkit-scrollbar-thumb:horizontal { background: -webkit(linear-gradient(rgba(#fff, .3), rgba(#fff, 0))) #000; -webkit-box-shadow: rgba(black, 0.8) 0px 0 0 1px inset; } } } } // Light Theme .inset-panel-light { @include box-shadow(rgba(#fff, 1) 0 1px 0, rgba(#000, .5) 0 1px 3px 0px inset); text-shadow: 0 1px 1px #fff; background: darken(#fff, .04); background-color: rgba(#000, .04); } .horizontal-rule-light { @include box-shadow(#fff 0 1px 0); border-bottom: 1px solid #bbb; } .horizontal-rule-top-light { @include box-shadow(#fff 0 1px 0 inset); border-top: 1px solid #bbb; } .vertical-rule-light { @include single-box-shadow(1px, 0, 0, $color: rgba(#fff, 1)); border-right: 1px solid #bbb; } .vertical-rule-left-light { @include single-box-shadow(1px, 0, 0, $color: rgba(#fff, 1), $inset: inset); border-left: 1px solid #bbb; } .code-block-light { @extend .code-block; @extend .inset-panel-light; background: rgba(#fff, .5); } .demo-light { @include box-shadow(rgba(#000, .3) 0 2px 10px inset, #fff 0 1px 2px 0px, rgba(#000, .05) 0 0 0 1px inset); } .syntax-switch-light { color: rgba(#000, .3); text-shadow: rgba(#fff, .08) 0 1px 0; &:hover { color: #000; text-shadow: #fff 0 1px 0; }} .theme-switch-light { cursor: pointer; a {color: rgba(#000, .2); text-shadow: rgba(#fff, 1) 0 1px 0;} &:hover a { color: #000; } } .heading-panel-light { background: rgba(#fff, .5); @include box-shadow(rgba(#000, .13) 0 0 0 1px inset); a:hover { color: #000; .arg { color: rgba(#000, .6); } } } .selected-marker-light { a:before{ border-bottom-color: #bbbbbb; } &:before { border-bottom-color: #fff; } &:after { border-bottom-color: #e5e5e5; } } .doc-panel-light { background: rgba(#000, .03); text-shadow: rgba(#fff, .9) 0 1px 1px; @include box-shadow(rgba(#000, .15) 0 0 0 1px inset); } .mixin-panel-light, .function-panel-light, .selector-panel-light { @extend .inset-panel-light; background: rgba(#fff, .8); td.gutter { background: rgba(#000, .08); .line { border-right: 2px solid rgba(#000, .2); color: rgba(#000, .4); } } .container textarea { background: darken(#fff, .04); } } .image-border-light { border:2px solid #444444; @extend .round-corners-4; } @mixin light-theme($docs: false) { $page-bg: #ececec; // image-url('bg-light.jpg'); $text: #111; $heading: #222; $strong-text: #000; $search: #666; $link: #307eb6; $nav-link: #444; $code: #222; $main-nav: #000; $main-nav-selected: darken(#fb292d, 15); $docs-nav-selected: $strong-text; $module-nav-selected: $link; $option-panel-border: rgba(#000, .2); $option-panel-bg: #fff; @include site-theme(light, $page-bg, $text, $strong-text, $heading, $link, $code, $search, $nav-link, $main-nav, $main-nav-selected, $option-panel-border, $option-panel-bg); @if($docs){ @include docs-theme(light, $heading, $code, $nav-link, $docs-nav-selected, $module-nav-selected); .syntaxhighlighter::-webkit-scrollbar-track-piece { -webkit-box-shadow: rgba(#000, .3) 0 0 3px 1px inset; background: rgba(#ddd, .8); } .syntaxhighlighter::-webkit-scrollbar-thumb:horizontal { background: -webkit(linear-gradient(rgba(#000, 0) 40%, rgba(#000, .2))) #fff; -webkit-box-shadow: rgba(black, 0.2) 0px 0 0 1px inset; } } } ================================================ FILE: compass-style.org/content/stylesheets/partials/_typography.scss ================================================ @font-face { font-family: "pictos-web"; src: url('/otherfonts/pictos-web.eot'); src: local("?"), url('/otherfonts/pictos-web.woff') format('woff'), url('/otherfonts/pictos-web.ttf') format('truetype'), url('/otherfonts/pictos-web.svg#webfontIyfZbseF') format('svg');} @include font-face("museosans-web", font-files("museosans-web.woff", woff, "museosans-web.ttf", truetype, "museosans-web.svg#webfontJHBEijmD", svg), 'museosans-web.eot'); .sans-font { font-family: 'Lucida Grande', Arial, sans-serif; } .heading-font { font-family: 'Museo Sans', "museosans-web", 'serif'; } .pictos { font-family: pictos, pictos-web; font-weight: normal; font-style: normal;} .fixed-font { font-family: menlo, monaco, "andale mono", "courier new", fixed;} #page { line-height: 1.45em; ol { list-style: outside decimal; padding-left: 2.5em; } ol ol { list-style: outside lower-alpha; padding-left: 2.5em; } ul, ol, dl { margin-bottom: 1.5em;} p { margin-bottom: 1.2em;} #{headings(1,2)}{ @extend .heading-font; line-height: 1.2em; } h1 { font-size: 35px; margin-bottom: 15px; padding-bottom: 6px; } h2 { font-size: 26px; margin: 1em 0 15px; padding-bottom: 6px; } h3 { font-size: 18px; } h4 { font-size: 18px; margin: .4em 0; } ul { list-style: inside disc; } dt { font-weight: bold; } } #page aside { ul { list-style: none; margin-bottom: 1em;} h2 { line-height: 1.3em; margin-top: 0; padding-top: 3px;} } em { font-style: italic; } strong { font-weight: bold; } #page > article { ul ul { padding-left: 1em; } position: relative; h2 { font-size: 26px; margin: .5em 0 .6em; padding: 1em 0 6px;} hr + h2 { padding-top: 0; } hr + h3, h4, h5 { margin-top: 0; } } dl.table dt, dl.table dd { display: inline-block; } dg { display: block; margin-bottom: 1.5em; } .warning { color: #c00; } ================================================ FILE: compass-style.org/content/stylesheets/screen.scss ================================================ @import "compass"; @import "compass/layout"; @import "core/extensions"; @include global-reset; @include reset-html5; @import "core/base-classes"; @import "core/media-block"; @import "partials/theme"; @import "partials/layout"; @import "partials/typography"; @import "partials/nav"; @import "partials/sidebar"; @import "partials/ads"; @import "partials/main"; @import "partials/code"; @import "partials/example"; @import "partials/install"; @import "partials/blog"; @import "syntax/syntax-theme"; @import "core/clearing-classes"; html.dark { @include dark-theme(true); } html.light { @include light-theme(true); } footer { margin: 0 auto; width: 640px; } blockquote { @extend code; } #page h3 { padding-left: 0; } ================================================ FILE: compass-style.org/content/stylesheets/syntax/_shCore.scss ================================================ @mixin round_corners_custom($top, $right, $bottom, $left) { -moz-border-radius: $top $right $bottom $left !important; -webkit-border-radius: $top $right $bottom $left !important; } @mixin round_corners($radius) { @include round_corners_custom($radius, $radius, $radius, $radius); } .syntaxhighlighter { a, div, code, table, table td, table tr, table tbody, table thead, table caption, textarea { @include round_corners(0); background: none !important; border: 0 !important; bottom: auto !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0 !important; outline: 0 !important; overflow: visible !important; padding: 0 !important; position: static !important; right: auto !important; text-align: left !important; top: auto !important; vertical-align: baseline !important; width: auto !important; box-sizing: content-box !important; font: { family: "Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; weight: normal !important; style: normal !important; size: 1em !important; } min: { // For IE8, FF & WebKit height: inherit !important; // For IE7 height: auto !important; } } } .syntaxhighlighter { width: 100% !important; margin: 1em 0 1em 0 !important; position: relative !important; overflow: auto !important; font-size: 1em !important; &.source { overflow: hidden !important; } // set up bold and italic .bold { font-weight: bold !important; } .italic { font-style: italic !important; } .line { white-space: pre !important; } // main table and columns table { width: 100% !important; caption { text-align: left !important; padding: .5em 0 0.5em 1em !important; } td.code { width: 100% !important; .container { position: relative !important; textarea { box-sizing: border-box !important; position: absolute !important; left: 0 !important; top: 0 !important; width: 100% !important; height: 100% !important; border: none !important; background: white !important; padding-left: 1em !important; overflow: hidden !important; white-space: pre !important; } } } // middle spacing between line numbers and lines td.gutter .line { text-align: right !important; padding: 0 0.5em 0 1em !important; } td.code .line { padding: 0 1em !important; } } &.nogutter { td.code { .container textarea, .line { padding-left: 0em !important; } } } &.show { display: block !important; } // Adjust some properties when collapsed &.collapsed { table { display: none !important; } .toolbar { padding: 0.1em 0.8em 0em 0.8em !important; font-size: 1em !important; position: static !important; width: auto !important; height: auto !important; span { display: inline !important; margin-right: 1em !important; a { padding: 0 !important; display: none !important; &.expandSource { display: inline !important; } } } } } // Styles for the toolbar .toolbar { position: absolute !important; right: 1px !important; top: 1px !important; width: 11px !important; height: 11px !important; font-size: 10px !important; z-index: 10 !important; span.title { display: inline !important; } a { display: block !important; text-align: center !important; text-decoration: none !important; padding-top: 1px !important; &.expandSource { display: none !important; } } } &.ie { font-size: .9em !important; padding: 1px 0 1px 0 !important; .toolbar { line-height: 8px !important; a { padding-top: 0px !important; } } } // Print view. // Colors are based on the default theme without background. &.printing { .line.alt1 .content, .line.alt2 .content, .line.highlighted .number, .line.highlighted.alt1 .content, .line.highlighted.alt2 .content { background: none !important; } // Gutter line numbers .line { .number { color: #bbbbbb !important; } // Add border to the lines .content { color: black !important; } } // Toolbar when visible .toolbar { display: none !important; } a { text-decoration: none !important; } .plain, .plain a { color: black !important; } .comments, .comments a { color: #008200 !important; } .string, .string a { color: blue !important; } .keyword { color: #006699 !important; font-weight: bold !important; } .preprocessor { color: gray !important; } .variable { color: #aa7700 !important; } .value { color: #009900 !important; } .functions { color: #ff1493 !important; } .constants { color: #0066cc !important; } .script { font-weight: bold !important; } .color1, .color1 a { color: gray !important; } .color2, .color2 a { color: #ff1493 !important; } .color3, .color3 a { color: red !important; } .break, .break a { color: black !important; } } } ================================================ FILE: compass-style.org/content/stylesheets/syntax/_shThemeRDark.scss ================================================ // Dark Theme $background: none; $line_highlighted_background: #323E41; $line_highlighted_number: #b9bdb6; $gutter_text: #afafaf; $gutter_border_color: rgba(#fff, .15); $toolbar_collapsed_a: #5ba1cf; $toolbar_collapsed_a_hover: #5ce638; $toolbar_collapsed_background: #000; $toolbar_a: #fff; $toolbar_a_hover: #e0e8ff; $code_plain: #dadbb1; $code_comments: #878a85; $code_string: #64b041; $code_keyword: #6cc7eb; $code_preprocessor: #cd5c57; $code_variable: $code_keyword; $code_value: #ffa0a0; $code_functions: #3d95e6; $code_constants: #e0e8ff; $code_script: $code_keyword; $code_script_background: none; $code_color1: #b0b76b; $code_color2: #98f77a; $code_color3: #ffaa3e; $code_color4: $code_plain; //@import "theme_template.scss"; // Interface elements. html.dark .syntaxhighlighter { // Actual syntax highlighter colors. .plain, .plain a { color: $code_plain; } .comments, .comments a { color: $code_comments; } .string, .string a { color: $code_string; } .keyword { color: $code_keyword; } .preprocessor { color: $code_preprocessor; } .variable { color: $code_variable; } .value { color: $code_value; } .functions { color: $code_functions; } .constants { color: $code_constants; } .script { font-weight: bold; color: $code_script; background-color: $code_script_background; } .color1, .color1 a { color: $code_color1; } .color2, .color2 a { color: $code_color2; } .color3, .color3 a { color: $code_color3; } .color4, .color4 a { color: $code_color4; } } // Light Theme $background: none; $line_highlighted_background: #c3defe; $line_highlighted_number: #fff; $gutter_text: #787878; $gutter_border_color: #d4d0c8; $toolbar_collapsed_a: #3f5fbf; $toolbar_collapsed_a_hover: #aa7700; $toolbar_collapsed_background: #fff; $toolbar_a: #a0a0a0; $toolbar_a_hover: red; $code_plain: black; $code_comments: #3f5fbf; $code_string: #4fa33f; $code_keyword: #7f0055; $code_preprocessor: #006699; $code_variable: #aa7700; $code_value: #4fa33f; $code_functions: #b553ba; $code_constants: #0066cc; $code_color1: gray; $code_color2: #ca6436; $code_color3: red; $code_color4: $code_plain; // Interface elements. html.light .syntaxhighlighter { // Actual syntax highlighter colors. .plain, .plain a { color: $code_plain; } .comments, .comments a { color: $code_comments; } .string, .string a { color: $code_string; } .keyword { color: $code_keyword; } .preprocessor { color: $code_preprocessor; } .variable { color: $code_variable; } .value { color: $code_value; } .functions { color: $code_functions; } .constants { color: $code_constants; } .script { font-weight: bold; color: $code_script; background-color: $code_script_background; } .color1, .color1 a { color: $code_color1; } .color2, .color2 a { color: $code_color2; } .color3, .color3 a { color: $code_color3; } .color4, .color4 a { color: $code_color4; } } ================================================ FILE: compass-style.org/content/stylesheets/syntax/_syntax-theme.scss ================================================ // Default Syntax Highlighter theme. //@import "shCore.scss"; @import "shThemeRDark.scss"; /*.syntaxhighlighter { .keyword { font-weight: bold !important; } }*/ ================================================ FILE: compass-style.org/content/stylesheets/syntax/_theme_template.scss ================================================ $background: white !default; $line_alt1_background: $background !default; $line_alt2_background: $background !default; $line_highlighted_background: #e0e0e0 !default; $line_highlighted_number: black !default; $gutter_text: #afafaf !default; $gutter_border_color: #6ce26c !default; $gutter_border: 3px solid $gutter_border_color !default; $toolbar_collapsed_a: #00f !default; $toolbar_collapsed_a_hover: #f00 !default; $toolbar_collapsed_background: #fff !default; $toolbar_collapsed_border: 1px solid $gutter_border_color !default; $toolbar_a: #fff !default; $toolbar_a_hover: #000 !default; $toolbar_background: $gutter_border_color !default; $toolbar_border: none !default; $code_plain: black !default; $code_comments: #008200 !default; $code_string: blue !default; $code_keyword: #006699 !default; $code_preprocessor: gray !default; $code_variable: #aa7700 !default; $code_value: #009900 !default; $code_functions: #ff1493 !default; $code_constants: #0066cc !default; $code_script: $code_keyword !default; $code_script_background: none !default; $code_color1: gray !default; $code_color2: #ff1493 !default; $code_color3: red !default; $caption_color: $code_plain !default; // Interface elements. .syntaxhighlighter { background-color: $background !important; // Highlighed line number .line { &.alt1 { background-color: $line_alt1_background !important; } &.alt2 { background-color: $line_alt2_background !important; } // Highlighed line &.highlighted { &.alt1, &.alt2 { background-color: $line_highlighted_background !important; } &.number { color: $line_highlighted_number !important; } } } table { caption { color: $caption_color !important; } } // Add border to the lines .gutter { color: $gutter_text !important; .line { border-right: $gutter_border !important; &.highlighted { background-color: $gutter_border_color !important; color: $background !important; } } } &.printing .line .content { border: none !important; } &.collapsed { overflow: visible !important; .toolbar { color: $toolbar_collapsed_a !important; background: $toolbar_collapsed_background !important; border: $toolbar_collapsed_border !important; a { color: $toolbar_collapsed_a !important; &:hover { color: $toolbar_collapsed_a_hover !important; } } } } .toolbar { color: $toolbar_a !important; background: $toolbar_background !important; border: $toolbar_border !important; a { color: $toolbar_a !important; &:hover { color: $toolbar_a_hover !important; } } } // Actual syntax highlighter colors. .plain, .plain a { color: $code_plain !important; } .comments, .comments a { color: $code_comments !important; } .string, .string a { color: $code_string !important; } .keyword { color: $code_keyword !important; } .preprocessor { color: $code_preprocessor !important; } .variable { color: $code_variable !important; } .value { color: $code_value !important; } .functions { color: $code_functions !important; } .constants { color: $code_constants !important; } .script { font-weight: bold !important; color: $code_script !important; background-color: $code_script_background !important; } .color1, .color1 a { color: $code_color1 !important; } .color2, .color2 a { color: $code_color2 !important; } .color3, .color3 a { color: $code_color3 !important; } } ================================================ FILE: compass-style.org/layouts/article.haml ================================================ - render 'basic' do #wrap = render "partials/main-navigation" #page #docs_panel #theme_pref %a{:href => "#", :rel => "theme", :title => "switch theme" } Q -#syntax_pref %a{:href => "#", :rel => "scss" } scss %a{:href => "#", :rel => "sass" } sass #version Version: %a.number(href="/CHANGELOG/")= compass_version %article= yield %footer(role="contentinfo")= render "partials/footer" = content_for(@item, :javascripts) = render "partials/analytics" ================================================ FILE: compass-style.org/layouts/basic.haml ================================================ !!!5 - # This template is just the stuff until the body tag. %html.no-js{:dir => "ltr", :lang => "en"} %head %meta{:charset => "utf-8"}/ %meta{:content => "chrome=1", "http-equiv" => "X-UA-Compatible"} %meta(name="viewport" content="width=780") - if ENV["BETA"] %meta(name="robots" content="noindex") %link(rel="shortcut icon" type="image/png" href="/images/compass_icon.png") %link{:href=>"/blog/atom.xml", :rel=>"alternate", :title=>"Compass Blog", :type=>"application/atom+xml"} %title #{@item[:title]} | Compass Documentation %link{:charset => "utf-8", :href => "/stylesheets/screen.css", :rel => "stylesheet", :type => "text/css"} = render "partials/js-core" = render "partials/js-highlighter" /[if lte IE 8] %link{:charset => "utf-8", :href => "/stylesheets/ie.css", :rel => "stylesheet", :type => "text/css"} - if content_for(@item, :additional_css) %style(type="text/css")= content_for(@item, :additional_css) %body{body_attributes(@item)}= yield ================================================ FILE: compass-style.org/layouts/blog.haml ================================================ - render "basic" do #wrap = render "partials/main-navigation" #sub-nav - p = previous_post - n = next_post - if p || n %nav#docs-nav{:role => "navigation"} - if p %a{:href => p.rep_named(:default).path, :title => p[:title]} « Previous Post - if n %a{:href => n.rep_named(:default).path, :title => n[:title]} Next Post » #page #docs_panel #theme_pref %a{:href => "#", :rel => "theme", :title => "switch theme" } Q #version Version: %a.number(href="/CHANGELOG/")= compass_version = yield %footer(role="contentinfo")= render "partials/footer" = content_for(@item, :javascripts) = render "partials/analytics" ================================================ FILE: compass-style.org/layouts/core.haml ================================================ - render 'main' do - content_for :module_nav do %ul= item_tree(reference_item(:stylesheet => "compass.scss"), :depth => 1, :omit_self => true, :headings => false) %aside(role="sidebar")= render 'partials/sidebar', :default_stylesheet => "_compass.scss", :omit_self => false, :heading_level => 2, :heading_depth => 1 %article= yield ================================================ FILE: compass-style.org/layouts/default.haml ================================================ !!!5 %html.no-js{:dir => "ltr", :lang => "en"} %head %meta{:charset => "utf-8"}/ %meta{:content => "chrome=1", "http-equiv" => "X-UA-Compatible"} %meta(name="viewport" content="width=780") - if ENV["BETA"] %meta(name="robots" content="noindex") %link(rel="shortcut icon" type="image/png" href="/images/compass_icon.png") %title #{@item[:title]} | Compass Documentation %link{:charset => "utf-8", :href => "/stylesheets/screen.css", :rel => "stylesheet", :type => "text/css"} = render "partials/js-core" %body.default{body_attributes(@item)} #wrap = render "partials/main-navigation" #page #docs_panel #theme_pref %a{:href => "#", :rel => "theme", :title => "switch theme" } Q #version Version: %a.number(href="/CHANGELOG/")= compass_version %article= yield %footer(role="contentinfo")= render "partials/footer" = render "partials/analytics" ================================================ FILE: compass-style.org/layouts/documentation.haml ================================================ - render 'site' do %aside(role="sidebar") %nav#local-nav %ul= item_tree(documentation_item(:root), :depth => 2, :omit_self => false, :heading_level => 2) %article= yield ================================================ FILE: compass-style.org/layouts/example.haml ================================================ - render 'basic' do - content_for(:additional_css) do = example_css #wrap = render "partials/main-navigation" #page #docs_panel #theme_pref %a{:href => "#", :rel => "theme", :title => "switch theme" } Q -#syntax_pref %a{:href => "#", :rel => "scss" } scss %a{:href => "#", :rel => "sass" } sass #version Version: %a.number(href="/CHANGELOG/")= compass_version %article= yield %footer(role="contentinfo")= render "partials/footer" = content_for(@item, :javascripts) = render "partials/analytics" ================================================ FILE: compass-style.org/layouts/homepage.haml ================================================ !!!5 %html.no-js{:dir => "ltr", :lang => "en"} %head %meta{:charset => "utf-8"}/ %meta{:content => "chrome=1", "http-equiv" => "X-UA-Compatible"} %meta(name="viewport" content="width=810") - if ENV["BETA"] %meta(name="robots" content="noindex") %link(rel="shortcut icon" type="image/png" href="/images/compass_icon.png") %title #{@item[:title]} | Compass Documentation %link{:charset => "utf-8", :href => "/stylesheets/home.css?v=1", :rel => "stylesheet", :type => "text/css"} = render "partials/js-core" /[if lte IE 8] %link{:charset => "utf-8", :href => "/stylesheets/ie.css", :rel => "stylesheet", :type => "text/css"} - if content_for(@item, :additional_css) %style(type="text/css")= content_for(@item, :additional_css) %body{body_attributes(@item)} #wrap = render "partials/main-navigation" #page #docs_panel #theme_pref %a{:href => "#", :rel => "theme", :title => "switch theme" } Q = yield %footer(role="contentinfo")= render "partials/footer" = render "partials/analytics" ================================================ FILE: compass-style.org/layouts/main.haml ================================================ - render "basic" do #wrap = render "partials/main-navigation" #sub-nav - if content_for(@item, :module_nav) %nav#module-nav= content_for(@item, :module_nav) #page #docs_panel #theme_pref %a{:href => "#", :rel => "theme", :title => "switch theme" } Q #syntax_pref %a{:href => "#", :rel => "scss" } scss %a{:href => "#", :rel => "sass" } sass #version Version: %a.number(href="/CHANGELOG/")= compass_version = yield %footer(role="contentinfo")= render "partials/footer" = content_for(@item, :javascripts) = render "partials/analytics" ================================================ FILE: compass-style.org/layouts/partials/ad.haml ================================================ .advertisement #fusion_ad %a.pagerankspam(href="http://fusionads.net") Powered by Fusion ================================================ FILE: compass-style.org/layouts/partials/analytics.haml ================================================ :plain ================================================ FILE: compass-style.org/layouts/partials/breadcrumbs.haml ================================================ - if breadcrumbs_trail.size > 1 %ol#breadcrumbs - breadcrumbs_trail.each_with_index do |bc, index| - next unless bc - klass = "first" if index == 0 - klass = "last" if index == breadcrumbs_trail.size - 1 %li{:class => klass}= link_to_unless_current((bc[:crumb] || bc[:title]), bc.reps.find { |r| r.name == :default }) ================================================ FILE: compass-style.org/layouts/partials/example.haml ================================================ - if @item[:stylesheet] && (reference = reference_item(:stylesheet => @item[:stylesheet])) #reference= link_to "Reference Documentation", reference %h1 Demo: #{@item[:title]} #demo= example_html = yield if block_given? #how %section#markup .syntax_pref %a{:href => "#", :rel => "html" } html %a{:href => "#", :rel => "haml" } haml .example-source %pre.source-code.html= h(example_html) %pre.source-code.haml= h(example_haml) %section#styles .syntax_pref %a{:href => "#", :rel => "scss" } scss %a{:href => "#", :rel => "sass" } sass %a{:href => "#", :rel => "css" } css .example-source %pre.source-code.scss= h(example_scss) %pre.source-code.sass= h(example_sass) %pre.source-code.css= h(example_css) ================================================ FILE: compass-style.org/layouts/partials/footer.haml ================================================ .links %ul %li.media .bd Christopher M.
    Eppstein %li Compass is Charityware -
    Help the UMDF: %a(href="http://umdf.org/compass") Donate Now! %li %strong Problem with this page?
    Please file a bug. :javascript $(function() { var href = $("#doc-issue").attr("href"); var body_contents = "On Page: "; body_contents += document.location.toString(); body_contents += "\n\nI was looking for:\n
    \n\nBut instead I found:\n\n" href = href + "&body=" + encodeURIComponent(body_contents); $("#doc-issue").attr("href", href) }); - if content_for(@item, :footer) %hr = content_for(@item, :footer) ================================================ FILE: compass-style.org/layouts/partials/js-core.haml ================================================ %script(src="/javascripts/modernizr-1.6.min.js" type="text/javascript") %script(src="/javascripts/jquery-1.3.2.min.js" type="text/javascript") %script(src="/javascripts/jquery.cookie.js" type="text/javascript") %script(src="/javascripts/placeholder.js" type="text/javascript" deferred) %script(src="/javascripts/site.js" type="text/javascript") %script(src="/javascripts/fixups.js" type="text/javascript" deferred) ================================================ FILE: compass-style.org/layouts/partials/js-highlighter.haml ================================================ %script(src="/javascripts/shCore.js" type="text/javascript" deferred) %script(src="/javascripts/shBrushSass.js" type="text/javascript" deferred) %script(src="/javascripts/shBrushCss.js" type="text/javascript" deferred) %script(src="/javascripts/shBrushXml.js" type="text/javascript" deferred) %script(src="/javascripts/shBrushPlain.js" type="text/javascript" deferred) ================================================ FILE: compass-style.org/layouts/partials/main-navigation.haml ================================================ %header#banner{:role => "banner"} %form#search-docs{:action => "/search/", :method => "GET"} %input#search{:name => "q", :type => "text", :value => "", :placeholder => "Search the docs"} %nav#main-nav{:role => "navigation"} %ul %li %a{:href => "/install/", :rel=> "install"} Install %li %a{:href => "/help/", :rel=> "help"} Help & Documentation %li %a{:href => "/reference/compass/", :rel => "documentation"} Code Reference %li %a{:href => "/blog/", :rel=> "blog"} Blog %li %a{:href => "/get-involved/", :rel=> "get-involved"} Contribute ================================================ FILE: compass-style.org/layouts/partials/reference/const_table.haml ================================================ - constants.each do |constant_def| - const_id = constant_def.name.gsub(/_/,'-') %h3.constant{:id=>"const-#{const_id}"} %a.permalink{:href => "#const-#{const_id}"}= "$"+constant_def.name %code= constant_def.expr.to_sass(:format => :html) - if constant_def.comment && constant_def.comment.strip.size > 0 %p= format_doc constant_def.comment ================================================ FILE: compass-style.org/layouts/partials/reference/constants.haml ================================================ - if (constant_defs = constants(@item)).any? - variables = constant_defs.select{|d| d.guarded } - constants = constant_defs.reject{|d| d.guarded } - if variables.any? %h2 Configurable Variables %a(href="/help/tutorials/configurable-variables/" class="help") help = render "partials/reference/const_table", :constants => variables - if constants.any? %h2 Constants = render "partials/reference/const_table", :constants => constants ================================================ FILE: compass-style.org/layouts/partials/reference/examples.haml ================================================ - if (examples = examples(@item)).any? %h2 Examples %dl.examples - examples.each do |example| %dt= link_to example.item[:title], example - if example.item[:description] %dd= example.item[:description] ================================================ FILE: compass-style.org/layouts/partials/reference/functions.haml ================================================ - if (functions = functions(@item)).any? %h2 Functions - functions.each do |function| %a{:href=>"#function-#{function.name}-source", :rel => "view source"} view source %h3.function{:id=>"function-#{function.name}"} %a.permalink{:href => "#function-#{function.name}"}= function.sass_signature(:html) .function-source{:id=>"function-#{function.name}-source"} %pre.source-code.sass= function.to_sass %pre.source-code.scss= function.to_scss .source-documentation = format_doc(function.comment) - if (examples = examples(@item, function)).any? %dl.examples - examples.each do |example| %dt= link_to example.item[:title], example - if example.item[:description] %dd= example.item[:description] ================================================ FILE: compass-style.org/layouts/partials/reference/import-few.haml ================================================ - if path = reference_path(:stylesheet => import) - imported_item = reference_item(:stylesheet => import) #{imported_item[:crumb] || imported_item[:title]}#{"," unless @last} ================================================ FILE: compass-style.org/layouts/partials/reference/import.haml ================================================ - if path = reference_path(:stylesheet => import) - imported_item = reference_item(:stylesheet => import) %a{:href => path, :title => "@import #{import}"}= imported_item[:crumb] || imported_item[:title] - if imported_item[:meta_description] – #{imported_item[:meta_description]} - else = import ================================================ FILE: compass-style.org/layouts/partials/reference/imports.haml ================================================ - if (imported_libs = imports(@item)).any? - if imported_libs.size == 1000 %p Automatically imports: - imported_libs.each do |import| = render "partials/reference/import-few", :import => import, :last => import == imported_libs.last - else %h2 Imports %ol - imported_libs.each do |import| %li= render "partials/reference/import", :import => import ================================================ FILE: compass-style.org/layouts/partials/reference/mixins.haml ================================================ - if (mixin_defs = mixins(@item)).any? %h2 Mixins - mixin_defs.each do |mixin| %a{:href=>"#mixin-#{mixin.name}-source", :rel => "view source"} view source %h3.mixin{:id=>"mixin-#{mixin.name}"} %a.permalink{:href => "#mixin-#{mixin.name}"}= mixin.sass_signature(:none, :html) .mixin-source{:id=>"mixin-#{mixin.name}-source"} %pre.source-code.sass= mixin.to_sass %pre.source-code.scss= mixin.to_scss .source-documentation = format_doc(mixin.comment) - if (examples = examples(@item, mixin)).any? %dl.examples - examples.each do |example| %dt= link_to example.item[:title], example - if example.item[:description] %dd= example.item[:description] ================================================ FILE: compass-style.org/layouts/partials/reference/selectors.haml ================================================ - if (sels = selectors(@item)).any? %h2 Selectors - sels.each do |selector| %a{:href=>"#selector-#{selector.identifier}-source", :rel => "view source"} view source %h3.selector{:id=>"selector-#{selector.identifier}"} %a.permalink{:href => "#selector-#{selector.identifier}"}= selector.name .selector-source{:id=>"selector-#{selector.identifier}-source"} %pre.source-code.sass= selector.to_sass %pre.source-code.scss= selector.to_scss .source-documentation = format_doc(selector.comment) ================================================ FILE: compass-style.org/layouts/partials/sidebar/container.haml ================================================ %ul= @contents ================================================ FILE: compass-style.org/layouts/partials/sidebar/heading.haml ================================================ %li{:class => ("selected" if @selected)} - haml_tag(@heading) do %a{:href => default_path(@current_item), :class => ("selected" if @selected)}= @crumb ================================================ FILE: compass-style.org/layouts/partials/sidebar/item.haml ================================================ - classes = [("selected" if @selected), ("deprecated" if @current_item[:deprecated]), ("beta" if @current_item[:beta])].compact.join(" ") %li{:class => classes} %a{:href => default_path(@current_item), :class => classes} %span= @crumb ================================================ FILE: compass-style.org/layouts/partials/sidebar.haml ================================================ %nav#local-nav - sidebar_item = reference_item(:stylesheet => @item[:nav_stylesheet]) if @item[:nav_stylesheet] - sidebar_item ||= sidebar_item(@item) - sidebar_item ||= reference_item(:stylesheet => @default_stylesheet) %ul= item_tree(sidebar_item, :depth => 1, :omit_self => get_var(:omit_self){true}, :heading_level => get_var(:heading_level){1}, :heading_depth => get_var(:heading_depth){10}) = render 'partials/ad' ================================================ FILE: compass-style.org/layouts/post.haml ================================================ - render "blog" do %h1= @item[:title] - author = author(@item[:author]) %h2 By - if author["byline_link"] %a{:href=>author["byline_link"]}= author["fullname"] - else = author["fullname"] = yield ================================================ FILE: compass-style.org/layouts/redirect.haml ================================================ !!!5 - # This template redirects. %html{:dir => "ltr", :lang => "en"} %head %meta{:"http-equiv" => "refresh", :content => "0;#{@item[:redirect]}"}/ ================================================ FILE: compass-style.org/layouts/reference.haml ================================================ - gh_url = "http://github.com/chriseppstein/compass/blob/stable/frameworks/" - gh_url << "#{item[:framework]}/stylesheets/#{item[:stylesheet]}" %a{:href => gh_url, :rel=>"github-source", :title=>"view source for this module on github"} Source on Github %h1= item[:title] - if item[:beta] %p.beta This module is fairly new and is currently in BETA (β). = yield if block_given? %p This file can be imported using: %code @import "#{departialize(item[:stylesheet][0..-6])}" = render "partials/reference/examples" = render "partials/reference/imports" = render "partials/reference/constants" = render "partials/reference/functions" = render "partials/reference/mixins" = render "partials/reference/selectors" ================================================ FILE: compass-style.org/layouts/simple_core.haml ================================================ - render 'main' do - content_for :module_nav do %ul= item_tree(reference_item(:stylesheet => "compass.scss"), :depth => 1, :omit_self => true, :headings => false) %aside(role="sidebar") %nav#local-nav = item_tree(reference_item(:stylesheet => (@item[:nav_stylesheet] || @default_stylesheet)), :depth => 2, :omit_self => get_var(:omit_self){false}, :heading_level => get_var(:heading_level){1}) %article= yield ================================================ FILE: compass-style.org/layouts/site.haml ================================================ !!!5 %html.no-js{:dir => "ltr", :lang => "en"} %head %meta{:charset => "utf-8"}/ %meta{:content => "chrome=1", "http-equiv" => "X-UA-Compatible"} %meta(name="viewport" content="width=780") - if ENV["BETA"] %meta(name="robots" content="noindex") %link(rel="shortcut icon" type="image/png" href="/images/compass_icon.png") %title #{@item[:title]} | Compass Documentation %link{:charset => "utf-8", :href => "/stylesheets/screen.css", :rel => "stylesheet", :type => "text/css"} = render "partials/js-core" %body.site{body_attributes(@item)} #wrap = render "partials/main-navigation" #sub-nav %nav#module-nav %ul %li.getting-started %a{:href => "/help/", :rel => "getting started"} Getting Started %li.tutorials %a{:href => "/help/tutorials/", :rel => "getting started"} Tutorials %li.examples %a{:href => "/examples/", :rel => "code examples"} Examples %li.documentation %a{:href => "/help/documentation/"} Documentation %li.support %a{:href => "http://groups.google.com/group/compass-users", :rel => "support"} Support %li %a{:href => "http://github.com/chriseppstein/compass/issues", :rel => "bugs"} Bugs #page #docs_panel #theme_pref %a{:href => "#", :rel => "theme", :title => "switch theme" } Q #version Version: %a.number(href="/CHANGELOG/")= compass_version = yield %footer(role="contentinfo")= render "partials/footer" = render "partials/analytics" ================================================ FILE: compass-style.org/layouts/tutorial.haml ================================================ - render 'site' do %aside(role="sidebar") %nav#local-nav %ul= item_tree(tutorial_item(:root), :depth => 2, :omit_self => false, :heading_level => 2) %article= yield ================================================ FILE: compass-style.org/lib/blog.rb ================================================ POST_NAME = %r{^/posts/(\d{4})-(\d{2})-(\d{2})-(.*)/$} require 'time' require 'yaml' def blog_posts_in_order @blog_posts_in_order ||= @items.select {|i| i.identifier =~ %r{/posts} }.sort_by {|i| i.identifier } end def previous_post(item = @item) current_index = blog_posts_in_order.index(item) if current_index && current_index > 0 blog_posts_in_order[current_index - 1] end end def next_post(item = @item) current_index = blog_posts_in_order.index(item) if current_index && current_index < blog_posts_in_order.size - 1 blog_posts_in_order[current_index + 1] end end def blog_date(item = @item) if item.identifier =~ POST_NAME Time.new($1.to_i, $2.to_i, $3.to_i) end end def authors @site.cached("authors") do YAML.load_file("#{File.dirname(__FILE__)}/../authors.yml") end end def author(author_id) authors[author_id] end ================================================ FILE: compass-style.org/lib/data_sources/asset_data_source.rb ================================================ module Nanoc3::DataSources # https://github.com/cboone/nanoc-static-data-source # original author appears to be Denis Defreyne class AssetDataSource < Nanoc3::DataSource identifier :filesystem_assets def items # Get prefix prefix = config[:prefix] || 'assets' # Get all files under prefix dir filenames = Dir[prefix + '/**/*'].select { |f| File.file?(f) } # Convert filenames to items filenames.map do |filename| attributes = { :extension => File.extname(filename)[1..-1], :filename => filename, } identifier = filename[(prefix.length+1)..-1] + '/' mtime = File.mtime(filename) checksum = checksum_for(filename) Nanoc3::Item.new( filename, attributes, identifier, :binary => true, :mtime => mtime, :checksum => checksum ) end end private # Returns a checksum of the given filenames # TODO un-duplicate this somewhere def checksum_for(*filenames) filenames.flatten.map do |filename| digest = Digest::SHA1.new File.open(filename, 'r') do |io| until io.eof data = io.readpartial(2**10) digest.update(data) end end digest.hexdigest end.join('-') end end end ================================================ FILE: compass-style.org/lib/data_sources/better_combined_datasource.rb ================================================ # This is basically the default filesystem_combined datasource # But items without a metadata header don't get an error. class BetterFilesystemCombined < Nanoc3::DataSources::FilesystemCombined identifier :better_combined def parse_file(filename, kind) contents = File.read(filename) if contents =~ /^(-{5}|-{3})/ # Split file pieces = contents.split(/^(-{5}|-{3})/).compact if pieces.size < 4 raise RuntimeError.new( "The file '#{filename}' does not seem to be a nanoc #{kind}" ) end # Parse meta = YAML.load(pieces[2]) || {} content = pieces[4..-1].join.strip [ meta, content ] else [{}, contents] end end end ================================================ FILE: compass-style.org/lib/data_sources/core_extensions.rb ================================================ class Object def try(method, *args, &block) send(method, *args, &block) end end class NilClass def try(*args) nil end end ================================================ FILE: compass-style.org/lib/data_sources/nanoc_monkey_patches.rb ================================================ class Nanoc3::Site def cached(key) if cached_stuff.has_key?(key) cached_stuff[key] else cached_stuff[key]= yield end end def cached_stuff @cached_stuff ||= {} end end ================================================ FILE: compass-style.org/lib/data_sources/syntax_highter.rb ================================================ require 'nokogiri' require 'coderay' class SyntaxHighlighterFilter < Nanoc3::Filter identifier :highlight def highlight(code, type) hl_map = Hash.new(:coderay) hl_map[:sass] = :pygmentize send(hl_map[type], code, type) end def pygmentize(code, type) # -O linenos=table IO.popen("pygmentize -l #{type} -f html -O encoding=utf-8", "r+") do |io| io.write(code) io.close_write return io.read end end def coderay(code, type) # :line_numbers => :table, type = :css if type == :scss CodeRay.scan(code, type).div(:css => :class) end def run(content, params={}) doc = Nokogiri::HTML.fragment(content) [:css, :sass, :scss, :html, :haml].each do |format| doc.css("pre.source-code.#{format}, code.#{format}").each do |el| el.set_attribute("class", "brush: #{format} "+el.attribute("class").value) end end doc.to_s end end ================================================ FILE: compass-style.org/lib/default.rb ================================================ # All files in the 'lib' directory will be loaded # before nanoc starts compiling. require 'erb' require 'active_support/inflector' include Nanoc3::Helpers::LinkTo include Nanoc3::Helpers::Capturing include Nanoc3::Helpers::Rendering include Nanoc3::Helpers::Breadcrumbs include Nanoc3::Helpers::XMLSitemap def body_class(item) classes = [""] classes += item[:classnames] || [] classes << "demo" if item.identifier =~ /^\/examples/ classes.join(" ") end def body_id(item) if item[:body_id] item[:body_id] elsif id = item.identifier.chop[1..-1] id.gsub(/\/|_/, "-") end end def body_attributes(item) { :id => body_id(item), :class => body_class(item) } end module Enumerable def sorted_and_grouped_by_name sort_by{|i| yield(i)}.group_by{|i| yield(i).sub(/^[^\w]/,"")[0..0].upcase} end end class Recycler attr_accessor :values attr_accessor :index def initialize *values self.values = values self.index = 0 end def next values[index] ensure self.index += 1 self.index = 0 if self.index >= self.values.size end def reset! self.index = 0 end end def cycle(*args) yield Recycler.new *args end def default_path(item) item.reps.find{|r| r.name == :default}.path end def find(identifier) @items.find{|i| i.identifier == identifier} end def get_var(instance_var) instance_variable_defined?("@#{instance_var}") ? instance_variable_get("@#{instance_var}") : yield end def sidebar_item(item) if item.nil? nil elsif item[:sidebar] item else sidebar_item(item.parent) end end def sidebar_stylesheet(item) i = sidebar_item(item) i[:stylesheet] if i end def item_tree(item, options = {}) crumb = item[:crumb] || item[:title] options[:heading_level] ||= 1 if options.fetch(:headings, true) child_html = "" if options.fetch(:depth,1) > 0 child_opts = options.dup child_opts[:depth] -= 1 if child_opts.has_key?(:depth) child_opts[:heading_depth] -= 1 if child_opts.has_key?(:heading_depth) child_opts[:heading_level] += 1 if child_opts[:heading_level] child_opts.delete(:omit_self) item.children.sort_by{|c| c[:crumb] || c[:title]}.each do |child| next if child[:navigable] == false child_html << item_tree(child, child_opts) end else options.delete(:heading_level) end child_html = render("partials/sidebar/container", :contents => child_html) unless child_html.size == 0 css_class = nil contents = unless options[:omit_self] item_opts = { :current_item => item, :selected => !!@item.identifier[item.identifier], :crumb => item[:crumb] || item[:title] } if options[:heading_level] && (options.fetch(:heading_depth, 1) > 0) render("partials/sidebar/heading", item_opts.merge(:heading => "h#{options[:heading_level]}") ) else render("partials/sidebar/item", item_opts) end end %Q{#{contents}#{child_html}} end def tutorial_item(path) path = "" if path == :root @items.detect do |i| i.identifier == "/help/tutorials/#{path}" end end def documentation_item(path) path = "" if path == :root @items.detect do |i| i.identifier == "/help/documentation/#{path}" end end def compass_version v = Compass.version "#{v[:major]}.#{v[:minor]}#{"."+v[:state] if v[:state]}.#{v[:build] || v[:patch]}" end def long_compass_version require 'compass/commands' Compass::Commands::PrintVersion.long_output_string end def sprite_tutorial_links(index=false) string = <<-ERB <% unless index %> * [Sprite Tutorial Index](/help/tutorials/spriting/) <% end %> <% Dir["./content/help/tutorials/spriting/**/*.markdown"].sort.each do |file| %> * [<%= File.basename(file, '.markdown').gsub('-', ' ').titleize %>](/help/tutorials/spriting/<%= File.basename(file, '.markdown') %>) <% end %> ERB ::ERB.new(string).result(binding) end ================================================ FILE: compass-style.org/lib/examples.rb ================================================ def example_haml markup_item = @item.children.detect{|child| child.identifier =~ /markup/} markup_item.reps.find { |r| r.name == :default }.content_at_snapshot(:raw) end def example_html Haml::Engine.new(example_haml).render end def example_scss markup_item = @item.children.detect{|child| child.identifier =~ /stylesheet/} markup_item.reps.find { |r| r.name == :default }.content_at_snapshot(:raw) end def example_sass Sass::Engine.new(example_scss, {:syntax => :scss}).to_tree.to_sass end def example_css Sass::Engine.new(example_sass, Compass.sass_engine_options.merge(:line_comments => false)).render end ================================================ FILE: compass-style.org/lib/search.rb ================================================ require 'json' STOP_WORDS = %w{ a about above across after afterwards again against all almost alone along already also although always am among amongst amoungst amount an and another any anyhow anyone anything anyway anywhere are around as at back be became because become becomes becoming been before beforehand behind being below beside besides between beyond bill both bottom but by call can cannot cant co computer con could couldnt cry de describe detail do done down due during each eg eight either eleven else elsewhere empty enough etc even ever every everyone everything everywhere except few fifteen fify fill find fire first five for former formerly forty found four from front full further get give go had has hasnt have he hence her here hereafter hereby herein hereupon hers herself him himself his how however hundred i ie if in inc indeed interest into is it its itself keep last latter latterly least less ltd made many may me meanwhile might mill mine more moreover most mostly move much must my myself name namely neither never nevertheless next nine no nobody none noone nor not nothing now nowhere of off often on once one only onto or other others otherwise our ours ourselves out over own part per perhaps please put rather re same see seem seemed seeming seems serious several she should show side since sincere six sixty so some somehow someone something sometime sometimes somewhere still such system take ten than that the their them themselves then thence there thereafter thereby therefore therein thereupon these they thick thin third this those though three through throughout thru thus to together too top toward towards twelve twenty two un under until up upon us very via was we well were what whatever when whence whenever where whereafter whereas whereby wherein whereupon wherever whether which while whither who whoever whole whom whose why will with within without would yet you your yours yourself yourselves } unless defined?(STOP_WORDS) def search_terms_for(item) if item.identifier =~ /^\/(reference|tutorials)/ content = item.rep_named(:default).compiled_content doc = Nokogiri::HTML(content) full_text = doc.css("p, h1, h2, h3, h4, h5, h6").map{|el| el.inner_text}.join(" ") "#{item[:title]} #{item[:meta_description]} #{full_text}".gsub(/[\W\s_]+/m,' ').downcase.split(/\s+/).uniq - STOP_WORDS else [] end end def search_index id = 0; idx = { "approximate" => {}, "terms" => {}, "items" => {} } @items.each do |item| search_terms_for(item).each do |term| idx["terms"][term] ||= [] idx["terms"][term] << id (0...term.length).each do |c| subterm = term[0...c] # puts "Indexing: #{subterm}" idx["approximate"][subterm] ||= [] unless idx["approximate"][subterm].include?(id) idx["approximate"][subterm] << id end end # puts "Indexed: #{term}" end idx["items"][id] = { "url" => "#{item.identifier}", "title" => item[:title], "crumb" => item[:crumb] } id += 1 end idx end ================================================ FILE: compass-style.org/lib/stylesheets/sass_extensions.rb ================================================ require 'sass' module Sass module Tree class RuleNode attr_accessor :comment unless method_defined? :comment def identifier @identifier ||= begin id = name.gsub(/[^a-zA-Z]+/,"-").downcase id = id[1..-1] if id[0..0] == "-" id = id[0..-2] if id[-1..-1] == "-" id end end def name @name ||= rule.map{|part| Sass::Script::Node === part ? "\#{#{part.to_sass}}" : part}.join('') end end class VariableNode < Node attr_accessor :name unless method_defined? :name attr_accessor :expr unless method_defined? :expr attr_accessor :guarded unless method_defined? :guarded attr_accessor :comment unless method_defined? :comment end class DebugNode < Node def to_sass "" end end class MixinNode < Node attr_accessor :name unless method_defined? :name attr_accessor :args unless method_defined? :args end class VariableNode < Node attr_accessor :comment unless method_defined? :comment end module HasSignature def sass_signature(format = :text) "#{name}#{arglist_to_sass(format)}" end private def arglist_to_sass(format = :text) if args && args.any? "(#{args.map{|a| arg_to_sass(a, format)}.join(", ")})" else "" end end def arg_to_sass(arg, format = :text) name, default_value = arg sass_str = "" if format == :html ddv = %Q{ data-default-value="#{h(default_value.to_sass)}"} if default_value sass_str = %Q{#{name.to_sass}} else sass_str = "#{name.to_sass}" if default_value sass_str << " = " sass_str << default_value.to_sass end end sass_str end end class MixinDefNode < Node attr_accessor :name unless method_defined? :name attr_accessor :args unless method_defined? :args attr_accessor :comment unless method_defined? :comment unless included_modules.include?(HasSignature) include HasSignature alias sass_signature_without_prefix sass_signature def sass_signature(mode = :definition, format = :text) prefix = case mode when :definition "=" when :include "+" end "#{prefix}#{sass_signature_without_prefix(format)}" end end end class FunctionNode < Node attr_accessor :name unless method_defined? :name attr_accessor :args unless method_defined? :args attr_accessor :comment unless method_defined? :comment include HasSignature unless included_modules.include?(HasSignature) end class ImportNode < RootNode attr_accessor :imported_filename unless method_defined? :imported_filename end class CommentNode < Node unless defined?(PRE_COMMENT) PRE_COMMENT = %r{(^ */*\**(\s*\|)?( |$))} end unless defined?(POST_COMMENT) POST_COMMENT = %r{ *\*/$} end def self.clean(docstring) docstring.gsub(/@doc off(.*?)@doc on/m, '') end def docstring v = value v = v.join("\n") if v.respond_to?(:join) v.gsub(PRE_COMMENT, '').gsub(POST_COMMENT, '') end def doc if value == "@doc off" false elsif value == "@doc on" true end end end end module Script class Color < Literal def to_sass(options = {}) if options[:format] == :html %Q{#{to_s}} else to_s end end end end end ================================================ FILE: compass-style.org/lib/stylesheets.rb ================================================ require 'rdiscount' def stylesheets_dir(framework) Compass::Frameworks[framework].stylesheets_directory end def tree_key(item) "tree/"+[item[:framework], item[:stylesheet]].join("/") end def tree(item) @site.cached(tree_key(item)) do file = File.join(stylesheets_dir(item[:framework]), item[:stylesheet]) contents = File.read(file) syntax = item[:stylesheet] =~ /\.scss$/ ? :scss : :sass Sass::Engine.new(contents, :syntax => syntax).send :to_tree end end def imports(item) sass_tree = tree(item) imports = [] sass_tree.children.each do |child| if child.is_a?(Sass::Tree::ImportNode) imports << child.imported_filename end end imports.sort end def reference_item(options) stylesheet = options[:stylesheet] path = stylesheet_path(stylesheet) if path @site.cached("reference/item/#{path}") do @items.detect do |i| if i.identifier =~ /^\/reference/ && i[:stylesheet] i[:stylesheet] == path end end end end end def departialize(path) path.gsub(%r{(\b|/)_}){|m| m.size > 1 ? "/" : ""} end def reference_path(options) if item = reference_item(options) rep = item.reps.find { |r| r.name == :default } rep.path end end def import_paths paths = [] if @item[:stylesheet] paths << [File.join(Compass::Frameworks[@item[:framework]].stylesheets_directory, File.dirname(@item[:stylesheet])), @item[:stylesheet]["/"] ? File.dirname(@item[:stylesheet]) : ""] end paths += Compass::Frameworks::ALL.inject([]) {|m, f| m << f.stylesheets_directory}.map!{|p|[p, '']} paths end def stylesheet_path(ss) possible_names = possible_filenames_for_stylesheet(ss) import_paths.each do |import_path| possible_names.each do |filename| full_path = File.join(import_path.first, filename) if File.exist?(full_path) return "#{import_path.last}#{"/" if import_path.last && import_path.last.length > 0}#{filename}" end end end nil end def possible_filenames_for_stylesheet(ss) ext = File.extname(ss) path = File.dirname(ss) path = path == "." ? "" : "#{path}/" base = File.basename(ss)[0..-(ext.size+1)] extensions = if ext.size > 0 [ext] else [".scss", ".sass"] end basenames = ["_#{base}", base] filenames = [] basenames.each do |basename| extensions.each do |extension| filenames << "#{path}#{basename}#{extension}" end end filenames end def mixins(item) sass_tree = tree(item) mixins = [] comment = nil sass_tree.children.each do |child| if child.is_a?(Sass::Tree::MixinDefNode) child.comment = comment && Sass::Tree::CommentNode.clean(comment) comment = nil mixins << child elsif child.is_a?(Sass::Tree::CommentNode) comment ||= "" comment << "\n" unless comment.empty? comment << child.docstring else comment = nil end end mixins.reject{|m| m.comment =~ /@private/} end def selectors(item) sass_tree = tree(item) # Visitors::CheckNesting.visit(sass_tree) # sass_tree = Visitors::Perform.visit(sass_tree) selectors = [] comment = nil sass_tree.children.each do |child| case child when Sass::Tree::RuleNode child.comment = comment && Sass::Tree::CommentNode.clean(comment) comment = nil selectors << child when Sass::Tree::CommentNode comment ||= "" comment << "\n" unless comment.empty? comment << child.docstring else comment = nil end end selectors.reject!{|s| s.comment =~ /@private/} # selectors.select!{|s| s.comment.strip.size > 0} # this would cause only documented selectors to be output selectors end def functions(item) sass_tree = tree(item) functions = [] comment = nil sass_tree.children.each do |child| if child.is_a?(Sass::Tree::FunctionNode) child.comment = comment && Sass::Tree::CommentNode.clean(comment) comment = nil functions << child elsif child.is_a?(Sass::Tree::CommentNode) comment ||= "" comment << "\n" unless comment.empty? comment << child.docstring else comment = nil end end functions.reject{|m| m.comment =~ /@private/} end def constants(item) sass_tree = tree(item) constants = [] comment = nil sass_tree.children.each do |child| if child.is_a?(Sass::Tree::VariableNode) child.comment = comment && Sass::Tree::CommentNode.clean(comment) comment = nil child.name.tr!("_",'-') constants << child elsif child.is_a?(Sass::Tree::CommentNode) comment ||= "" comment << "\n" unless comment.empty? comment << child.docstring else comment = nil end end constants.reject{|c| c.comment =~ /@private/} end def all_constants @items.inject([]) do |variables, item| next variables unless item.identifier =~ %r{/reference} next variables unless item[:stylesheet] variables += constants(item).map{|v| [item, v] } end end def all_mixins @items.inject([]) do |all_mixins, item| next all_mixins unless item.identifier =~ %r{/reference} next all_mixins unless item[:stylesheet] all_mixins += mixins(item).map{|m| [item, m] } end end def all_functions @items.inject([]) do |all_functions, item| next all_functions unless item.identifier =~ %r{/reference} next all_functions unless item[:stylesheet] all_functions += functions(item).map{|f| [item, f] } end end # Sass Only Functions from 3.1.10 (Brainy Betty) # Not as elegant, but does the trick. def sass_functions [:rgb, :rgba, :hsl, :hsla, :red, :green, :blue, :hue, :saturation, :lightness, :alpha, :opacity, :opacify, :fade_in, :transparentize, :fade_out, :lighten, :darken, :saturate, :desaturate, :adjust_hue, :adjust_color, :scale_color, :change_color, :mix, :grayscale, :complement, :invert, :unquote, :quote, :type_of, :unit, :unitless, :comparable, :percentage, :round, :ceil, :floor, :abs, :length, :nth, :join, :append, :zip, :index, :if] end def example_items @site.cached("examples") do @items.select do |i| i.identifier =~ /^\/examples/ && i[:example] end end end def item_for_function_name(function_name) @items.detect do |item| (item.identifier =~ %r{helpers}) && item[:documented_functions] && item[:documented_functions].include?(function_name) end end def examples_for_item(item) @site.cached("examples/#{item.identifier}") do example_items.select do |i| i[:framework] == item[:framework] && i[:stylesheet] == item[:stylesheet] end end end def examples(item, mixin = nil) examples = examples_for_item(item) if mixin examples = examples.select {|i| i[:mixin] == mixin.name } else examples = examples.reject {|i| i[:mixin] } end examples.map{|i| i.reps.find{|r| r.name == :default}} end def format_doc(docstring) if docstring RDiscount.new(docstring).to_html end end ================================================ FILE: compass-style.org/tasks/generators.thor ================================================ require 'bundler' Bundler.setup require 'fileutils' require 'compass' COMPASS_DIR = File.expand_path(File.join(File.dirname(__FILE__), "../..")) class Generate < Thor desc "example path/to/module", "Generate a new example." method_option :title, :type => :string, :aliases => "-t", :desc => %(Title of the example.) method_option :description, :type => :string, :aliases => "-d", :desc => %(Description of the example, which is shown below the link.) method_option :mixin, :type => :string, :aliases => "-m", :desc => %(Name of the specific mixin in the module if the example isn't about the whole module.) def example(module_path) module_path = module_path.dup module_path = "compass/#{module_path.chomp("/")}" options = @options.merge(:stylesheet => stylesheet_path(module_path)) title = options[:title] || (options[:mixin] && titleize(options[:mixin])) || titleize(File.basename(module_path)) directory = "examples/#{module_path}" puts "Generating /#{directory}/" puts "DIRECTORY content/#{directory}/" FileUtils.mkdir_p("content/#{directory}/") file_name = "content/examples/#{module_path}.haml" puts " CREATE #{file_name}" open(file_name, "w") do |example_file| mixin = "mixin: #{options[:mixin]}\n" if options[:mixin] example_contents = <<-EXAMPLE | --- | title: #{title} | description: #{options[:description] || "How to use #{title}"} | framework: compass | stylesheet: #{options[:stylesheet]} | #{mixin}example: true | --- | - render "partials/example" do | %p Lorem ipsum dolor sit amet. EXAMPLE example_file.puts example_contents.gsub(/^ +\| /, '') end file_name = "content/examples/#{module_path}/markup.haml" puts " CREATE #{file_name}" open(file_name, "w") do |example_file| example_contents = <<-EXAMPLE | .example | .title #{title} | %p This file gets included into the example. | %p And the source is shown to the user as HTML and as Haml. EXAMPLE example_file.puts example_contents.gsub(/^ +\| /, '') end file_name = "content/examples/#{module_path}/stylesheet.scss" puts " CREATE #{file_name}" open(file_name, "w") do |example_file| example_contents = <<-EXAMPLE | @import "#{module_path}"; | | // This file is used to style the example markup. | // And the source is shown to the user as SCSS, Sass and as CSS. | | .example { | .title { | font-size: 36px; | margin-bottom: 30px; | color: #333; | border: none; | } | | p { color: #666; } | } EXAMPLE example_file.puts example_contents.gsub(/^ +\| /, '') end end desc "reference path/to/module", "Generate a reference page for the given module." method_option :title, :type => :string, :aliases => "-t", :desc => %(Title of the reference.) def reference(module_path) module_path = module_path.dup module_path = "compass/#{module_path.chomp("/")}" options = @options.merge(:stylesheet => stylesheet_path(module_path)) title = options[:title] || titleize(File.basename(module_path)) directory = "reference/#{module_path}" puts "Generating /#{directory}/" puts "DIRECTORY content/#{directory}/" FileUtils.mkdir_p "content/#{directory}" file_name = "content/reference/#{module_path}.haml" puts " CREATE #{file_name}" open(file_name, "w") do |reference_file| contents = <<-REFERENCE | --- | title: Compass #{title} | crumb: #{title} | framework: compass | stylesheet: #{options[:stylesheet]} | layout: core | classnames: | - reference | - core | --- | - render "reference" do | %p Lorem ipsum dolor sit amet. REFERENCE reference_file.puts contents.gsub(/^ +\| /, '') end end private def titleize(string) string.split('-').map(&:capitalize).join(' ') end def stylesheet_path(module_path) array = module_path.split("/") stylesheet_name = array.pop prefix = array.join("/") stylesheet = Dir["../frameworks/compass/stylesheets/#{prefix}/_#{stylesheet_name}.{scss,sass}"].first raise "no stylesheet found for module #{module_path}" if stylesheet.nil? stylesheet = File.expand_path(stylesheet) "#{prefix}/#{File.basename(stylesheet)}" end end ================================================ FILE: core/.gitignore ================================================ pkg/ .bundle/ Gemfile.lock ================================================ FILE: core/Gemfile ================================================ source 'https://rubygems.org' # Specify your gem's dependencies in compass-core.gemspec gemspec gem 'pry' gem 'diff-lcs', '~> 1.1.2' gem 'true', "~> 0.2.3" gem 'timecop', "~> 0.5.9.2" gem 'test-unit', '~> 3.0.9' ================================================ FILE: core/LICENSE.txt ================================================ Copyright (c) 2013 Chris Eppstein MIT License Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: core/README.md ================================================ # Compass Core Library This compass core library delivers the necessary stylesheets and sass extensions in order to embed compass into any framework including using compass with the Sass compiler. ## Installation ### With the Compass Command line framework [Install Compass](. This code will be installed automatically for you. ### Vanilla Sass Add `-r compass-core` to the Sass command line. ### Ruby Projects Add this line to your application's Gemfile: gem 'compass-core' And then execute: $ bundle Or install it yourself as: $ gem install compass-core ## Usage TODO: Write usage instructions here ## Contributing 1. Fork it 2. Create your feature branch (`git checkout -b my-new-feature`) 3. Commit your changes (`git commit -am 'Add some feature'`) 4. Push to the branch (`git push origin my-new-feature`) 5. Create new Pull Request ================================================ FILE: core/Rakefile ================================================ sh "git checkout lib/compass/core/generated_version.rb" require 'rake/testtask' require 'rubygems/package_task' require 'bundler/setup' namespace :test do Rake::TestTask.new(:integrations) do |t| t.libs << "test/integrations" t.libs << "lib" t.test_files = FileList['test/integrations/**/*_test.rb'] t.verbose = true end Rake::TestTask.new(:units) do |t| t.libs << "test/units" t.libs << "lib" t.test_files = FileList['test/units/**/*_test.rb'] t.verbose = true end end desc "Download the latest browser stats data." task :caniuse do require 'uri' require 'net/http' require 'net/https' uri = URI.parse("https://raw.githubusercontent.com/Fyrd/caniuse/master/data.json") https = Net::HTTP.new(uri.host,uri.port) https.use_ssl = true req = Net::HTTP::Get.new(uri.path) res = https.request(req) filename = File.join(File.dirname(__FILE__), "data", "caniuse.json") open(filename, "wb") do |file| file.write(res.body) end puts "#{filename} (#{res.body.size} bytes)" end desc "Run all tests" task :test => ["test:integrations", "test:units"] task :default => :test spec = eval(File.read(FileList['compass-core.gemspec'].first), binding, "compass-core.gemspec") spec.files << "lib/compass/core/generated_version.rb" spec.files.delete("VERSION") def spec.bump! segments = version.to_s.split(".") segments[-1] = segments.last.succ self.version = Gem::Version.new(segments.join(".")) end # Set SAME_VERSION when moving to a new major version and you want to specify the new version # explicitly instead of bumping the current version. # E.g. rake build SAME_VERSION=true spec.bump! unless ENV["SAME_VERSION"] desc "Run tests and build compass-core-#{spec.version}.gem" task :build => [:test, :gem] task :gem => :release_version task "lib/compass/core/generated_version.rb" do open("lib/compass/core/generated_version.rb", "w") do |f| f.write(< "lib/compass/core/generated_version.rb" desc "Make the prebuilt gem compass-core-#{spec.version}.gem public." task :publish => [:record_version, :push_gem, :tag] desc "Build & Publish version #{spec.version}" task :release => [:build, :publish] Gem::PackageTask.new(spec) do |pkg| pkg.need_zip = true pkg.need_tar = true end desc "Record the new version in version control for posterity" task :record_version do unless ENV["SAME_VERSION"] open(FileList["VERSION"].first, "w") do |f| f.write(spec.version.to_s) end sh "git add VERSION" sh "git checkout lib/compass/core/generated_version.rb" sh %Q{git commit -m "Bump version to #{spec.version}."} end end desc "Tag the repo as #{spec.version} and push the code and tag." task :tag do sh "git tag -a -m 'Core Version #{spec.version}' core-#{spec.version}" sh "git push --tags origin #{`git rev-parse --abbrev-ref HEAD`}" end desc "Push compass-core-#{spec.version}.gem to the rubygems server" task :push_gem do sh "gem push pkg/compass-core-#{spec.version}.gem" end ================================================ FILE: core/VERSION ================================================ 1.0.2 ================================================ FILE: core/compass-core.gemspec ================================================ # coding: utf-8 lib = File.expand_path('lib', File.dirname(__FILE__)) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require 'compass/core/version' Gem::Specification.new do |spec| spec.name = "compass-core" spec.version = Compass::Core::VERSION spec.authors = ["Chris Eppstein", "Scott Davis", "Eric M. Suzanne", "Brandon Mathis"] spec.email = ["chris@eppsteins.net"] spec.description = %q{The Compass core stylesheet library and minimum required ruby extensions. This library can be used stand-alone without the compass ruby configuration file or compass command line tools.} spec.summary = %q{The Compass core stylesheet library} spec.homepage = "http://compass-style.org/reference/compass/" spec.license = "MIT" spec.files = `git ls-files`.split($/).select {|f| File.exist?(f) && f =~ %r{^(data|lib|stylesheets|templates)/} } spec.files += %w( VERSION LICENSE.txt ) spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) } spec.require_paths = ["lib"] spec.add_dependency "sass", ">= 3.3.0", "< 3.5" spec.add_dependency 'multi_json', '~> 1.0' spec.add_development_dependency "bundler" spec.add_development_dependency "rake" end ================================================ FILE: core/data/caniuse.json ================================================ {"eras":{"e-32":"32 versions back","e-31":"31 versions back","e-30":"30 versions back","e-29":"29 versions back","e-28":"28 versions back","e-27":"27 versions back","e-26":"26 versions back","e-25":"25 versions back","e-24":"24 versions back","e-23":"23 versions back","e-22":"22 versions back","e-21":"21 versions back","e-20":"20 versions back","e-19":"19 versions back","e-18":"18 versions back","e-17":"17 versions back","e-16":"16 versions back","e-15":"15 versions back","e-14":"14 versions back","e-13":"13 versions back","e-12":"12 versions back","e-11":"11 versions back","e-10":"10 versions back","e-9":"9 versions back","e-8":"8 versions back","e-7":"7 versions back","e-6":"6 versions back","e-5":"5 versions back","e-4":"4 versions back","e-3":"3 versions back","e-2":"2 versions back","e-1":"Previous version","e0":"Current","e1":"Near future","e2":"Farther future","e3":"3 versions ahead"},"agents":{"ie":{"browser":"IE","abbr":"IE","prefix":"ms","type":"desktop","usage_global":{"5.5":0.009298,"6":0.278852,"7":0.135658,"8":4.46163,"9":2.6001,"10":2.63025,"11":7.18231},"versions":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"5.5","6","7","8","9","10","11",null,null,null]},"firefox":{"browser":"Firefox","abbr":"FF","prefix":"moz","type":"desktop","usage_global":{"2":0.007153,"3":0.078683,"3.5":0.021459,"3.6":0.14306,"4":0.035765,"5":0.021459,"6":0.035765,"7":0.021459,"8":0.050071,"9":0.028612,"10":0.064377,"11":0.057224,"12":0.128754,"13":0.050071,"14":0.050071,"15":0.064377,"16":0.100142,"17":0.078683,"18":0.050071,"19":0.057224,"20":0.07153,"21":0.264661,"22":0.092989,"23":0.078683,"24":0.200284,"25":0.092989,"26":0.171672,"27":0.185978,"28":0.307579,"29":6.53784,"30":4.68521,"31":0.193131,"32":0.014306,"33":0.007153,"34":0},"versions":[null,"2","3","3.5","3.6","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32","33","34"]},"chrome":{"browser":"Chrome","abbr":"Chr.","prefix":"webkit","type":"desktop","usage_global":{"4":0.021459,"5":0.014306,"6":0.021459,"7":0.014306,"8":0.014306,"9":0.014306,"10":0.028612,"11":0.114448,"12":0.042918,"13":0.035765,"14":0.028612,"15":0.035765,"16":0.028612,"17":0.021459,"18":0.057224,"19":0.014306,"20":0.028612,"21":0.393415,"22":0.121601,"23":0.050071,"24":0.050071,"25":0.057224,"26":0.221743,"27":0.536475,"28":0.128754,"29":0.300426,"30":0.193131,"31":0.593699,"32":0.472098,"33":0.844054,"34":1.33761,"35":28.3903,"36":0.114448,"37":0.150213,"38":0,"39":0},"versions":["4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32","33","34","35","36","37","38","39"]},"safari":{"browser":"Safari","abbr":"Saf.","prefix":"webkit","type":"desktop","usage_global":{"3.1":0,"3.2":0.008692,"4":0.107295,"5":0.193131,"5.1":0.672382,"6":0.329038,"6.1":0.57224,"7":1.63804,"8":0},"versions":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"3.1","3.2","4","5","5.1","6","6.1","7","8",null,null]},"opera":{"browser":"Opera","abbr":"Op.","prefix":"webkit","type":"desktop","usage_global":{"9.5-9.6":0.007153,"10.0-10.1":0.014306,"10.5":0.008392,"10.6":0.007296,"11":0.014996,"11.1":0.008219,"11.5":0.007296,"11.6":0.014306,"12":0.021459,"12.1":0.321885,"15":0.007153,"16":0.007153,"17":0.007153,"18":0.021459,"19":0.014306,"20":0.064377,"21":0.107295,"22":0.364803,"23":0.007153,"24":0},"versions":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"9.5-9.6","10.0-10.1","10.5","10.6","11","11.1","11.5","11.6","12","12.1","15","16","17","18","19","20","21","22","23","24",null],"prefix_exceptions":{"9.5-9.6":"o","10.0-10.1":"o","10.5":"o","10.6":"o","11":"o","11.1":"o","11.5":"o","11.6":"o","12":"o","12.1":"o"}},"ios_saf":{"browser":"iOS Safari","abbr":"iOS","prefix":"webkit","type":"mobile","usage_global":{"3.2":0,"4.0-4.1":0.00666865,"4.2-4.3":0.0400119,"5.0-5.1":0.186722,"6.0-6.1":0.733551,"7.0-7.1":5.69503,"8":0},"versions":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"3.2","4.0-4.1","4.2-4.3","5.0-5.1","6.0-6.1","7.0-7.1","8",null,null]},"op_mini":{"browser":"Opera Mini","abbr":"O.Mini","prefix":"o","type":"mobile","usage_global":{"5.0-7.0":3.19172},"versions":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"5.0-7.0",null,null,null]},"android":{"browser":"Android Browser","abbr":"And.","prefix":"webkit","type":"mobile","usage_global":{"2.1":0.0208543,"2.2":0.0556116,"2.3":1.03577,"3":0,"4":0.855028,"4.1":2.01592,"4.2-4.3":2.04373,"4.4":0.945397,"4.4.3":0},"versions":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"2.1","2.2","2.3","3","4","4.1","4.2-4.3","4.4","4.4.3",null,null]},"op_mob":{"browser":"Opera Mobile","abbr":"O.Mob","prefix":"o","type":"mobile","usage_global":{"10":0,"11.5":0,"12":0.0198698,"12.1":0.0596095,"22":0},"versions":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"10",null,null,"11.5","12","12.1","22",null,null,null],"prefix_exceptions":{"22":"webkit"}},"bb":{"browser":"Blackberry Browser","abbr":"BB","prefix":"webkit","type":"mobile","usage_global":{"7":0.110321,"10":0},"versions":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"7","10",null,null,null]},"and_chr":{"browser":"Chrome for Android","abbr":"Chr/And.","prefix":"webkit","type":"mobile","usage_global":{"36":5.52318},"versions":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"36",null,null,null]},"and_ff":{"browser":"Firefox for Android","abbr":"FF/And.","prefix":"moz","type":"mobile","usage_global":{"31":0.119574},"versions":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"31",null,null,null]},"ie_mob":{"browser":"IE Mobile","abbr":"IE.Mob","prefix":"ms","type":"mobile","usage_global":{"10":0.408117},"versions":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"10",null,null,null]}},"statuses":{"rec":"Recommendation","pr":"Proposed Recommendation","cr":"Candidate Recommendation","wd":"Working Draft","other":"Other","unoff":"Unofficial / Note"},"cats":{"CSS":["CSS","CSS2","CSS3"],"HTML5":["Canvas","HTML5"],"JS API":["JS API"],"Other":["DOM","PNG","Other"],"SVG":["SVG"]},"updated":1406691079,"data":{"png-alpha":{"title":"PNG alpha transparency","description":"Semi-transparent areas in PNG files","spec":"http://www.w3.org/TR/PNG/","status":"rec","links":[{"url":"http://dillerdesign.com/experiment/DD_belatedPNG/","title":"Workaround for IE6"},{"url":"http://en.wikipedia.org/wiki/Portable_Network_Graphics","title":"Wikipedia"}],"categories":["PNG"],"stats":{"ie":{"5.5":"n","6":"p","7":"y","8":"y","9":"y","10":"y","11":"y"},"firefox":{"2":"y","3":"y","3.5":"y","3.6":"y","4":"y","5":"y","6":"y","7":"y","8":"y","9":"y","10":"y","11":"y","12":"y","13":"y","14":"y","15":"y","16":"y","17":"y","18":"y","19":"y","20":"y","21":"y","22":"y","23":"y","24":"y","25":"y","26":"y","27":"y","28":"y","29":"y","30":"y","31":"y","32":"y","33":"y","34":"y"},"chrome":{"4":"y","5":"y","6":"y","7":"y","8":"y","9":"y","10":"y","11":"y","12":"y","13":"y","14":"y","15":"y","16":"y","17":"y","18":"y","19":"y","20":"y","21":"y","22":"y","23":"y","24":"y","25":"y","26":"y","27":"y","28":"y","29":"y","30":"y","31":"y","32":"y","33":"y","34":"y","35":"y","36":"y","37":"y","38":"y","39":"y"},"safari":{"3.1":"y","3.2":"y","4":"y","5":"y","5.1":"y","6":"y","6.1":"y","7":"y","8":"y"},"opera":{"9":"y","9.5-9.6":"y","10.0-10.1":"y","10.5":"y","10.6":"y","11":"y","11.1":"y","11.5":"y","11.6":"y","12":"y","12.1":"y","15":"y","16":"y","17":"y","18":"y","19":"y","20":"y","21":"y","22":"y","23":"y","24":"y"},"ios_saf":{"3.2":"y","4.0-4.1":"y","4.2-4.3":"y","5.0-5.1":"y","6.0-6.1":"y","7.0-7.1":"y","8":"y"},"op_mini":{"5.0-7.0":"y"},"android":{"2.1":"y","2.2":"y","2.3":"y","3":"y","4":"y","4.1":"y","4.2-4.3":"y","4.4":"y","4.4.3":"y"},"bb":{"7":"y","10":"y"},"op_mob":{"10":"y","11":"y","11.1":"y","11.5":"y","12":"y","12.1":"y","22":"y"},"and_chr":{"36":"y"},"and_ff":{"31":"y"},"ie_mob":{"10":"y"}},"notes":"IE6 does support full transparency in 8-bit PNGs, which can sometimes be an alternative to 24-bit PNGs.","notes_by_num":{},"usage_perc_y":93.17,"usage_perc_a":0,"ucprefix":false,"parent":"","keywords":""},"apng":{"title":"Animated PNG (APNG)","description":"Like animated GIFs, but allowing 24-bit colors and alpha transparency","spec":"https://wiki.mozilla.org/APNG_Specification","status":"unoff","links":[{"url":"https://chrome.google.com/webstore/detail/ehkepjiconegkhpodgoaeamnpckdbblp","title":"Chrome extension providing support"},{"url":"https://github.com/davidmz/apng-canvas","title":"Polyfill using canvas"},{"url":"http://en.wikipedia.org/wiki/APNG","title":"Wikipedia"}],"categories":["PNG"],"stats":{"ie":{"5.5":"n","6":"n","7":"n","8":"n","9":"n","10":"n","11":"n"},"firefox":{"2":"n","3":"y","3.5":"y","3.6":"y","4":"y","5":"y","6":"y","7":"y","8":"y","9":"y","10":"y","11":"y","12":"y","13":"y","14":"y","15":"y","16":"y","17":"y","18":"y","19":"y","20":"y","21":"y","22":"y","23":"y","24":"y","25":"y","26":"y","27":"y","28":"y","29":"y","30":"y","31":"y","32":"y","33":"y","34":"y"},"chrome":{"4":"n","5":"n","6":"n","7":"n","8":"n","9":"n","10":"n","11":"n","12":"n","13":"n","14":"n","15":"n","16":"n","17":"n","18":"n","19":"n","20":"n","21":"n","22":"n","23":"n","24":"n","25":"n","26":"n","27":"n","28":"n","29":"n","30":"n","31":"n","32":"n","33":"n","34":"n","35":"n","36":"n","37":"n","38":"n","39":"n"},"safari":{"3.1":"n","3.2":"n","4":"n","5":"n","5.1":"n","6":"n","6.1":"n","7":"n","8":"y"},"opera":{"9":"n","9.5-9.6":"y","10.0-10.1":"y","10.5":"y","10.6":"y","11":"y","11.1":"y","11.5":"y","11.6":"y","12":"y","12.1":"y","15":"n","16":"n","17":"n","18":"n","19":"n","20":"n","21":"n","22":"n","23":"n","24":"n"},"ios_saf":{"3.2":"n","4.0-4.1":"n","4.2-4.3":"n","5.0-5.1":"n","6.0-6.1":"n","7.0-7.1":"n","8":"y"},"op_mini":{"5.0-7.0":"n"},"android":{"2.1":"n","2.2":"n","2.3":"n","3":"n","4":"n","4.1":"n","4.2-4.3":"n","4.4":"n","4.4.3":"n"},"bb":{"7":"n","10":"n"},"op_mob":{"10":"y","11":"y","11.1":"y","11.5":"y","12":"y","12.1":"y","22":"n"},"and_chr":{"36":"n"},"and_ff":{"31":"y"},"ie_mob":{"10":"n"}},"notes":"Where support for APNG is missing, only the first frame is displayed","notes_by_num":{},"usage_perc_y":14.67,"usage_perc_a":0,"ucprefix":false,"parent":"","keywords":""},"video":{"title":"Video element","description":"Method of playing videos on webpages (without requiring a plug-in)","spec":"http://www.whatwg.org/specs/web-apps/current-work/multipage/video.html#video","status":"wd","links":[{"url":"http://camendesign.co.uk/code/video_for_everybody","title":"Video for Everybody"},{"url":"http://webmproject.org","title":"WebM format information"},{"url":"https://raw.github.com/phiggins42/has.js/master/detect/video.js#video","title":"has.js test"},{"url":"http://docs.webplatform.org/wiki/html/elements/video","title":"WebPlatform Docs"},{"url":"http://dev.opera.com/articles/view/everything-you-need-to-know-about-html5-video-and-audio/","title":"Detailed article on video/audio elements"},{"url":"http://diveinto.org/html5/video.html","title":"Video on the Web - includes info on Android support"}],"categories":["HTML5"],"stats":{"ie":{"5.5":"n","6":"n","7":"n","8":"n","9":"y","10":"y","11":"y"},"firefox":{"2":"n","3":"n","3.5":"y","3.6":"y","4":"y","5":"y","6":"y","7":"y","8":"y","9":"y","10":"y","11":"y","12":"y","13":"y","14":"y","15":"y","16":"y","17":"y","18":"y","19":"y","20":"y","21":"y","22":"y","23":"y","24":"y","25":"y","26":"y","27":"y","28":"y","29":"y","30":"y","31":"y","32":"y","33":"y","34":"y"},"chrome":{"4":"y","5":"y","6":"y","7":"y","8":"y","9":"y","10":"y","11":"y","12":"y","13":"y","14":"y","15":"y","16":"y","17":"y","18":"y","19":"y","20":"y","21":"y","22":"y","23":"y","24":"y","25":"y","26":"y","27":"y","28":"y","29":"y","30":"y","31":"y","32":"y","33":"y","34":"y","35":"y","36":"y","37":"y","38":"y","39":"y"},"safari":{"3.1":"n","3.2":"n","4":"y","5":"y","5.1":"y","6":"y","6.1":"y","7":"y","8":"y"},"opera":{"9":"n","9.5-9.6":"n","10.0-10.1":"n","10.5":"y","10.6":"y","11":"y","11.1":"y","11.5":"y","11.6":"y","12":"y","12.1":"y","15":"y","16":"y","17":"y","18":"y","19":"y","20":"y","21":"y","22":"y","23":"y","24":"y"},"ios_saf":{"3.2":"y","4.0-4.1":"y","4.2-4.3":"y","5.0-5.1":"y","6.0-6.1":"y","7.0-7.1":"y","8":"y"},"op_mini":{"5.0-7.0":"n"},"android":{"2.1":"a","2.2":"a","2.3":"y","3":"y","4":"y","4.1":"y","4.2-4.3":"y","4.4":"y","4.4.3":"y"},"bb":{"7":"y","10":"y"},"op_mob":{"10":"n","11":"y","11.1":"y","11.5":"y","12":"y","12.1":"y","22":"y"},"and_chr":{"36":"y"},"and_ff":{"31":"y"},"ie_mob":{"10":"y"}},"notes":"Different browsers have support for different video formats, see sub-features for details. \r\n\r\nThe Android browser (before 2.3) requires [specific handling](http://www.broken-links.com/2010/07/08/making-html5-video-work-on-android-phones/) to run the video element.","notes_by_num":{},"usage_perc_y":85.18,"usage_perc_a":0.08,"ucprefix":false,"parent":"","keywords":"