CSSEx.Helpers.Functions (CSSEx v0.6.6) View Source

Default base functions to use in stylesheets.

@fn::opacity(red, 0.8)

Link to this section Summary

Functions

Darken function, takes a color in the form of a string and a number representing the percentage to darken and returns a CSS rgba() string.

Lighten function, takes a color in the form of a string and a number representing the percentage to lighten and returns a CSS rgba() string.

Opacity function, takes a color in the form of a string and a number representing the desired alpha channel value in the form of a float and returns a CSS rgba() string.

Link to this section Functions

Link to this function

darken(ctx_content, color, percentage)

View Source

Darken function, takes a color in the form of a string and a number representing the percentage to darken and returns a CSS rgba() string.

@fn::darken(orange, 25)

Link to this function

lighten(ctx_content, color, percentage)

View Source

Lighten function, takes a color in the form of a string and a number representing the percentage to lighten and returns a CSS rgba() string.

@fn::lighten(orange, 10)

Link to this function

opacity(ctx_content, color, alpha)

View Source

Opacity function, takes a color in the form of a string and a number representing the desired alpha channel value in the form of a float and returns a CSS rgba() string.

@fn::opacity(orange, 0.5)