compass 0.13.alpha.0 → 0.13.alpha.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.markdown +6 -4
- data/Rakefile +9 -0
- data/VERSION.yml +2 -2
- data/bin/compass +2 -1
- data/features/command_line.feature +5 -27
- data/features/step_definitions/command_line_steps.rb +3 -2
- data/frameworks/compass/stylesheets/compass/_css3.scss +3 -0
- data/frameworks/compass/stylesheets/compass/_support.scss +6 -0
- data/frameworks/compass/stylesheets/compass/css3/_animation.scss +77 -76
- data/frameworks/compass/stylesheets/compass/css3/_appearance.scss +15 -9
- data/frameworks/compass/stylesheets/compass/css3/_background-clip.scss +35 -36
- data/frameworks/compass/stylesheets/compass/css3/_background-origin.scss +36 -34
- data/frameworks/compass/stylesheets/compass/css3/_background-size.scss +15 -15
- data/frameworks/compass/stylesheets/compass/css3/_border-radius.scss +30 -48
- data/frameworks/compass/stylesheets/compass/css3/_box-shadow.scss +22 -27
- data/frameworks/compass/stylesheets/compass/css3/_box-sizing.scss +13 -8
- data/frameworks/compass/stylesheets/compass/css3/_box.scss +60 -82
- data/frameworks/compass/stylesheets/compass/css3/_columns.scss +145 -25
- data/frameworks/compass/stylesheets/compass/css3/_filter.scss +44 -0
- data/frameworks/compass/stylesheets/compass/css3/_hyphenation.scss +77 -0
- data/frameworks/compass/stylesheets/compass/css3/_images.scss +2 -2
- data/frameworks/compass/stylesheets/compass/css3/_inline-block.scss +14 -8
- data/frameworks/compass/stylesheets/compass/css3/_selection.scss +31 -0
- data/frameworks/compass/stylesheets/compass/css3/_shared.scss +207 -21
- data/frameworks/compass/stylesheets/compass/css3/_text-shadow.scss +52 -13
- data/frameworks/compass/stylesheets/compass/css3/_transform.scss +14 -14
- data/frameworks/compass/stylesheets/compass/css3/_transition.scss +127 -60
- data/frameworks/compass/stylesheets/compass/css3/_user-interface.scss +35 -15
- data/frameworks/compass/stylesheets/compass/typography/_units.scss +152 -0
- data/frameworks/compass/stylesheets/compass/typography/_vertical_rhythm.scss +174 -98
- data/frameworks/compass/stylesheets/compass/typography/lists/_horizontal-list.scss +5 -3
- data/frameworks/compass/stylesheets/compass/typography/lists/_inline-list.scss +6 -3
- data/frameworks/compass/stylesheets/compass/typography/text/_ellipsis.scss +1 -1
- data/frameworks/compass/stylesheets/compass/typography/text/_replacement.scss +35 -9
- data/frameworks/compass/stylesheets/compass/utilities/general/_float.scss +7 -3
- data/frameworks/compass/stylesheets/compass/utilities/general/_hacks.scss +2 -2
- data/frameworks/compass/stylesheets/compass/utilities/sprites/_base.scss +25 -10
- data/frameworks/compass/stylesheets/compass/utilities/tables/_borders.scss +14 -9
- data/lib/compass.rb +2 -2
- data/lib/compass/actions.rb +5 -1
- data/lib/compass/commands/project_base.rb +7 -1
- data/lib/compass/commands/update_project.rb +2 -2
- data/lib/compass/commands/watch_project.rb +6 -86
- data/lib/compass/compiler.rb +6 -0
- data/lib/compass/configuration/data.rb +1 -1
- data/lib/compass/configuration/helpers.rb +2 -0
- data/lib/compass/exec/global_options_parser.rb +1 -1
- data/lib/compass/exec/project_options_parser.rb +4 -0
- data/lib/compass/logger.rb +2 -0
- data/lib/compass/sass_extensions/functions/colors.rb +14 -0
- data/lib/compass/sass_extensions/functions/constants.rb +9 -0
- data/lib/compass/sass_extensions/functions/gradient_support.rb +44 -5
- data/lib/compass/sass_extensions/functions/image_size.rb +2 -1
- data/lib/compass/sass_extensions/functions/math.rb +14 -2
- data/lib/compass/sass_extensions/functions/sprites.rb +81 -14
- data/lib/compass/sass_extensions/functions/urls.rb +29 -2
- data/lib/compass/sass_extensions/sprites.rb +2 -0
- data/lib/compass/sass_extensions/sprites/engines/chunky_png_engine.rb +5 -1
- data/lib/compass/sass_extensions/sprites/image.rb +7 -2
- data/lib/compass/sass_extensions/sprites/image_methods.rb +5 -2
- data/lib/compass/sass_extensions/sprites/images.rb +29 -0
- data/lib/compass/sass_extensions/sprites/layout.rb +39 -0
- data/lib/compass/sass_extensions/sprites/layout/diagonal.rb +42 -0
- data/lib/compass/sass_extensions/sprites/layout/horizontal.rb +66 -0
- data/lib/compass/sass_extensions/sprites/layout/smart.rb +33 -0
- data/lib/compass/sass_extensions/sprites/layout/vertical.rb +68 -0
- data/lib/compass/sass_extensions/sprites/layout_methods.rb +9 -115
- data/lib/compass/sass_extensions/sprites/sprite_map.rb +5 -0
- data/lib/compass/sass_extensions/sprites/sprite_methods.rb +9 -5
- data/lib/compass/sprite_importer.rb +3 -3
- data/lib/compass/sprite_importer/content.erb +14 -12
- data/lib/compass/version.rb +2 -1
- data/lib/compass/watcher.rb +11 -0
- data/lib/compass/watcher/compiler.rb +59 -0
- data/lib/compass/watcher/project_watcher.rb +108 -0
- data/lib/compass/watcher/watch.rb +33 -0
- data/test/fixtures/stylesheets/busted_font_urls/config.rb +32 -0
- data/test/fixtures/stylesheets/busted_font_urls/css/screen.css +7 -0
- data/{examples/css3/extensions/fancy-fonts/templates/project/bgrove.ttf → test/fixtures/stylesheets/busted_font_urls/fonts/feed.ttf} +0 -0
- data/test/fixtures/stylesheets/busted_font_urls/fonts/grid.ttf +0 -0
- data/test/fixtures/stylesheets/busted_font_urls/fonts/sub/dk.ttf +0 -0
- data/test/fixtures/stylesheets/busted_font_urls/sass/screen.sass +11 -0
- data/test/fixtures/stylesheets/busted_font_urls/tmp/screen.css +7 -0
- data/test/fixtures/stylesheets/compass/css/animation-with-legacy-ie.css +0 -8
- data/test/fixtures/stylesheets/compass/css/animation.css +0 -8
- data/test/fixtures/stylesheets/compass/css/background-clip.css +5 -0
- data/test/fixtures/stylesheets/compass/css/background-origin.css +15 -0
- data/test/fixtures/stylesheets/compass/css/background-size.css +24 -0
- data/test/fixtures/stylesheets/compass/css/columns.css +81 -9
- data/test/fixtures/stylesheets/compass/css/filters.css +29 -0
- data/test/fixtures/stylesheets/compass/css/gradients.css +30 -27
- data/test/fixtures/stylesheets/compass/css/grid_background.css +7 -14
- data/test/fixtures/stylesheets/compass/css/hyphenation.css +16 -0
- data/test/fixtures/stylesheets/compass/css/lists.css +11 -13
- data/test/fixtures/stylesheets/compass/css/pie.css +0 -3
- data/test/fixtures/stylesheets/compass/css/replacement.css +59 -0
- data/test/fixtures/stylesheets/compass/css/reset.css +1 -1
- data/test/fixtures/stylesheets/compass/css/selection.css +13 -0
- data/test/fixtures/stylesheets/compass/css/sprites.css +250 -250
- data/test/fixtures/stylesheets/compass/css/text_shadow.css +22 -4
- data/test/fixtures/stylesheets/compass/css/transition.css +67 -11
- data/test/fixtures/stylesheets/compass/css/units.css +30 -0
- data/test/fixtures/stylesheets/compass/css/user-interface.css +12 -1
- data/test/fixtures/stylesheets/compass/css/utilities.css +15 -0
- data/test/fixtures/stylesheets/compass/css/vertical_rhythm.css +199 -27
- data/test/fixtures/stylesheets/compass/images/flag-s5b4f509715.png +0 -0
- data/test/fixtures/stylesheets/compass/sass/background-clip.scss +4 -2
- data/test/fixtures/stylesheets/compass/sass/background-origin.scss +10 -0
- data/test/fixtures/stylesheets/compass/sass/background-size.scss +12 -0
- data/test/fixtures/stylesheets/compass/sass/columns.scss +18 -0
- data/test/fixtures/stylesheets/compass/sass/filters.scss +24 -0
- data/test/fixtures/stylesheets/compass/sass/gradients.sass +10 -3
- data/test/fixtures/stylesheets/compass/sass/hyphenation.scss +11 -0
- data/test/fixtures/stylesheets/compass/sass/replacement.scss +22 -0
- data/test/fixtures/stylesheets/compass/sass/selection.scss +13 -0
- data/test/fixtures/stylesheets/compass/sass/text_shadow.scss +6 -1
- data/test/fixtures/stylesheets/compass/sass/transition.scss +11 -0
- data/test/fixtures/stylesheets/compass/sass/units.scss +45 -0
- data/test/fixtures/stylesheets/compass/sass/user-interface.scss +10 -5
- data/test/fixtures/stylesheets/compass/sass/utilities.scss +10 -0
- data/test/fixtures/stylesheets/compass/sass/vertical_rhythm.scss +208 -7
- data/test/fixtures/stylesheets/envtest/tmp/env.css +4 -4
- data/test/fixtures/stylesheets/valid/css/simple.css +4 -0
- data/test/helpers/test_case.rb +8 -1
- data/test/integrations/compass_test.rb +13 -13
- data/test/integrations/sprites_test.rb +173 -8
- data/test/test_helper.rb +4 -0
- data/test/units/command_line_test.rb +0 -2
- data/test/units/regressions_test.rb +35 -0
- data/test/units/sass_extensions_test.rb +23 -11
- data/test/units/sprites/image_test.rb +5 -0
- data/test/units/sprites/images_test.rb +46 -0
- data/test/units/sprites/layout_test.rb +18 -2
- data/test/units/watcher/compiler_test.rb +39 -0
- data/test/units/watcher/project_watcher_test.rb +65 -0
- data/test/units/watcher/watch_test.rb +42 -0
- metadata +83 -317
- data/bin/compass.compiled.rbc +0 -707
- data/examples/compass/images/emblem-a043c4f148.png +0 -0
- data/examples/compass/images/flag-03c3b29b35.png +0 -0
- data/examples/compass/images/flag-21cfbfbfc8.png +0 -0
- data/examples/css3/extensions/fancy-fonts/templates/project/Prociono.otf +0 -0
- data/examples/css3/extensions/fancy-fonts/templates/project/bgrove.otf +0 -0
- data/frameworks/blueprint/stylesheets/_blueprint.scss +0 -37
- data/frameworks/blueprint/stylesheets/blueprint/_buttons.scss +0 -101
- data/frameworks/blueprint/stylesheets/blueprint/_colors.scss +0 -36
- data/frameworks/blueprint/stylesheets/blueprint/_debug.scss +0 -28
- data/frameworks/blueprint/stylesheets/blueprint/_fancy-type.scss +0 -88
- data/frameworks/blueprint/stylesheets/blueprint/_form.scss +0 -66
- data/frameworks/blueprint/stylesheets/blueprint/_grid.scss +0 -258
- data/frameworks/blueprint/stylesheets/blueprint/_ie.scss +0 -111
- data/frameworks/blueprint/stylesheets/blueprint/_interaction.scss +0 -66
- data/frameworks/blueprint/stylesheets/blueprint/_link-icons.scss +0 -37
- data/frameworks/blueprint/stylesheets/blueprint/_liquid.scss +0 -152
- data/frameworks/blueprint/stylesheets/blueprint/_print.scss +0 -86
- data/frameworks/blueprint/stylesheets/blueprint/_reset.scss +0 -3
- data/frameworks/blueprint/stylesheets/blueprint/_rtl.scss +0 -121
- data/frameworks/blueprint/stylesheets/blueprint/_scaffolding.scss +0 -52
- data/frameworks/blueprint/stylesheets/blueprint/_typography.scss +0 -90
- data/frameworks/blueprint/stylesheets/blueprint/_utilities.scss +0 -37
- data/frameworks/blueprint/stylesheets/blueprint/reset/_utilities.scss +0 -80
- data/frameworks/blueprint/templates/basic/grid.png +0 -0
- data/frameworks/blueprint/templates/basic/ie.sass +0 -4
- data/frameworks/blueprint/templates/basic/manifest.rb +0 -30
- data/frameworks/blueprint/templates/basic/partials/_base.sass +0 -10
- data/frameworks/blueprint/templates/basic/print.sass +0 -4
- data/frameworks/blueprint/templates/basic/screen.sass +0 -12
- data/frameworks/blueprint/templates/buttons/buttons.sass +0 -49
- data/frameworks/blueprint/templates/buttons/buttons/cross.png +0 -0
- data/frameworks/blueprint/templates/buttons/buttons/key.png +0 -0
- data/frameworks/blueprint/templates/buttons/buttons/tick.png +0 -0
- data/frameworks/blueprint/templates/buttons/manifest.rb +0 -17
- data/frameworks/blueprint/templates/link_icons/link_icons.sass +0 -13
- data/frameworks/blueprint/templates/link_icons/link_icons/doc.png +0 -0
- data/frameworks/blueprint/templates/link_icons/link_icons/email.png +0 -0
- data/frameworks/blueprint/templates/link_icons/link_icons/external.png +0 -0
- data/frameworks/blueprint/templates/link_icons/link_icons/feed.png +0 -0
- data/frameworks/blueprint/templates/link_icons/link_icons/im.png +0 -0
- data/frameworks/blueprint/templates/link_icons/link_icons/pdf.png +0 -0
- data/frameworks/blueprint/templates/link_icons/link_icons/visited.png +0 -0
- data/frameworks/blueprint/templates/link_icons/link_icons/xls.png +0 -0
- data/frameworks/blueprint/templates/link_icons/manifest.rb +0 -23
- data/frameworks/blueprint/templates/project/grid.png +0 -0
- data/frameworks/blueprint/templates/project/ie.sass +0 -16
- data/frameworks/blueprint/templates/project/manifest.rb +0 -30
- data/frameworks/blueprint/templates/project/partials/_base.sass +0 -11
- data/frameworks/blueprint/templates/project/print.sass +0 -8
- data/frameworks/blueprint/templates/project/screen.sass +0 -46
- data/frameworks/blueprint/templates/semantic/grid.png +0 -0
- data/frameworks/blueprint/templates/semantic/ie.sass +0 -16
- data/frameworks/blueprint/templates/semantic/manifest.rb +0 -33
- data/frameworks/blueprint/templates/semantic/partials/_base.sass +0 -10
- data/frameworks/blueprint/templates/semantic/partials/_form.sass +0 -6
- data/frameworks/blueprint/templates/semantic/partials/_page.sass +0 -17
- data/frameworks/blueprint/templates/semantic/partials/_two_col.sass +0 -38
- data/frameworks/blueprint/templates/semantic/print.sass +0 -5
- data/frameworks/blueprint/templates/semantic/screen.sass +0 -14
- data/lib/compass.rbc +0 -796
- data/lib/compass/actions.rbc +0 -2736
- data/lib/compass/app_integration.rbc +0 -836
- data/lib/compass/app_integration/merb.rbc +0 -106
- data/lib/compass/app_integration/rails.rbc +0 -2096
- data/lib/compass/app_integration/rails/configuration_defaults.rbc +0 -2430
- data/lib/compass/app_integration/rails/installer.rbc +0 -3677
- data/lib/compass/app_integration/stand_alone.rbc +0 -589
- data/lib/compass/app_integration/stand_alone/configuration_defaults.rbc +0 -721
- data/lib/compass/app_integration/stand_alone/installer.rbc +0 -1487
- data/lib/compass/browser_support.rbc +0 -1144
- data/lib/compass/commands.rbc +0 -307
- data/lib/compass/commands/base.rbc +0 -1044
- data/lib/compass/commands/clean_project.rbc +0 -1856
- data/lib/compass/commands/create_project.rbc +0 -2691
- data/lib/compass/commands/default.rbc +0 -1677
- data/lib/compass/commands/generate_grid_background.rbc +0 -1939
- data/lib/compass/commands/help.rbc +0 -1921
- data/lib/compass/commands/imports.rbc +0 -969
- data/lib/compass/commands/installer_command.rbc +0 -807
- data/lib/compass/commands/interactive.rbc +0 -1341
- data/lib/compass/commands/list_frameworks.rbc +0 -1111
- data/lib/compass/commands/print_version.rbc +0 -2478
- data/lib/compass/commands/project_base.rbc +0 -2085
- data/lib/compass/commands/project_stats.rbc +0 -4202
- data/lib/compass/commands/registry.rbc +0 -1350
- data/lib/compass/commands/sprite.rbc +0 -2212
- data/lib/compass/commands/stamp_pattern.rbc +0 -2011
- data/lib/compass/commands/unpack_extension.rbc +0 -2348
- data/lib/compass/commands/update_project.rbc +0 -3002
- data/lib/compass/commands/validate_project.rbc +0 -1686
- data/lib/compass/commands/watch_project.rbc +0 -4155
- data/lib/compass/commands/write_configuration.rbc +0 -2896
- data/lib/compass/compiler.rbc +0 -4913
- data/lib/compass/configuration.rbc +0 -1398
- data/lib/compass/configuration/adapters.rbc +0 -2088
- data/lib/compass/configuration/comments.rbc +0 -843
- data/lib/compass/configuration/data.rbc +0 -2633
- data/lib/compass/configuration/defaults.rbc +0 -3617
- data/lib/compass/configuration/file_data.rbc +0 -643
- data/lib/compass/configuration/helpers.rbc +0 -3500
- data/lib/compass/configuration/inheritance.rbc +0 -3592
- data/lib/compass/configuration/paths.rbc +0 -412
- data/lib/compass/configuration/serialization.rbc +0 -1996
- data/lib/compass/dependencies.rbc +0 -232
- data/lib/compass/errors.rbc +0 -176
- data/lib/compass/exec.rbc +0 -500
- data/lib/compass/exec/command_option_parser.rbc +0 -676
- data/lib/compass/exec/global_options_parser.rbc +0 -1306
- data/lib/compass/exec/helpers.rbc +0 -758
- data/lib/compass/exec/project_options_parser.rbc +0 -1515
- data/lib/compass/exec/sub_command_ui.rbc +0 -1191
- data/lib/compass/frameworks.rbc +0 -3640
- data/lib/compass/grid_builder.rbc +0 -0
- data/lib/compass/installers.rbc +0 -152
- data/lib/compass/installers/bare_installer.rbc +0 -939
- data/lib/compass/installers/base.rbc +0 -4427
- data/lib/compass/installers/manifest.rbc +0 -3335
- data/lib/compass/installers/manifest_installer.rbc +0 -1591
- data/lib/compass/installers/template_context.rbc +0 -1030
- data/lib/compass/logger.rbc +0 -2317
- data/lib/compass/quick_cache.rbc +0 -324
- data/lib/compass/sass_extensions.rbc +0 -213
- data/lib/compass/sass_extensions/functions.rbc +0 -808
- data/lib/compass/sass_extensions/functions/colors.rbc +0 -1279
- data/lib/compass/sass_extensions/functions/constants.rbc +0 -1921
- data/lib/compass/sass_extensions/functions/cross_browser_support.rbc +0 -1966
- data/lib/compass/sass_extensions/functions/display.rbc +0 -1227
- data/lib/compass/sass_extensions/functions/enumerate.rbc +0 -446
- data/lib/compass/sass_extensions/functions/env.rbc +0 -299
- data/lib/compass/sass_extensions/functions/font_files.rbc +0 -821
- data/lib/compass/sass_extensions/functions/gradient_support.rbc +0 -14147
- data/lib/compass/sass_extensions/functions/image_size.rbc +0 -3152
- data/lib/compass/sass_extensions/functions/inline_image.rbc +0 -1678
- data/lib/compass/sass_extensions/functions/lists.rbc +0 -2601
- data/lib/compass/sass_extensions/functions/selectors.rbc +0 -1592
- data/lib/compass/sass_extensions/functions/sprites.rbc +0 -3792
- data/lib/compass/sass_extensions/functions/trig.rbc +0 -811
- data/lib/compass/sass_extensions/functions/urls.rbc +0 -5248
- data/lib/compass/sass_extensions/monkey_patches.rbc +0 -134
- data/lib/compass/sass_extensions/monkey_patches/browser_support.rbc +0 -2169
- data/lib/compass/sass_extensions/monkey_patches/traversal.rbc +0 -660
- data/lib/compass/sass_extensions/sprites.rbc +0 -363
- data/lib/compass/sass_extensions/sprites/base.rbc +0 -4529
- data/lib/compass/sass_extensions/sprites/engines.rbc +0 -662
- data/lib/compass/sass_extensions/sprites/engines/chunky_png_engine.rbc +0 -1074
- data/lib/compass/sass_extensions/sprites/image.rbc +0 -2961
- data/lib/compass/sass_extensions/sprites/image_methods.rbc +0 -900
- data/lib/compass/sass_extensions/sprites/image_row.rbc +0 -1168
- data/lib/compass/sass_extensions/sprites/layout_methods.rbc +0 -3236
- data/lib/compass/sass_extensions/sprites/row_fitter.rbc +0 -2067
- data/lib/compass/sass_extensions/sprites/sprite_map.rbc +0 -1991
- data/lib/compass/sass_extensions/sprites/sprite_methods.rbc +0 -3190
- data/lib/compass/sass_extensions/sprites/sprites.rbc +0 -1573
- data/lib/compass/sprite_importer.rbc +0 -3573
- data/lib/compass/util.rbc +0 -552
- data/lib/compass/version.rbc +0 -1245
- data/test/fixtures/stylesheets/blueprint/config.rb +0 -14
- data/test/fixtures/stylesheets/blueprint/css/ie.css +0 -76
- data/test/fixtures/stylesheets/blueprint/css/print.css +0 -56
- data/test/fixtures/stylesheets/blueprint/css/screen.css +0 -816
- data/test/fixtures/stylesheets/blueprint/css/single-imports/buttons.css +0 -58
- data/test/fixtures/stylesheets/blueprint/css/single-imports/colors.css +0 -80
- data/test/fixtures/stylesheets/blueprint/css/single-imports/debug.css +0 -12
- data/test/fixtures/stylesheets/blueprint/css/single-imports/fancy-type.css +0 -30
- data/test/fixtures/stylesheets/blueprint/css/single-imports/form.css +0 -42
- data/test/fixtures/stylesheets/blueprint/css/single-imports/grid.css +0 -435
- data/test/fixtures/stylesheets/blueprint/css/single-imports/ie.css +0 -76
- data/test/fixtures/stylesheets/blueprint/css/single-imports/interaction.css +0 -46
- data/test/fixtures/stylesheets/blueprint/css/single-imports/link-icons.css +0 -40
- data/test/fixtures/stylesheets/blueprint/css/single-imports/liquid.css +0 -651
- data/test/fixtures/stylesheets/blueprint/css/single-imports/print.css +0 -60
- data/test/fixtures/stylesheets/blueprint/css/single-imports/reset-utilities.css +0 -36
- data/test/fixtures/stylesheets/blueprint/css/single-imports/reset.css +0 -40
- data/test/fixtures/stylesheets/blueprint/css/single-imports/rtl.css +0 -437
- data/test/fixtures/stylesheets/blueprint/css/single-imports/scaffolding.css +0 -45
- data/test/fixtures/stylesheets/blueprint/css/single-imports/typography.css +0 -146
- data/test/fixtures/stylesheets/blueprint/css/single-imports/utilities.css +0 -35
- data/test/fixtures/stylesheets/blueprint/images/grid.png +0 -0
- data/test/fixtures/stylesheets/blueprint/images/link_icons/doc.png +0 -0
- data/test/fixtures/stylesheets/blueprint/images/link_icons/email.png +0 -0
- data/test/fixtures/stylesheets/blueprint/images/link_icons/external.png +0 -0
- data/test/fixtures/stylesheets/blueprint/images/link_icons/feed.png +0 -0
- data/test/fixtures/stylesheets/blueprint/images/link_icons/im.png +0 -0
- data/test/fixtures/stylesheets/blueprint/images/link_icons/pdf.png +0 -0
- data/test/fixtures/stylesheets/blueprint/images/link_icons/visited.png +0 -0
- data/test/fixtures/stylesheets/blueprint/images/link_icons/xls.png +0 -0
- data/test/fixtures/stylesheets/blueprint/sass/ie.sass +0 -3
- data/test/fixtures/stylesheets/blueprint/sass/print.sass +0 -3
- data/test/fixtures/stylesheets/blueprint/sass/screen.sass +0 -18
- data/test/fixtures/stylesheets/blueprint/sass/single-imports/buttons.scss +0 -4
- data/test/fixtures/stylesheets/blueprint/sass/single-imports/colors.scss +0 -34
- data/test/fixtures/stylesheets/blueprint/sass/single-imports/debug.scss +0 -3
- data/test/fixtures/stylesheets/blueprint/sass/single-imports/fancy-type.scss +0 -3
- data/test/fixtures/stylesheets/blueprint/sass/single-imports/form.scss +0 -5
- data/test/fixtures/stylesheets/blueprint/sass/single-imports/grid.scss +0 -3
- data/test/fixtures/stylesheets/blueprint/sass/single-imports/ie.scss +0 -3
- data/test/fixtures/stylesheets/blueprint/sass/single-imports/interaction.scss +0 -3
- data/test/fixtures/stylesheets/blueprint/sass/single-imports/link-icons.scss +0 -13
- data/test/fixtures/stylesheets/blueprint/sass/single-imports/liquid.scss +0 -3
- data/test/fixtures/stylesheets/blueprint/sass/single-imports/print.scss +0 -5
- data/test/fixtures/stylesheets/blueprint/sass/single-imports/reset-utilities.scss +0 -5
- data/test/fixtures/stylesheets/blueprint/sass/single-imports/reset.scss +0 -1
- data/test/fixtures/stylesheets/blueprint/sass/single-imports/rtl.scss +0 -3
- data/test/fixtures/stylesheets/blueprint/sass/single-imports/scaffolding.scss +0 -5
- data/test/fixtures/stylesheets/blueprint/sass/single-imports/typography.scss +0 -3
- data/test/fixtures/stylesheets/blueprint/sass/single-imports/utilities.scss +0 -3
- data/test/fixtures/stylesheets/compass/images/flag-s4798b5a210.png +0 -0
- data/test/helpers/command_line.rbc +0 -2820
- data/test/helpers/diff.rbc +0 -1104
- data/test/helpers/io.rbc +0 -962
- data/test/helpers/rails.rbc +0 -1116
- data/test/helpers/test_case.rbc +0 -1255
- data/test/integrations/compass_test.rbc +0 -6589
- data/test/integrations/rails_integration_test.rbc +0 -1342
- data/test/integrations/sprites_test.rbc +0 -6192
- data/test/test_helper.rbc +0 -1694
- data/test/units/actions_test.rbc +0 -644
- data/test/units/command_line_test.rbc +0 -1532
- data/test/units/compass_png_test.rbc +0 -0
- data/test/units/configuration_test.rbc +0 -3833
- data/test/units/rails_configuration_test.rbc +0 -1032
- data/test/units/sass_extensions_test.rbc +0 -3586
- data/test/units/sprites/engine_test.rbc +0 -962
- data/test/units/sprites/image_row_test.rbc +0 -1578
- data/test/units/sprites/image_test.rbc +0 -2836
- data/test/units/sprites/importer_test.rbc +0 -2620
- data/test/units/sprites/row_fitter_test.rbc +0 -1479
- data/test/units/sprites/sprite_command_test.rbc +0 -1147
- data/test/units/sprites/sprite_map_test.rbc +0 -6515
@@ -0,0 +1,152 @@
|
|
1
|
+
// @private Default font-size for all browsers
|
2
|
+
$browser-default-font-size: 16px;
|
3
|
+
|
4
|
+
// Base font size in pixels, if not already defined.
|
5
|
+
// Should be the same as the font-size of the html element.
|
6
|
+
$base-font-size: 16px !default;
|
7
|
+
|
8
|
+
// Whether to output fallback values in px when outputting rems.
|
9
|
+
$rem-with-px-fallback: true !default;
|
10
|
+
|
11
|
+
|
12
|
+
// Convert any CSS <length> or <percentage> value to any another.
|
13
|
+
//
|
14
|
+
// @param $length
|
15
|
+
// A css <length> or <percentage> value
|
16
|
+
//
|
17
|
+
// @param $to-unit
|
18
|
+
// String matching a css unit keyword, e.g. 'em', '%', etc.
|
19
|
+
//
|
20
|
+
// @param $from-context
|
21
|
+
// When converting from relative units, the absolute length (in px) to
|
22
|
+
// which $length refers (e.g. for $lengths in em units, would normally be the
|
23
|
+
// font-size of the current element).
|
24
|
+
//
|
25
|
+
// @param $to-context
|
26
|
+
// For converting to relative units, the absolute length in px to which the
|
27
|
+
// output value will refer. Defaults to the same as $from-context, since it is
|
28
|
+
// rarely needed.
|
29
|
+
@function convert-length(
|
30
|
+
$length,
|
31
|
+
$to-unit,
|
32
|
+
$from-context: $base-font-size,
|
33
|
+
$to-context: $from-context
|
34
|
+
) {
|
35
|
+
|
36
|
+
$from-unit: unit($length);
|
37
|
+
|
38
|
+
// Optimize for cases where `from` and `to` units are accidentally the same.
|
39
|
+
@if $from-unit == $to-unit { @return $length; }
|
40
|
+
|
41
|
+
// Context values must be in px so we can determine a conversion ratio for
|
42
|
+
// relative units.
|
43
|
+
@if unit($from-context) != 'px' { @warn "Paremeter $from-context must resolve to a value in pixel units."; }
|
44
|
+
@if unit($to-context) != 'px' { @warn "Parameter $to-context must resolve to a value in pixel units."; }
|
45
|
+
|
46
|
+
// Convert input length to pixels
|
47
|
+
$px-length: $length;
|
48
|
+
|
49
|
+
@if $from-unit != 'px' {
|
50
|
+
// Convert relative units using the from-context parameter.
|
51
|
+
@if $from-unit == 'em' { $px-length: $length * $from-context / 1em }
|
52
|
+
@else if $from-unit == 'rem' { $px-length: $length * $base-font-size / 1rem }
|
53
|
+
@else if $from-unit == '%' { $px-length: $length * $from-context / 100% }
|
54
|
+
@else if $from-unit == 'ex' { $px-length: $length * $from-context / 2ex }
|
55
|
+
// Convert absolute units using Sass' conversion table.
|
56
|
+
@else if $from-unit == 'in' or
|
57
|
+
$from-unit == 'mm' or
|
58
|
+
$from-unit == 'cm' or
|
59
|
+
$from-unit == 'pt' or
|
60
|
+
$from-unit == 'pc' { $px-length: 0px + $length }
|
61
|
+
// Certain units can't be converted.
|
62
|
+
@else if $from-unit == 'ch' or
|
63
|
+
$from-unit == 'vw' or
|
64
|
+
$from-unit == 'vh' or
|
65
|
+
$from-unit == 'vmin' {
|
66
|
+
@warn "#{$from-unit} units can't be reliably converted; Returning original value.";
|
67
|
+
@return $length;
|
68
|
+
}
|
69
|
+
@else {
|
70
|
+
@warn "#{$from-unit} is an unknown length unit. Returning original value.";
|
71
|
+
@return $length;
|
72
|
+
}
|
73
|
+
}
|
74
|
+
|
75
|
+
// Convert length in pixels to the output unit
|
76
|
+
$output-length: $px-length;
|
77
|
+
@if $to-unit != 'px' {
|
78
|
+
// Relative units
|
79
|
+
@if $to-unit == 'em' { $output-length: $px-length * 1em / $to-context }
|
80
|
+
@else if $to-unit == 'rem' { $output-length: $px-length * 1rem / $base-font-size }
|
81
|
+
@else if $to-unit == '%' { $output-length: $px-length * 100% / $to-context }
|
82
|
+
@else if $to-unit == 'ex' { $output-length: $px-length * 2ex / $to-context }
|
83
|
+
// Absolute units
|
84
|
+
@else if $to-unit == 'in' { $output-length: 0in + $px-length }
|
85
|
+
@else if $to-unit == 'mm' { $output-length: 0mm + $px-length }
|
86
|
+
@else if $to-unit == 'cm' { $output-length: 0cm + $px-length }
|
87
|
+
@else if $to-unit == 'pt' { $output-length: 0pt + $px-length }
|
88
|
+
@else if $to-unit == 'pc' { $output-length: 0pc + $px-length }
|
89
|
+
// Non-convertible units
|
90
|
+
@else if $to-unit == 'ch' or
|
91
|
+
$to-unit == 'vw' or
|
92
|
+
$to-unit == 'vh' or
|
93
|
+
$to-unit == 'vmin' {
|
94
|
+
@warn "#{$to-unit} units can't be reliably converted; Returning original value.";
|
95
|
+
@return $length;
|
96
|
+
}
|
97
|
+
@else {
|
98
|
+
@warn "#{$to-unit} is an unknown length unit. Returning original value.";
|
99
|
+
@return $length;
|
100
|
+
}
|
101
|
+
}
|
102
|
+
|
103
|
+
@return $output-length;
|
104
|
+
}
|
105
|
+
|
106
|
+
|
107
|
+
// Output a given style rule containing rem values along with an (optional)
|
108
|
+
// fallback rule for older browsers (with rem values converted to px).
|
109
|
+
//
|
110
|
+
// @param $property
|
111
|
+
// The css property name.
|
112
|
+
//
|
113
|
+
// @param $values
|
114
|
+
// The value (or space-separated list of values) for the property.
|
115
|
+
//
|
116
|
+
// @param $use-px-fallback
|
117
|
+
// [ true | false ]
|
118
|
+
//
|
119
|
+
@mixin rem($property, $values, $use-px-fallback: $rem-with-px-fallback) {
|
120
|
+
// Create a couple of empty lists as output buffers.
|
121
|
+
$px-values: ();
|
122
|
+
$rem-values: ();
|
123
|
+
|
124
|
+
// Loop through the $values list
|
125
|
+
@each $value in $values {
|
126
|
+
// For each property value, if it's in rem or px, derive both rem and
|
127
|
+
// px values for it and add those to the end of the appropriate buffer.
|
128
|
+
// Ensure all pixel values are rounded to the nearest pixel.
|
129
|
+
@if type-of($value) == number and not unitless($value) and (unit($value) == px or unit($value) == rem) {
|
130
|
+
@if unit($value) == px {
|
131
|
+
$px-values: join($px-values, round($value));
|
132
|
+
$rem-values: join($rem-values, convert-length($value, rem));
|
133
|
+
}
|
134
|
+
@else {
|
135
|
+
$px-values: join($px-values, round(convert-length($value, px)));
|
136
|
+
$rem-values: join($rem-values, $value);
|
137
|
+
}
|
138
|
+
}
|
139
|
+
@else {
|
140
|
+
$px-values: join($px-values, $value);
|
141
|
+
$rem-values: join($rem-values, $value);
|
142
|
+
}
|
143
|
+
}
|
144
|
+
|
145
|
+
// Use pixel fallback for browsers that don't understand rem units.
|
146
|
+
@if $use-px-fallback {
|
147
|
+
#{$property}: $px-values;
|
148
|
+
}
|
149
|
+
|
150
|
+
// Use rem values for everyone else (overrides pixel values).
|
151
|
+
#{$property}: $rem-values;
|
152
|
+
}
|
@@ -1,19 +1,25 @@
|
|
1
1
|
@import "compass/layout/grid-background";
|
2
|
+
@import "compass/typography/units";
|
2
3
|
|
3
|
-
// The
|
4
|
+
// The default font size for all text in pixels
|
4
5
|
$base-font-size: 16px !default;
|
5
6
|
|
6
|
-
// The
|
7
|
+
// The distance between text baselines (vertical rhythm) in pixels.
|
7
8
|
$base-line-height: 24px !default;
|
8
9
|
|
9
|
-
//
|
10
|
-
|
10
|
+
// The length unit in which to output rhythm values.
|
11
|
+
// Supported values: px, em, rem. Percent units can't be used since they
|
12
|
+
// make calculating padding and margins impractical, and percentage borders are
|
13
|
+
// not valid or supported in css.
|
14
|
+
$rhythm-unit: 'em' !default;
|
11
15
|
|
12
|
-
//
|
13
|
-
$
|
16
|
+
// Whether to output fallback values in px when using rem as the rhythm-unit.
|
17
|
+
$rem-with-px-fallback: true !default;
|
14
18
|
|
15
|
-
//
|
16
|
-
|
19
|
+
// Default values for rhythm borders properties.
|
20
|
+
// Supports style alone eg. `solid` or list of style and color eg. `solid #aaa`;
|
21
|
+
$default-rhythm-border-width: 1px !default;
|
22
|
+
$default-rhythm-border-style: solid !default;
|
17
23
|
|
18
24
|
// Allows the `adjust-font-size-to` mixin and the `lines-for-font-size` function
|
19
25
|
// to round the line height to the nearest half line height instead of the
|
@@ -24,38 +30,71 @@ $round-to-nearest-half-line: false !default;
|
|
24
30
|
// of vertical padding above and below the text.
|
25
31
|
$min-line-padding: 2px !default;
|
26
32
|
|
27
|
-
// $base-font-size but in your output unit of choice.
|
28
|
-
// Defaults to 1em when `$relative-font-sizing` is true.
|
29
|
-
$font-unit: if($relative-font-sizing, 1em, $base-font-size) !default;
|
30
|
-
|
31
|
-
// The basic unit of font rhythm.
|
32
|
-
$base-rhythm-unit: $base-line-height / $base-font-size * $font-unit;
|
33
|
-
|
34
33
|
// The leader is the amount of whitespace in a line.
|
35
34
|
// It might be useful in your calculations.
|
36
|
-
$base-leader: ($base-line-height - $base-font-size
|
35
|
+
$base-leader: convert-length($base-line-height - $base-font-size, $rhythm-unit, $base-font-size);
|
37
36
|
|
38
37
|
// The half-leader is the amount of whitespace above and below a line.
|
39
38
|
// It might be useful in your calculations.
|
40
39
|
$base-half-leader: $base-leader / 2;
|
41
40
|
|
42
|
-
//
|
43
|
-
|
44
|
-
|
41
|
+
// @private Whether the rhythm output is in absolute units (px) or not (em, rem)
|
42
|
+
$relative-font-sizing: if($rhythm-unit == px, false, true);
|
43
|
+
|
44
|
+
// Validate units
|
45
|
+
@if unit($base-font-size) != 'px' { @warn "$base-font-size must resolve to a pixel unit."; }
|
46
|
+
@if unit($base-line-height) != 'px' { @warn "$base-line-height must resolve to a pixel unit."; }
|
47
|
+
@if $rhythm-unit != 'px' and $rhythm-unit != 'em' and $rhythm-unit != 'rem' {
|
48
|
+
@warn "$rhythm-unit must be `px`, `em` or `rem`.";
|
45
49
|
}
|
46
50
|
|
47
|
-
|
48
|
-
|
49
|
-
|
51
|
+
|
52
|
+
// Calculate rhythm units.
|
53
|
+
@function rhythm($lines: 1, $font-size: $base-font-size, $offset: 0) {
|
54
|
+
$rhythm: convert-length($lines * $base-line-height - $offset, $rhythm-unit, $font-size);
|
55
|
+
@if unit($rhythm) == px {
|
56
|
+
$rhythm: floor($rhythm);
|
57
|
+
}
|
58
|
+
@return $rhythm;
|
50
59
|
}
|
51
60
|
|
52
|
-
|
53
|
-
|
61
|
+
// Calculate the minimum multiple of rhythm units needed to contain the font-size.
|
62
|
+
@function lines-for-font-size($font-size) {
|
63
|
+
$lines: if($round-to-nearest-half-line,
|
64
|
+
ceil(2 * $font-size / $base-line-height) / 2,
|
65
|
+
ceil($font-size / $base-line-height));
|
66
|
+
// If lines are cramped include some extra lead.
|
67
|
+
@if ($lines * $base-line-height - $font-size) < ($min-line-padding * 2) {
|
68
|
+
$lines: $lines + if($round-to-nearest-half-line, 0.5, 1);
|
69
|
+
}
|
70
|
+
@return $lines;
|
71
|
+
}
|
72
|
+
|
73
|
+
|
74
|
+
// @private Outputs rhythm values. For rem units, outputs pixel fallbacks
|
75
|
+
// by default.
|
76
|
+
@mixin output-rhythm($property, $values) {
|
77
|
+
@if $rhythm-unit == rem and $rem-with-px-fallback {
|
78
|
+
@include rem($property, $values);
|
79
|
+
}
|
80
|
+
@else {
|
81
|
+
$output: ();
|
82
|
+
@each $value in $values {
|
83
|
+
@if unit($value) == px {
|
84
|
+
// Ensure all pixel values are rounded to the nearest pixel.
|
85
|
+
$output: join($output, round($value));
|
86
|
+
}
|
87
|
+
@else {
|
88
|
+
$output: join($output, $value);
|
89
|
+
}
|
90
|
+
}
|
91
|
+
#{$property}: $output;
|
92
|
+
}
|
54
93
|
}
|
55
94
|
|
56
95
|
// Establishes a font baseline for the given font-size.
|
57
96
|
@mixin establish-baseline($font-size: $base-font-size) {
|
58
|
-
$relative-size
|
97
|
+
$relative-size: 100% * ($font-size / $browser-default-font-size);
|
59
98
|
|
60
99
|
@if $legacy-support-for-ie6 and (not $relative-font-sizing) {
|
61
100
|
// IE 6 refuses to resize fonts set in pixels and it weirdly resizes fonts
|
@@ -64,28 +103,40 @@ $base-half-leader: $base-leader / 2;
|
|
64
103
|
* html { font-size: $relative-size; }
|
65
104
|
}
|
66
105
|
html {
|
67
|
-
font-size: if($relative-font-sizing
|
68
|
-
|
106
|
+
font-size: if($relative-font-sizing, $relative-size, $font-size);
|
107
|
+
|
108
|
+
// Webkit has a bug that prevents line-height being set in rem on <html>;
|
109
|
+
// To work around this and simplify output, we can set initial line-height
|
110
|
+
// in ems for all relative rhythm units, even when $rhythm-unit is `rem`.
|
111
|
+
@if $relative-font-sizing {
|
112
|
+
line-height: convert-length($base-line-height, em);
|
113
|
+
}
|
114
|
+
@else {
|
115
|
+
line-height: round($base-line-height);
|
116
|
+
}
|
69
117
|
}
|
70
118
|
}
|
71
119
|
|
72
|
-
// Resets the
|
120
|
+
// Resets the baseline to 1 rhythm unit
|
73
121
|
// Does not work on elements whose font-size is different from $base-font-size.
|
74
122
|
//
|
75
123
|
// @deprecated This mixin will be removed in the next release.
|
76
|
-
// Please use
|
77
|
-
@mixin reset-baseline {
|
78
|
-
@include adjust-leading-to(1,
|
124
|
+
// Please use `adjust-leading-to(1)` instead.
|
125
|
+
@mixin reset-baseline($font-size: $base-font-size) {
|
126
|
+
@include adjust-leading-to(1, $font-size);
|
79
127
|
}
|
80
128
|
|
81
129
|
// Show a background image that can be used to debug your alignments.
|
130
|
+
// As this is a development feature, this mixin never outputs pixel fallbacks
|
131
|
+
// for rem output.
|
82
132
|
// Include the $img argument if you would rather use your own image than the
|
83
133
|
// Compass default gradient image.
|
84
134
|
@mixin debug-vertical-alignment($img: false) {
|
85
135
|
@if $img {
|
86
136
|
background: image-url($img);
|
87
|
-
}
|
88
|
-
|
137
|
+
}
|
138
|
+
@else {
|
139
|
+
@include baseline-grid-background(rhythm());
|
89
140
|
}
|
90
141
|
}
|
91
142
|
|
@@ -94,12 +145,13 @@ $base-half-leader: $base-leader / 2;
|
|
94
145
|
// of this font should use up. It does not have to be an integer, but it
|
95
146
|
// defaults to the smallest integer that is large enough to fit the font.
|
96
147
|
// Use $from-size to adjust from a font-size other than the base font-size.
|
97
|
-
@mixin adjust-font-size-to($to-size, $lines:
|
98
|
-
|
99
|
-
|
148
|
+
@mixin adjust-font-size-to($to-size, $lines: auto, $from-size: $base-font-size) {
|
149
|
+
$to-size: convert-length($to-size, px, $from-size);
|
150
|
+
@if $lines == auto {
|
151
|
+
$lines: lines-for-font-size($to-size);
|
100
152
|
}
|
101
|
-
font-size
|
102
|
-
@include adjust-leading-to($lines,
|
153
|
+
@include output-rhythm(font-size, convert-length($to-size, $rhythm-unit, $from-size));
|
154
|
+
@include adjust-leading-to($lines, $to-size);
|
103
155
|
}
|
104
156
|
|
105
157
|
// Adjust a block to have different line height to maintain the rhythm.
|
@@ -107,117 +159,141 @@ $base-half-leader: $base-leader / 2;
|
|
107
159
|
// font should use up. It does not have to be an integer, but it defaults to the
|
108
160
|
// smallest integer that is large enough to fit the font.
|
109
161
|
@mixin adjust-leading-to($lines, $font-size: $base-font-size) {
|
110
|
-
line-height
|
111
|
-
}
|
112
|
-
|
113
|
-
// Calculate rhythm units.
|
114
|
-
@function rhythm(
|
115
|
-
$lines: 1,
|
116
|
-
$font-size: $base-font-size,
|
117
|
-
$offset: 0
|
118
|
-
) {
|
119
|
-
@if not $relative-font-sizing and $font-size != $base-font-size {
|
120
|
-
@warn "$relative-font-sizing is false but a relative font size was passed to the rhythm function";
|
121
|
-
}
|
122
|
-
$rhythm: $font-unit * ($lines * $base-line-height - $offset) / $font-size;
|
123
|
-
// Round the pixels down to nearest integer.
|
124
|
-
@if unit($rhythm) == px {
|
125
|
-
$rhythm: floor($rhythm);
|
126
|
-
}
|
127
|
-
@return $rhythm;
|
128
|
-
}
|
129
|
-
|
130
|
-
// Calculate the minimum multiple of rhythm units needed to contain the font-size.
|
131
|
-
@function lines-for-font-size($font-size) {
|
132
|
-
$lines: if($round-to-nearest-half-line,
|
133
|
-
ceil(2 * $font-size / $base-line-height) / 2,
|
134
|
-
ceil($font-size / $base-line-height));
|
135
|
-
@if $lines * $base-line-height - $font-size < $min-line-padding * 2 {
|
136
|
-
$lines: $lines + if($round-to-nearest-half-line, 0.5, 1);
|
137
|
-
}
|
138
|
-
@return $lines;
|
162
|
+
@include output-rhythm(line-height, rhythm($lines, $font-size));
|
139
163
|
}
|
140
164
|
|
141
165
|
// Apply leading whitespace. The $property can be margin or padding.
|
142
166
|
@mixin leader($lines: 1, $font-size: $base-font-size, $property: margin) {
|
143
|
-
#{$property}-top
|
167
|
+
@include output-rhythm(#{$property}-top, rhythm($lines, $font-size));
|
144
168
|
}
|
145
169
|
|
146
170
|
// Apply leading whitespace as padding.
|
147
171
|
@mixin padding-leader($lines: 1, $font-size: $base-font-size) {
|
148
|
-
padding-top
|
172
|
+
@include output-rhythm(padding-top, rhythm($lines, $font-size));
|
149
173
|
}
|
150
174
|
|
151
175
|
// Apply leading whitespace as margin.
|
152
176
|
@mixin margin-leader($lines: 1, $font-size: $base-font-size) {
|
153
|
-
margin-top
|
177
|
+
@include output-rhythm(margin-top, rhythm($lines, $font-size));
|
154
178
|
}
|
155
179
|
|
156
180
|
// Apply trailing whitespace. The $property can be margin or padding.
|
157
181
|
@mixin trailer($lines: 1, $font-size: $base-font-size, $property: margin) {
|
158
|
-
#{$property}-bottom
|
182
|
+
@include output-rhythm(#{$property}-bottom, rhythm($lines, $font-size));
|
159
183
|
}
|
160
184
|
|
161
185
|
// Apply trailing whitespace as padding.
|
162
186
|
@mixin padding-trailer($lines: 1, $font-size: $base-font-size) {
|
163
|
-
padding-bottom
|
187
|
+
@include output-rhythm(padding-bottom, rhythm($lines, $font-size));
|
164
188
|
}
|
165
189
|
|
166
190
|
// Apply trailing whitespace as margin.
|
167
191
|
@mixin margin-trailer($lines: 1, $font-size: $base-font-size) {
|
168
|
-
margin-bottom
|
192
|
+
@include output-rhythm(margin-bottom, rhythm($lines, $font-size));
|
169
193
|
}
|
170
194
|
|
171
195
|
// Shorthand mixin to apply whitespace for top and bottom margins and padding.
|
172
|
-
@mixin rhythm(
|
196
|
+
@mixin rhythm(
|
197
|
+
$leader: 1,
|
198
|
+
$padding-leader: 0,
|
199
|
+
$padding-trailer: $padding-leader,
|
200
|
+
$trailer: $leader,
|
201
|
+
$font-size: $base-font-size
|
202
|
+
) {
|
173
203
|
@include leader($leader, $font-size);
|
174
204
|
@include padding-leader($padding-leader, $font-size);
|
175
205
|
@include padding-trailer($padding-trailer, $font-size);
|
176
206
|
@include trailer($trailer, $font-size);
|
177
207
|
}
|
178
208
|
|
179
|
-
//
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
width: $font-unit * $width / $font-size;
|
188
|
-
};
|
189
|
-
padding-#{$side}: rhythm($lines, $font-size, $offset: $width);
|
209
|
+
// Shorthand mixin to apply whitespace for top and bottom margins.
|
210
|
+
@mixin rhythm-margins(
|
211
|
+
$leader: 1,
|
212
|
+
$trailer: $leader,
|
213
|
+
$font-size: $base-font-size
|
214
|
+
) {
|
215
|
+
@include leader($leader, $font-size);
|
216
|
+
@include trailer($trailer, $font-size);
|
190
217
|
}
|
191
218
|
|
192
|
-
//
|
193
|
-
@mixin rhythm-
|
194
|
-
|
195
|
-
|
219
|
+
// Shorthand mixin to apply whitespace for top and bottom padding.
|
220
|
+
@mixin rhythm-padding(
|
221
|
+
$padding-leader: 1,
|
222
|
+
$padding-trailer: $padding-leader,
|
223
|
+
$font-size: $base-font-size
|
224
|
+
) {
|
225
|
+
@include padding-leader($padding-leader, $font-size);
|
226
|
+
@include padding-trailer($padding-trailer, $font-size);
|
227
|
+
}
|
228
|
+
|
229
|
+
// Apply a border and whitespace to any side without destroying the vertical
|
230
|
+
// rhythm. The whitespace must be greater than the width of the border.
|
231
|
+
@mixin apply-side-rhythm-border(
|
232
|
+
$side,
|
233
|
+
$width: $default-rhythm-border-width,
|
234
|
+
$lines: 1,
|
235
|
+
$font-size: $base-font-size,
|
236
|
+
$border-style: $default-rhythm-border-style
|
237
|
+
) {
|
238
|
+
// If applying borders to all sides, use shorthand properties
|
239
|
+
$border-prop: if($side == all, border, border-#{$side});
|
240
|
+
@include output-rhythm(#{$border-prop}-width, convert-length($width, $rhythm-unit, $font-size));
|
241
|
+
#{$border-prop}-style: nth($border-style, 1);
|
242
|
+
@if type-of($border-style) == list and length($border-style) > 1 {
|
243
|
+
#{$border-prop}-color: nth($border-style, 2);
|
196
244
|
}
|
197
|
-
|
198
|
-
|
199
|
-
width: $font-unit * $width / $font-size;
|
200
|
-
};
|
201
|
-
padding: rhythm($lines, $font-size, $offset: $width);
|
245
|
+
$padding-prop: if($side == all, padding, padding-#{$side});
|
246
|
+
@include output-rhythm(#{$padding-prop}, rhythm($lines, $font-size, $offset: $width));
|
202
247
|
}
|
203
248
|
|
204
249
|
// Apply a leading border.
|
205
|
-
|
250
|
+
// $border-style and $width are deprecated and will be removed in a future version of Compass.
|
251
|
+
@mixin leading-border(
|
252
|
+
$width: $default-rhythm-border-width,
|
253
|
+
$lines: 1,
|
254
|
+
$font-size: $base-font-size,
|
255
|
+
$border-style: $default-rhythm-border-style
|
256
|
+
) {
|
206
257
|
@include apply-side-rhythm-border(top, $width, $lines, $font-size, $border-style);
|
207
258
|
}
|
208
259
|
|
209
260
|
// Apply a trailing border.
|
210
|
-
@mixin trailing-border(
|
261
|
+
@mixin trailing-border(
|
262
|
+
$width: $default-rhythm-border-width,
|
263
|
+
$lines: 1,
|
264
|
+
$font-size: $base-font-size,
|
265
|
+
$border-style: $default-rhythm-border-style
|
266
|
+
) {
|
211
267
|
@include apply-side-rhythm-border(bottom, $width, $lines, $font-size, $border-style);
|
212
268
|
}
|
213
269
|
|
214
270
|
// Apply both leading and trailing borders.
|
215
|
-
@mixin horizontal-borders(
|
271
|
+
@mixin horizontal-borders(
|
272
|
+
$width: $default-rhythm-border-width,
|
273
|
+
$lines: 1,
|
274
|
+
$font-size: $base-font-size,
|
275
|
+
$border-style: $default-rhythm-border-style
|
276
|
+
) {
|
216
277
|
@include leading-border($width, $lines, $font-size, $border-style);
|
217
278
|
@include trailing-border($width, $lines, $font-size, $border-style);
|
218
279
|
}
|
219
280
|
|
220
281
|
// Alias for `horizontal-borders` mixin.
|
221
|
-
@mixin h-borders(
|
282
|
+
@mixin h-borders(
|
283
|
+
$width: $default-rhythm-border-width,
|
284
|
+
$lines: 1,
|
285
|
+
$font-size: $base-font-size,
|
286
|
+
$border-style: $default-rhythm-border-style
|
287
|
+
) {
|
222
288
|
@include horizontal-borders($width, $lines, $font-size, $border-style);
|
223
289
|
}
|
290
|
+
|
291
|
+
// Apply borders and whitespace equally to all sides.
|
292
|
+
@mixin rhythm-borders(
|
293
|
+
$width: $default-rhythm-border-width,
|
294
|
+
$lines: 1,
|
295
|
+
$font-size: $base-font-size,
|
296
|
+
$border-style: $default-rhythm-border-style
|
297
|
+
) {
|
298
|
+
@include apply-side-rhythm-border(all, $width, $lines, $font-size, $border-style);
|
299
|
+
}
|