Skip to main content
CSS-Tricks
  • Articles
  • Notes
  • Links
  • Guides
  • Almanac
  • Shuffle
Search

Articles Tagged
functions

5 Articles
{
,

}
Direct link to the article CSS Functions and Mixins Module Notes
csswg functions mixins

CSS Functions and Mixins Module Notes

Most days, I’m writing vanilla CSS. Thanks to CSS variables and nesting, I have fewer reasons to reach for Sass or any other preprocessor. The times I reach for Sass tend to be when I need a @mixin to loop …

Avatar of Geoff Graham
Geoff Graham on Jul 31, 2024 (Updated on Aug 1, 2024)
Direct link to the article Calculate Viewport Size in CSS
custom properties functions viewport units

Calculate Viewport Size in CSS

A way to calculate the viewport’s width and height without JavaScript, by way of Temani Afif over at CSS Tip:

@property --_w {
  syntax: '<length';
  inherits: true;
  initial-value: 100vw; 
}
@property --_h {
  syntax: '<length';
  inherits: true;
  
…
Avatar of Geoff Graham
Geoff Graham on Jul 17, 2024
Direct link to the article Using Absolute Value, Sign, Rounding and Modulo in CSS Today
css variables custom properties functions houdini math

Using Absolute Value, Sign, Rounding and Modulo in CSS Today

For quite a while now, the CSS spec has included a lot of really useful mathematical functions, such as trigonometric functions (sin(), cos(), tan(), asin(), acos(), atan(), atan2()), exponential functions (…

Avatar of Ana Tudor
Ana Tudor on Jul 28, 2021
Direct link to the article A Complete Guide to CSS Functions
functions

A Complete Guide to CSS Functions

Like any other programming language, CSS has functions. They can be inserted where you’d place a value, or in some cases, accompanying another value declaration.
Avatar of Eric Bailey
Eric Bailey on May 4, 2020 (Updated on Oct 15, 2021)
Direct link to the article My New Favorite ES6 Toy: Destructured Objects as Parameters
destructuring es6 functions

My New Favorite ES6 Toy: Destructured Objects as Parameters

Like a lot of other developers, I’m working through my continued education learning what I can about ES6. One of the ways I’m doing this is to attend workshops by smart people. I went to Kyle Simpson’s ES6: The Good …

Avatar of Sarah Drasner
Sarah Drasner on Sep 6, 2016

CSS-Tricks is powered by DigitalOcean.

Keep up to date on web dev

with our hand-crafted newsletter

DigitalOcean
  • About DO
  • Cloudways
  • Legal stuff
  • Get free credit!
CSS-Tricks
  • Write for us!
  • Advertise with us
  • Contact us
Social
  • RSS Feeds
  • CodePen
  • Mastodon
  • X
Back to Top