Skip to content

Instantly share code, notes, and snippets.

@tomhodgins
Created June 18, 2020 00:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tomhodgins/425fd7c8a6699ba78d21e49849a27037 to your computer and use it in GitHub Desktop.
Save tomhodgins/425fd7c8a6699ba78d21e49849a27037 to your computer and use it in GitHub Desktop.
@--custom-functions {
--example: 'https://path/to/some/module.js';
--currency: num =>
Number(num).toLocaleString('en', {
style: 'currency',
currency: 'USD'
})
;
}
html {
background-color: --example(#fff);
}
html::before {
content: --currency(50);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment