I have encountered an issue with vertically centering a span using the font-style "Luckiest Guy".
https://i.sstatic.net/Lz8o3.png
I attempted to use
display: flex;align-items: center;
on the span
, but it did not work.
App.vue
<template>
<div id="app">
<span>Luckiest Guy Font</span>
</div>
</template>
<script>
export default {
name: "App",
};
</script>
<style lang="scss">
@import url("https://fonts.googleapis.com/css2?family=Luckiest+Guy&display=swap");
#app {
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
color: #2c3e50;
background-color: grey;
margin-top: 60px;
span {
font-family: "Luckiest Guy", Helvetica, Arial, sans-serif;
font-size: 19px;
line-height: 19px;
display: flex;
align-items: center;
}
}
</style>
CodeSandbox:
https://codesandbox.io/s/cool-browser-lh9f8?file=/src/App.vue:441-453