Skip to content

Commit 3ce4846

Browse files
committed
add generic support for icon badge (uBlockOrigin/uMatrix-issues#68)
1 parent ec7accc commit 3ce4846

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

src/css/common.css

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,15 @@
4949
stroke: #fff;
5050
pointer-events: none;
5151
}
52+
.fa-icon > .badge {
53+
font-family: sans-serif;
54+
font-size: 80%;
55+
pointer-events: none;
56+
transform: translate(100%, 110%);
57+
}
58+
.fa-icon.disabled > .badge {
59+
display: none;
60+
}
5261

5362
body {
5463
font-size: 14px;

src/css/logger-ui.css

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -255,14 +255,6 @@ body.compactView #content tr:not(.vExpanded) td {
255255
justify-content: space-around;
256256
margin-left: 0.5em;
257257
}
258-
.ruleEditorToolbar .fa-icon > .badge {
259-
font-family: sans-serif;
260-
font-size: 80%;
261-
pointer-events: none;
262-
}
263-
.ruleEditorToolbar .fa-icon.disabled > .badge {
264-
display: none;
265-
}
266258

267259
.fa-icon.scopeRel {
268260
fill: #24c;

src/logger-ui.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
<div class="ruleWidgets"></div>
5757
<div class="ruleEditorToolbar">
5858
<svg id="matrixRevertButton" class="fa-icon scopeRel" tip-anchor-right data-i18n-tip="matrixRevertButtonTip"><use xlink:href="/img/fontawesome/fontawesome-defs.svg#fa-icon_eraser"></use></svg>
59-
<svg id="matrixPersistButton" class="fa-icon scopeRel" tip-anchor-right data-i18n-tip="matrixPersistButtonTip"><use xlink:href="/img/fontawesome/fontawesome-defs.svg#fa-icon_lock"></use><text class="badge" x="100%" y="100%"></text></svg>
59+
<svg id="matrixPersistButton" class="fa-icon scopeRel" tip-anchor-right data-i18n-tip="matrixPersistButtonTip"><use xlink:href="/img/fontawesome/fontawesome-defs.svg#fa-icon_lock"></use><text class="badge"></text></svg>
6060
</section>
6161
</section>
6262
</div>

0 commit comments

Comments
 (0)