Don’t have copy API key button jump around

It’s annoying that this button moves after you click on it. It’s
happening because the API key is wrapping onto multiple lines.

This commit fixes the height of the container so that it doesn’t reflow
when it has less content in it.

Uses a bit of flexbox to vertically centre the text.
This commit is contained in:
Chris Hill-Scott
2018-10-30 13:03:44 +00:00
parent f6ff070f80
commit b727a50c13
2 changed files with 16 additions and 1 deletions

View File

@@ -34,6 +34,8 @@
thing = $component.data('thing');
$component
.addClass('api-key')
.css('min-height', $component.height())
.html(states.keyVisible(key, thing))
.attr('aria-live', 'polite')
.on(