Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
node-sass
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
楚学文
node-sass
Commits
d935b77e
Commit
d935b77e
authored
Sep 09, 2012
by
Aaron Leung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Slightly nicer formatting for the section comments.
parent
d81158dd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
0 deletions
+19
-0
functions.cpp
functions.cpp
+19
-0
No files found.
functions.cpp
View file @
d935b77e
...
...
@@ -66,7 +66,9 @@ namespace Sass {
throw
Error
(
Error
::
evaluation
,
path
,
line
,
message
);
}
////////////////////////////////////////////////////////////////////////
// RGB Functions ///////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
extern
Signature
rgb_sig
=
"rgb($red, $green, $blue)"
;
Node
rgb
(
const
Node
parameter_names
,
Environment
&
bindings
,
Node_Factory
&
new_Node
,
string
&
path
,
size_t
line
)
{
...
...
@@ -168,7 +170,9 @@ namespace Sass {
return
mixed
;
}
////////////////////////////////////////////////////////////////////////
// HSL Functions ///////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
// RGB to HSL helper function so we can do hsl operations.
// (taken from http://www.easyrgb.com)
...
...
@@ -450,7 +454,9 @@ namespace Sass {
orig
[
3
].
numeric_value
());
}
////////////////////////////////////////////////////////////////////////
// Opacity Functions ///////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
extern
Signature
alpha_sig
=
"alpha($color)"
;
Node
alpha
(
const
Node
parameter_names
,
Environment
&
bindings
,
Node_Factory
&
new_Node
,
string
&
path
,
size_t
line
)
{
...
...
@@ -534,7 +540,9 @@ namespace Sass {
alpha
);
}
////////////////////////////////////////////////////////////////////////
// Other Color Functions ///////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
extern
Signature
adjust_color_sig
=
"adjust-color($color, $red: false, $green: false, $blue: false, $hue: false, $saturation: false, $lightness: false, $alpha: false)"
;
Node
adjust_color
(
const
Node
parameter_names
,
Environment
&
bindings
,
Node_Factory
&
new_Node
,
string
&
path
,
size_t
line
)
{
...
...
@@ -658,7 +666,9 @@ namespace Sass {
return
Node
();
}
////////////////////////////////////////////////////////////////////////
// String Functions ////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
extern
Signature
unquote_sig
=
"unquote($string)"
;
Node
unquote
(
const
Node
parameter_names
,
Environment
&
bindings
,
Node_Factory
&
new_Node
,
string
&
path
,
size_t
line
)
{
...
...
@@ -694,7 +704,9 @@ namespace Sass {
return
orig
;
}
////////////////////////////////////////////////////////////////////////
// Number Functions ////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
extern
Signature
percentage_sig
=
"percentage($value)"
;
Node
percentage
(
const
Node
parameter_names
,
Environment
&
bindings
,
Node_Factory
&
new_Node
,
string
&
path
,
size_t
line
)
{
...
...
@@ -821,7 +833,9 @@ namespace Sass {
return
Node
();
}
////////////////////////////////////////////////////////////////////////
// List Functions //////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
extern
Signature
length_sig
=
"length($list)"
;
Node
length
(
const
Node
parameter_names
,
Environment
&
bindings
,
Node_Factory
&
new_Node
,
string
&
path
,
size_t
line
)
{
...
...
@@ -960,7 +974,9 @@ namespace Sass {
return
new_list
.
size
()
?
new_list
:
new_Node
(
Node
::
nil
,
path
,
line
,
0
);
}
////////////////////////////////////////////////////////////////////////
// Introspection Functions /////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
extern
Signature
type_of_sig
=
"type-of($value)"
;
Node
type_of
(
const
Node
parameter_names
,
Environment
&
bindings
,
Node_Factory
&
new_Node
,
string
&
path
,
size_t
line
)
{
...
...
@@ -1074,7 +1090,10 @@ namespace Sass {
return
new_Node
(
Node
::
boolean
,
path
,
line
,
false
);
}
////////////////////////////////////////////////////////////////////////
// Boolean Functions ///////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
extern
Signature
not_sig
=
"not($value)"
;
Node
not_impl
(
const
Node
parameter_names
,
Environment
&
bindings
,
Node_Factory
&
new_Node
,
string
&
path
,
size_t
line
)
{
Node
val
(
bindings
[
parameter_names
[
0
].
token
()]);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment