dim regexp-tester note and avoid extending the report width

This commit is contained in:
tophf 2017-12-05 21:55:01 +03:00
parent 61003b378c
commit 44ce51e54f
2 changed files with 13 additions and 5 deletions

View File

@ -404,6 +404,12 @@ html:not(.usercss) .applies-to li:last-child .add-applies-to {
margin-left: -20px;
margin-top: -1px;
}
.regexp-report-note {
color: #999;
position: absolute;
margin: 0 0.5rem 0 0;
hyphens: auto;
}
/************ help popup ************/
#help-popup {
top: 3rem;

View File

@ -160,13 +160,15 @@ var regExpTester = (() => {
}
}
}
report.appendChild(
$create('p.regexp-report-note',
t('styleRegexpTestNote')
.split(/(\\+)/)
.map(s => (s.startsWith('\\') ? $create('code', s) : s))));
showHelp(t('styleRegexpTestTitle'), report);
const note = $create('p.regexp-report-note',
t('styleRegexpTestNote')
.split(/(\\+)/)
.map(s => (s.startsWith('\\') ? $create('code', s) : s)));
report.appendChild(note);
report.style.paddingBottom = note.offsetHeight + 'px';
report.onclick = event => {
const target = event.target.closest('a, .regexp-report div');
if (target) {