Skip to content

Commit 2f046f5

Browse files
committed
feature: swap arrow on editor state
- remove the hardcoded content from the HTML template - add generated content leveraging the power of CSS content property in conjunction with the ::before pseudoselector and unicode values
1 parent 4efc9ed commit 2f046f5

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

index.html

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,18 @@
1212
border: 1px solid #ccc;
1313
padding: 5px;
1414
}
15+
16+
a {
17+
cursor: pointer;
18+
}
19+
20+
a::before {
21+
content: '\25B6';
22+
}
23+
24+
.editing a::before {
25+
content: '\25BC';
26+
}
1527
</style>
1628
</head>
1729
<body>

templates/editor_initializer.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<a ng-click="edit(row)">&#9654;</a>
1+
<a ng-click="edit(row)"></a>

0 commit comments

Comments
 (0)