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-left: -20px;
margin-top: -1px; margin-top: -1px;
} }
.regexp-report-note {
color: #999;
position: absolute;
margin: 0 0.5rem 0 0;
hyphens: auto;
}
/************ help popup ************/ /************ help popup ************/
#help-popup { #help-popup {
top: 3rem; top: 3rem;

View File

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