This is a quick reference list of CSS functions and how they can be used to modify an element’s properties.
CSS – attr() Function
The attr() function returns the value of an attribute of the selected element, and is sometimes used to show the value of the href attribute after a link.
CSS – calc() Function
The calc() function performs a mathematical calculation to be used as the property value.
CSS – conic-gradient() Function
The conic-gradient() function sets a conic gradient as the background image with at least two color transitions rotated around a center point.
CSS – counter() Function
The counter() function returns the current value of the named counter as a string.
CSS – cubic-bezier() Function
The cubic-bezier() function describes a curve that is defined by four points P0 (starting point/state), P1, P2, and P3 (ending point/state).
CSS – hsl() Function
The HSL color value is specified with the hsl() function, which has the following syntax: hsl(hue, saturation, lightness).
CSS – max() Function
The max() function uses the largest value, from a comma-separated list of values, as the property value.
CSS – hsla() Function
The HSLA color value is specified with the hsla() function, which has the following syntax: hsla(hue, saturation, lightness, alpha).
CSS – min() Function
The min() function uses the smallest value, from a comma-separated list of values, as the property value.
CSS – linear-gradient() Function
The linear-gradient() function sets a linear gradient as the background image.
CSS – radial-gradient() Function
The radial-gradient() function sets a radial gradient as the background image.
CSS – repeating-linear-gradient Function
The repeating-linear-gradient() function is used to repeat linear gradients.
CSS – repeating-conic-gradient Function
The repeating-conic-gradient() function is used to repeat conic gradients.
CSS – rgb() Function
An RGB color value is specified with the rgb() function, which has the following syntax: rgb(red, green, blue).
CSS – repeating-radial-gradient Function
The repeating-radial-gradient() function is used to repeat radial gradients.
CSS – rgba() Function
An RGBA color value is specified with the rgba() function, which has the following syntax: rgba(red, green, blue, alpha).
CSS – var() Function
The var() function is used to create a CSS variable and insert the value into a property.
We’d like to acknowledge that we learned a great deal of our coding from W3Schools and TutorialsPoint, borrowing heavily from their teaching process and excellent code examples. We highly recommend both sites to deepen your experience, and further your coding journey. We’re just hitting the basics here at 1SMARTchicken.
Why 1SMARTchicken?
See More →
Thanks for your support!
CSS Books
All are affiliate links. Thank you for your support!
CSS NOTES:
- The “inherit”, “initial” and “unset” keywords can be used with any CSS property to set its value
- In CSS there are many ways to express a color value in a property
Feedback
If you see an error on the page or the code itself is incorrect or incomplete, or just plain wrong, please let us know. We’re always learning. NOTE: we do not sell your information and will not send you spam emails.