Skip to content

Instantly share code, notes, and snippets.

@glaucia86
Created May 27, 2019 01:19
Show Gist options
  • Save glaucia86/a94e7302b69723b76dd894ec32edbb70 to your computer and use it in GitHub Desktop.
Save glaucia86/a94e7302b69723b76dd894ec32edbb70 to your computer and use it in GitHub Desktop.
<template>
<div class="calculadora">
<div class="display">0</div>
<div >C</div>
<div >+/-</div>
<div >%</div>
<div>÷</div>
<div>7</div>
<div>8</div>
<div>9</div>
<div>x</div>
<div>4</div>
<div>5</div>
<div>6</div>
<div>-</div>
<div>1</div>
<div>2</div>
<div>3</div>
<div>+</div>
<div class="zero">0</div>
<div>.</div>
<div>=</div>
</div>
</template>
<script>
export default {
};
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
.calculadora {
font-size: 40px;
display: grid;
grid-template-columns: repeat(4, 1fr);
grid-auto-rows: minmax(50px, auto);
}
.display {
grid-column: 1 / 5;
background-color: #333;
color: white;
}
.zero {
grid-column: 1 / 3;
}
</style>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment