diff --git a/index.css b/index.css new file mode 100644 index 0000000..9fe3953 --- /dev/null +++ b/index.css @@ -0,0 +1,174 @@ +html{ + background: hsl(185, 41%, 84%); + font-family: 'Space Mono', monospace; +} + +.container{ + display: flex; + justify-content: space-between; + flex-direction: row; + background: white; + border-radius: 20px; + padding: 30px; + width: 700px; + margin: 0 auto; + margin-top: 10%; + box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.1); + color: hsl(186, 14%, 43%); + margin-bottom: 10%; + font-weight: 700; + +} + + + .input-container p { + font-size: 16px; + text-align: left; + font-weight: bold; + } + + + + .dollar-icon { + position: absolute; + left: 26.5%; /* Adjust based on your design */ + top: 36.6%; + transform: translateY(-50%); + pointer-events: none; /* Prevent interaction with the symbol */ + color: #aaa; /* Adjust color to match your design */ + } + + .person-icon { + position: absolute; + left: 26.5%; /* Adjust based on your design */ + top: 75.7%; + transform: translateY(-50%); + pointer-events: none; /* Prevent interaction with the symbol */ + color: #aaa; /* Adjust color to match your design */ + } + + +input { + font-family: 'Space-Mono' ,monospace; + font-weight: bold; + font-display: right; + color: hsl(183, 100%, 15%); + direction: rtl; /* Right to left */ + width: 100%; + padding: 10px 10px 10px 30px; /* Padding to leave space for the dollar sign */ + font-size: 21px; + border: none; + border-radius: 10px; + box-sizing: border-box; + background-color: hsl(189, 41%, 97%); + } + +input::placeholder { + color: hsl(186, 14%, 43%); + } + + + .selection-container { + text-align: center; + max-width: 300px; + } + + .selection-container p { + font-size: 16px; + text-align: left; + margin-bottom: 10px; + font-weight: bold; + } + + .tip-buttons { + display: grid; + grid-template-columns: repeat(3, 1fr); /* 3 columns */ + gap: 10px; /* Space between items */ + } + + .tipButton, .customTip { + font-family: 'Space Mono', monospace; + font-weight: bold; + padding: 10px; + font-size: 20px; + border: 1px solid #ccc; + border-radius: 5px; + text-align: center; + box-sizing: border-box; + cursor: pointer; + } + + .tipButton { + background-color: hsl(183, 100%, 15%); + color: white; + transition: background-color 0.3s; + } + + .tipButton:hover { + background-color: hsl(172, 67%, 45%); + color: hsl(183, 100%, 15%); + } + + .customTip { + background-color: hsl(189, 41%, 97%); + font-size: 16px; + width: 100%; + border: 1px solid #ccc; + } + + .tip-amount { + display: flex; + justify-content: space-between; + + padding: 20px; + background-color: hsl(183, 100%, 15%); + color: white; + } + + .total-amount{ + display: flex; + justify-content: space-between; + padding: 20px; + background-color: hsl(183, 100%, 15%); + color: white; + } + output { + margin-top: 20px; + font-size: 30px; + font-weight: bold; + color: hsl(172, 67%, 45%); + } + + + .output-container { + margin-top: 5px; + padding: 20px; + width: 45%; + background-color: hsl(183, 100%, 15%); + border-radius: 10px; + color: white; + } + + .tip-amount-value{ + margin-top: 0; + font-size: 10px; + +} + +.total-amount-value{ + margin-top: 0; + font-size: 10px; +} + +.reset-button{ + margin-top: 50px; + width: 100%; + padding: 10px; + font-size: 15px; + border-radius: 10px; + border: none; + text-align: center; + cursor: pointer; + background-color: hsl(172, 67%, 45%); + color: hsl(183, 100%, 15%); +} diff --git a/index.html b/index.html index 5c09e8d..1c257d4 100644 --- a/index.html +++ b/index.html @@ -5,35 +5,67 @@ + + + + + - Frontend Mentor | Tip calculator app + Tip calculator app - - - Bill +
+
+
+

Bill

+ Dollar Icon + +
+ + +
+

Select Tip %

+
+ + + + + + +
+
+ +
+

Number of People

+ Dollar Icon + +
+
+ + +
- Select Tip % - 5% - 10% - 15% - 25% - 50% - Custom +
+
+

Tip Amount

+

/ person

+
+ $0.0 +
- Number of People +
+
+

Total

+

/ person

+
+ $0.0 +
- Tip Amount - / person + +
- Total - / person - Reset \ No newline at end of file diff --git a/index.js b/index.js new file mode 100644 index 0000000..e69de29