inline button
HTML
<button class="button" style="border: solid 2px black; background: yellow;" onmouseover="handleButtonTransition(this, 'yellow', 'black')" onmouseout="handleButtonTransition(this, 'black', 'yellow')"> Some Long button text <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 38.93 30.26" style="stroke: black;" class="btn_arrow"><polyline vector-effect="non-scaling-stroke" class="btn_arrow_svg" points="23.16 29.55 37.52 15.13 23.16 0.7"></polyline>
<line vector-effect="non-scaling-stroke" class="btn_arrow_svg" x1="37.51" y1="15.13" y2="15.13"></line></svg></button>
<script>
function handleButtonTransition(_this, textColor, bgColor) {
_this.style.background = bgColor;
_this.style.border = 'solid 2px ' + textColor + ';';
_this.style.color = textColor;
_this.querySelectorAll('.btn_arrow').item(0).style['stroke'] = textColor;
}
</script>
CSS
.button {
height: 50px;
border-radius: 5px;
font-size: 18px;
-webkit-transition: all 3500ms cubic-bezier(0.39, 0.5, 0.15, 1.36);
transition: all 3500ms cubic-bezier(0.39, 0.5, 0.15, 1.36)
}
.btn_arrow_svg {
fill: none;
stroke-miterlimit: 0;
stroke-width: 2px;
}
.btn_arrow {
position: relative;
top: 0.15em;
display: inline-block;
height: 18px;
width: 18px;
margin-left: 4px;
}