Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
experience_builder-3454437
Manage
Activity
Members
Labels
Plan
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Issue forks
experience_builder-3454437
Commits
5f6d2f5c
Commit
5f6d2f5c
authored
9 months ago
by
Harumi Jang
Browse files
Options
Downloads
Patches
Plain Diff
Better naming for print statements
parent
625afaa2
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ui/builderapp/src/App.css
+5
-0
5 additions, 0 deletions
ui/builderapp/src/App.css
ui/builderapp/src/components/StylePanel.jsx
+10
-10
10 additions, 10 deletions
ui/builderapp/src/components/StylePanel.jsx
with
15 additions
and
10 deletions
ui/builderapp/src/App.css
+
5
−
0
View file @
5f6d2f5c
...
...
@@ -52,3 +52,8 @@ sup {
.cm-theme-light
{
width
:
50%
;
}
.test-button
{
margin-top
:
20px
;
display
:
flex
;
}
This diff is collapsed.
Click to expand it.
ui/builderapp/src/components/StylePanel.jsx
+
10
−
10
View file @
5f6d2f5c
...
...
@@ -45,7 +45,7 @@ export default function StylePanel(props) {
visit
:
'
Atrule
'
,
enter
:
(
node
)
=>
{
if
(
node
.
name
===
'
media
'
)
{
console
.
log
(
'
T
EST PARSING @MEDIA
'
,
csstree
.
generate
(
node
));
console
.
log
(
'
T
est for @media:
'
,
csstree
.
generate
(
node
));
}
},
});
...
...
@@ -55,7 +55,7 @@ export default function StylePanel(props) {
visit
:
'
Rule
'
,
enter
:
(
node
)
=>
{
if
(
csstree
.
generate
(
node
.
prelude
)
===
'
.card h2
'
)
{
console
.
log
(
'
T
EST PARSING NESTED
'
,
csstree
.
generate
(
node
));
console
.
log
(
'
T
est for nested:
'
,
csstree
.
generate
(
node
));
}
},
});
...
...
@@ -68,7 +68,7 @@ export default function StylePanel(props) {
if
(
selector
.
includes
(
'
:hover
'
)
&&
node
.
block
.
children
.
some
(
child
=>
child
.
property
===
'
color
'
))
{
node
.
block
.
children
.
forEach
(
child
=>
{
if
(
child
.
property
===
'
color
'
)
{
console
.
log
(
'
T
EST PARSING :HOVER
'
,
csstree
.
generate
(
child
.
value
));
// This will print 'yellow'
console
.
log
(
'
T
est :hover:
'
,
csstree
.
generate
(
child
.
value
));
// This will print 'yellow'
}
});
}
...
...
@@ -82,7 +82,7 @@ export default function StylePanel(props) {
const
selector
=
csstree
.
generate
(
node
.
prelude
);
if
(
selector
.
includes
(
'
::before
'
))
{
node
.
block
.
children
.
forEach
(
child
=>
{
console
.
log
(
'
T
EST PARSING
::before
'
,
csstree
.
generate
(
child
.
value
));
console
.
log
(
'
T
est
::before
:
'
,
csstree
.
generate
(
child
.
value
));
});
}
},
...
...
@@ -93,7 +93,7 @@ export default function StylePanel(props) {
visit
:
'
Declaration
'
,
enter
:
(
node
)
=>
{
if
(
node
.
property
===
'
animation
'
||
node
.
property
===
'
animation-name
'
)
{
console
.
log
(
'
Animation Declar
ation:
'
,
csstree
.
generate
(
node
));
console
.
log
(
'
Test anim
ation:
'
,
csstree
.
generate
(
node
));
}
},
});
...
...
@@ -106,7 +106,7 @@ export default function StylePanel(props) {
csstree
.
walk
(
node
,
{
visit
:
'
Declaration
'
,
enter
:
(
keyframeNode
)
=>
{
console
.
log
(
'
K
eyframe:
'
,
csstree
.
generate
(
keyframeNode
));
console
.
log
(
'
Test k
eyframe
s
:
'
,
csstree
.
generate
(
keyframeNode
));
},
});
}
...
...
@@ -118,13 +118,13 @@ export default function StylePanel(props) {
return
(
<
div
className
=
"style-panel"
>
{
/*<div>{style}</div>*/
}
<
h2
>
Style panel (UI)
</
h2
>
<
button
onClick
=
{
testComplexCSSParsing
}
>
Test button for parsing complex css
</
button
>
<
label
htmlFor
=
"myInput"
>
Margin left:
<
input
id
=
"myInput"
type
=
"text"
value
=
{
marginLeft
}
onChange
=
{
(
e
)
=>
onChangeHandler
(
e
)
}
/>
<
input
id
=
"myInput"
type
=
"text"
value
=
{
marginLeft
}
onChange
=
{
(
e
)
=>
onChangeHandler
(
e
)
}
/>
</
label
>
<
button
className
=
"test-button"
onClick
=
{
testComplexCSSParsing
}
>
Click to print parsed results from css
</
button
>
</
div
>
);
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment