Skip to content

Commit

Permalink
fixing minor issues...
Browse files Browse the repository at this point in the history
  • Loading branch information
Ankit-Matth authored Jan 1, 2024
1 parent 5d21742 commit 5745f41
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ let moreBtns = document.getElementById('moreBtns')
let ansDisplay = document.getElementById('ansDisplay')

function checkOverflow() {
if (ansDisplay.value.length > 16) {
ansDisplay.style.fontSize="1.2rem"
if (ansDisplay.value.length <= 16) {
ansDisplay.style.fontSize = "1.6rem";
} else if (16 < ansDisplay.value.length && ansDisplay.value.length <= 22) {
ansDisplay.style.fontSize = "1.2rem";
} else if (22 < ansDisplay.value.length && ansDisplay.value.length <= 33) {
ansDisplay.style.fontSize = "0.8rem";
} else {
ansDisplay.style.fontSize = "0.6rem";
}
if (ansDisplay.value.length > 22) {
ansDisplay.style.fontSize="0.8rem"
}
if (ansDisplay.value.length > 33) {
ansDisplay.style.fontSize="0.6rem"
}
}

moreBtns.addEventListener('click', () => {
Expand Down

0 comments on commit 5745f41

Please sign in to comment.