Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Custom Functions are poorly documented #1736

Open
layton-glympse opened this issue Sep 28, 2016 · 3 comments
Open

Custom Functions are poorly documented #1736

layton-glympse opened this issue Sep 28, 2016 · 3 comments

Comments

@layton-glympse
Copy link

Documentation around the custom functions experimental feature is poor. It says they are available, and even shows how to make a call to renderSync(), but it doesn't explain how those functions are surfaced from within SASS.
Unless I'm misunderstanding how this works, the documentation does say:

...a collection of custom functions that may be invoked by the sass files being compiled...

The syntax around setting up these functions is confusing, as it seems to be defined with a stringified function call followed by a "similar" function signature. But there is no real explanation around what these things mean, or any explanation of how to call said custom function from within sass.

Reading the source code to figure it out makes the Readme moot. I would appreciate a better explanation and an update of the readme, if possible.

Thanks!

@emanuel-macoun
Copy link

After almost one year, custom function are still marked as experimental feature. Is this still issue? Or are there any plans to bring this feature into stable version?

@saper
Copy link
Member

saper commented Jun 12, 2017

node-sass does not have "stable versions" right now. The issue with custom importers and custom functions that there are still issues that are hard to resolve (like #857) and might need a major change to how things work (if possible at all). There is also an undecided issue how to deal with sass types further (#1088, #1320) and other issues (#911).

Experimental means that the way those things are defined and used can be changed dramatically. For example, sass_types might be gone or completely replaced.

@emanuel-macoun
Copy link

Hi Saper, thanks for explanation. For now, the custom function feature works well for me, I don't mind using sass types for now, but I'll obviously welcome native types support.

jiongle1 pushed a commit to scantist-ossops-m2/node-sass that referenced this issue Apr 7, 2024
Defer creation of hash maps into eval stage
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants