<header></header>
<main>
<div class="summary">
- <h1>Temperature Converter</h1>
- <p>This web application allows users to convert temperatures between various units, including Celsius, Fahrenheit, and Kelvin. It provides a straightforward interface for quick and accurate conversions.</p>
+ <h1 class="app-title">Temperature Converter</h1>
+ <p class="app-description">This web application allows users to convert temperatures between various units, including Celsius, Fahrenheit, and Kelvin. It provides a straightforward interface for quick and accurate conversions.</p>
</div>
<div class="converter-ctn">
- <div class="">Convert <span id="convertFromTxt"></span> to <span id="convertToTxt"></span></div>
+ <div class="convert-fr-to-txt">Convert <span id="convertFromTxt"></span> to <span id="convertToTxt"></span></div>
<div class="convertion-wrapper">
<div class="selection-wrapper">
<select name="tempUnitFrom" id="tempUnitFrom">
const to = tempUnitTo.value;
if (!parsedInt || isNaN(parsedInt)) {
- result.innerHTML = updateOutputTxt(from, to, convert(parsedInt, from, to));
- return;
+ return result.innerHTML = updateOutputTxt(0, 0, convert(parsedInt, 0, 0));
} else {
document.getElementById("result").innerHTML = updateOutputTxt(from, to, convert(parsedInt, from, to));
}
:root {
+ --mobile-txt-sml: 2rem;
+ --mobile-txt-mdm: 3rem;
+ --mobile-txt-lrg: 4rem;
+ --box-shadow: 0rem 0.2rem 0.8rem #00000025;
--button: #0031a2;
}
*,
padding: 0;
}
html {
- /* font-size: 62.5%; */
+ font-size: 62.5%;
}
main {
width: 90%;
margin: 0 auto;
}
+.app-title {
+ font-size: var(--mobile-txt-lrg);
+}
+.app-description {
+ font-size: var(--mobile-txt-sml);
+}
.converter-ctn {
- box-shadow: 0rem 0.2rem 0.8rem #00000025;
- padding: 1rem 2rem;
+ box-shadow: var(--box-shadow);
+ padding: 2rem;
margin-top: 1.4rem;
}
+.convert-fr-to-txt {
+ font-size: var(--mobile-txt-sml);
+}
.convertion-wrapper {
white-space: nowrap;
}
margin-top: 0.4rem;
}
select {
+ font-size: var(--mobile-txt-sml);
+ padding: 1rem;
width: 50%;
+ background-color: lightblue;
+ border: 0.1rem solid black;
+ border-radius: 0.2rem;
+ box-shadow: var(--box-shadow);
}
input {
+ font-size: var(--mobile-txt-sml);
+ padding: 1rem;
margin-top: 0.4rem;
width: 100%;
+ box-shadow: var(--box-shadow);
}
#result {
+ font-size: var(--mobile-txt-mdm);
text-align: center;
- padding: 1rem;
+ padding: 2rem;
}
@media only screen and (min-width: 1240px) {