Compass Module----Helpers

Source: Internet
Author: User

Color Stops: When creating a picture using the CSS3 gradient property, sometimes in order to create a richer gradient effect, in addition to declaring the color values of the starting and ending points on the gradient line, and the color values that declare some of the intermediate points, we call this the color Stops. A color value plus the position of the current point. The Color Stops helper function automatically helps us calculate the position of the output point when we omit the point position representation.
Colors: Used to brighten the adjustment of a color value (very little is used)
Constants:
Cross Browser: If we're going to contribute to Compass's new feature across browser CSS plugins
Display Helpers: Only one helper function, value is inline, block
Environment Helpers: Get some environment information for the current compilation
Example: compass-env ();
returns the compilation environment for the current compass, with only two possible results for the function execution ('development' or 'production') One is the development environment and one is the production environment. Some of the behaviors of the two compass are different, for example, the inside of the comment information can be modified in the Config.rb file:

Line_comments = false;

To view the compilation environment: @debug compass-env ();

to force the use of the production environment on the command line :

Compass COMPILE-E Production--force

- E: used to specify our compilation environment.
--force: Let Compass overwrite overwriting existing files
You can specify the compilation environment again in config.rb :

Environment =:p Roduction or: Development

fontfiles: Configuring font path for font file CONFIG.RB: fonts_dir= "Fonts";
image Dimensions: Contains two helpers that are used to calculate the width and height of a picture
inline Data: Converting a file into a Base64 encoded format embedded in our CSS file
Math: Some helper for math calculations
selectors: One is a selector nested combination function, and the other is a selector overlay combination function.
Example: append-selector ($selector, $to-append)

A total of two parameters, the function is to combine the second parameter overlay into the first , used in the selector position .

1 # {append-selector ("p, Div, span", ". Bar")} {2    color: #ccc;  3 }

Compile as CSS:

1{2    color: #ccc;  3 }

Sprites: Helpers related to graphs
URLs:

Compass Module----Helpers

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.