An advanced exploration of CSS @function evaluation scope — how custom CSS functions inherit variables from wherever they're called, not where they're defined. Covers portable evaluation scope patterns for building encapsulated CSS libraries, including partial application, function overloading via documentation tricks, and exposing user-extensible switch-board APIs. Real-world examples from the doubledash.css library demonstrate bitwise operations and CSS loops built entirely with these patterns.

12m read timeFrom master.dev
Post cover image
Table of contents
The Variable Scope of Custom CSS FunctionsYou can Decouple Evaluation Scope from the DOM Entirely!Portable Evaluation Scope as a featureActually Overloading SignaturesThe End
10.3K Impressions1 Comment