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
f361b86f
Commit
f361b86f
authored
May 28, 2012
by
Aaron Leung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleaning up the new selector expander & emitter. All tests pass again.
parent
467c22e3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
+5
-5
document.cpp
document.cpp
+1
-1
node.hpp
node.hpp
+1
-1
node_emitters.cpp
node_emitters.cpp
+3
-3
No files found.
document.cpp
View file @
f361b86f
...
...
@@ -108,7 +108,7 @@ namespace Sass {
root
.
echo
(
output
);
break
;
case
nested
:
root
.
emit_nested_css
(
output
,
0
);
root
.
emit_nested_css
(
output
,
0
,
true
);
break
;
case
expanded
:
root
.
emit_expanded_css
(
output
,
""
);
...
...
node.hpp
View file @
f361b86f
...
...
@@ -199,7 +199,7 @@ namespace Sass {
bool
operator
>=
(
Node
rhs
)
const
;
string
to_string
()
const
;
void
emit_nested_css
(
stringstream
&
buf
,
size_t
depth
);
void
emit_nested_css
(
stringstream
&
buf
,
size_t
depth
,
bool
at_toplevel
=
false
);
void
emit_propset
(
stringstream
&
buf
,
size_t
depth
,
const
string
&
prefix
);
void
echo
(
stringstream
&
buf
,
size_t
depth
=
0
);
void
emit_expanded_css
(
stringstream
&
buf
,
const
string
&
prefix
);
...
...
node_emitters.cpp
View file @
f361b86f
...
...
@@ -295,14 +295,14 @@ namespace Sass {
}
}
void
Node
::
emit_nested_css
(
stringstream
&
buf
,
size_t
depth
)
void
Node
::
emit_nested_css
(
stringstream
&
buf
,
size_t
depth
,
bool
at_toplevel
)
{
switch
(
type
())
{
case
root
:
if
(
has_expansions
())
flatten
();
for
(
size_t
i
=
0
,
S
=
size
();
i
<
S
;
++
i
)
{
at
(
i
).
emit_nested_css
(
buf
,
depth
);
at
(
i
).
emit_nested_css
(
buf
,
depth
,
true
);
}
break
;
...
...
@@ -332,7 +332,7 @@ namespace Sass {
}
}
if
(
block
.
has_statements
())
--
depth
;
// see previous comment
if
(
depth
==
0
)
buf
<<
endl
;
if
(
(
depth
==
0
)
&&
at_toplevel
)
buf
<<
endl
;
}
break
;
case
propset
:
{
...
...
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