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
664c020b
Commit
664c020b
authored
Apr 05, 2012
by
Aaron Leung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implemented "alpha" and "opacity".
parent
b0693709
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
0 deletions
+18
-0
context.cpp
context.cpp
+3
-0
functions.cpp
functions.cpp
+10
-0
functions.hpp
functions.hpp
+5
-0
No files found.
context.cpp
View file @
664c020b
...
@@ -41,6 +41,9 @@ namespace Sass {
...
@@ -41,6 +41,9 @@ namespace Sass {
register_function
(
mix_3_descriptor
,
mix_3
);
register_function
(
mix_3_descriptor
,
mix_3
);
// HSL Functions
// HSL Functions
register_function
(
invert_descriptor
,
invert
);
register_function
(
invert_descriptor
,
invert
);
// Opacity Functions
register_function
(
alpha_descriptor
,
alpha
);
register_function
(
opacity_descriptor
,
alpha
);
// String Functions
// String Functions
register_function
(
unquote_descriptor
,
unquote
);
register_function
(
unquote_descriptor
,
unquote
);
register_function
(
quote_descriptor
,
quote
);
register_function
(
quote_descriptor
,
quote
);
...
...
functions.cpp
View file @
664c020b
...
@@ -101,6 +101,16 @@ namespace Sass {
...
@@ -101,6 +101,16 @@ namespace Sass {
255
-
orig
[
2
].
content
.
numeric_value
,
255
-
orig
[
2
].
content
.
numeric_value
,
orig
[
3
].
content
.
numeric_value
);
orig
[
3
].
content
.
numeric_value
);
}
}
// Opacity Functions ///////////////////////////////////////////////////
Function_Descriptor
alpha_descriptor
=
{
"alpha"
,
"$color"
,
0
};
Function_Descriptor
opacity_descriptor
=
{
"opacity"
,
"$color"
,
0
};
Node
alpha
(
const
vector
<
Token
>&
parameters
,
map
<
Token
,
Node
>&
bindings
)
{
return
bindings
[
parameters
[
0
]][
3
];
}
// String Functions ////////////////////////////////////////////////////
// String Functions ////////////////////////////////////////////////////
...
...
functions.hpp
View file @
664c020b
...
@@ -72,6 +72,11 @@ namespace Sass {
...
@@ -72,6 +72,11 @@ namespace Sass {
extern
Function_Descriptor
invert_descriptor
;
extern
Function_Descriptor
invert_descriptor
;
Node
invert
(
const
vector
<
Token
>&
parameters
,
map
<
Token
,
Node
>&
bindings
);
Node
invert
(
const
vector
<
Token
>&
parameters
,
map
<
Token
,
Node
>&
bindings
);
// Opacity Functions ///////////////////////////////////////////////////
extern
Function_Descriptor
alpha_descriptor
;
extern
Function_Descriptor
opacity_descriptor
;
Node
alpha
(
const
vector
<
Token
>&
parameters
,
map
<
Token
,
Node
>&
bindings
);
// String Functions ////////////////////////////////////////////////////
// String Functions ////////////////////////////////////////////////////
extern
Function_Descriptor
unquote_descriptor
;
extern
Function_Descriptor
unquote_descriptor
;
Node
unquote
(
const
vector
<
Token
>&
parameters
,
map
<
Token
,
Node
>&
bindings
);
Node
unquote
(
const
vector
<
Token
>&
parameters
,
map
<
Token
,
Node
>&
bindings
);
...
...
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