Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions tip-caculator/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Tip Calculator

### This small tool will calculate your tip and total ammount per person

![Web terminal](./images/main.png)
![Web terminal](./images/main2.png)

##### Created by - Ihtisham
379 changes: 379 additions & 0 deletions tip-caculator/css/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,379 @@
html,
body,
div,
span,
applet,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
acronym,
address,
big,
cite,
code,
del,
dfn,
em,
img,
ins,
kbd,
q,
s,
samp,
small,
strike,
strong,
sub,
sup,
tt,
var,
b,
u,
i,
center,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td,
article,
aside,
canvas,
details,
embed,
figure,
figcaption,
footer,
header,
hgroup,
menu,
nav,
output,
ruby,
section,
summary,
time,
mark,
audio,
video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}


/* HTML5 display-role reset for older browsers */

article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
menu,
nav,
section {
display: block;
}

body {
line-height: 1;
}

ol,
ul {
list-style: none;
}

blockquote,
q {
quotes: none;
}

blockquote:before,
blockquote:after,
q:before,
q:after {
content: '';
content: none;
}

table {
border-collapse: collapse;
border-spacing: 0;
}


/* custom css */


/* Chrome, Safari, Edge, Opera */

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
-webkit-appearance: none;
margin: 0;
}


/* Firefox */

input[type=number] {
-moz-appearance: textfield;
}

html {
box-sizing: border-box;
}

*,
*:before,
*:after {
box-sizing: inherit;
}

body {
background-color: hsl(185, 41%, 84%);
font-family: 'Space Mono', monospace;
}

.app-title {
padding: 60px;
text-align: center;
font-weight: 700;
font-size: 24px;
color: hsl(185, 39%, 32%);
}

.bill-container {
border-radius: 25px 25px 0 0;
background-color: hsl(0, 0%, 100%);
padding: 50px 30px;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}

.input-group {
width: 100%;
margin-bottom: 30px;
}

label,
input {
display: block;
width: 100%;
}

label {
font-size: 18px;
color: hsl(183, 100%, 15%);
margin-bottom: 10px;
}

input {
border: none;
outline: none;
background-color: hsl(185, 41%, 84%);
height: 48px;
font-family: 'Space Mono', monospace;
font-weight: 800;
color: hsl(183, 100%, 15%);
font-size: 26px;
border-radius: 4px;
padding: 14px;
text-align: right;
padding-left: 30px;
}

::placeholder {
/* Chrome, Firefox, Opera, Safari 10.1+ */
color: hsla(183, 100%, 15%, 0.321);
opacity: 1;
/* Firefox */
}

#bill {
background-image: url("/images/icon-dollar.svg");
background-repeat: no-repeat;
background-position: 10px 1rem;
}

#peolpe {
background-image: url("/images/icon-person.svg");
background-repeat: no-repeat;
background-position: 10px 1rem;
}

.tip-button-group {
display: grid;
grid-template-columns: 1fr 1fr;
grid-column-gap: 6px;
}

.tip-button:not(:last-child) {
background-color: hsl(183, 100%, 15%);
color: hsl(0, 0%, 100%);
text-align: center;
padding: 14px;
border-radius: 5px;
margin-bottom: 10px;
font-weight: 800;
font-size: 20px;
}

.tip-button.active:not(:last-child) {
background-color: rgb(0, 185, 185);
color: hsl(183, 100%, 15%);
}

.tip-button:last-child {
color: hsl(183, 100%, 15%);
padding-left: 0;
}

.tip-button:nth-last-child(-n+2) {
margin-bottom: 0;
}

.tip-button:not(:last-child):hover {
color: hsl(183, 100%, 15%);
background-color: rgb(1, 202, 202);
cursor: pointer;
}

.result-card {
background-color: hsl(183, 100%, 15%);
width: 100%;
padding: 16px;
color: white;
height: 100%;
border-radius: 8px;
display: flex;
flex-direction: column;
justify-content: space-between;
}

.reset-button {
background-color: rgb(1, 202, 202);
font-size: 18px;
padding: 14px;
text-align: center;
color: hsl(183, 100%, 15%);
font-weight: 800;
border-radius: 5px;
margin-top: 28px;
}

.reset-button:hover {
background-color: rgb(0, 185, 185);
cursor: pointer;
}

.amount-row {
margin: 24px 0;
display: flex;
align-items: center;
justify-content: space-between;
}

.amount-info,
.amount-bill {
display: inline-block;
}

.amount-title {
font-weight: 500;
margin-bottom: 8px;
color: hsl(0, 0%, 100%);
}

.amount-for {
font-size: 12px;
color: hsl(185, 41%, 84%);
}

.amount-bill {
float: right;
font-weight: 800;
font-size: 30px;
color: rgb(1, 202, 202);
}

@media screen and (min-width: 375px) {
.tip-button-group {
grid-template-columns: 1fr 1fr 1fr;
}
.tip-button:nth-last-child(-n+3) {
margin-bottom: 0;
}
}

@media screen and (min-width: 660px) {
.bill-container {
display: grid;
grid-template-columns: 1fr 1fr;
grid-column-gap: 6px;
}
.input-group:last-child {
margin-bottom: 0px;
}
}

@media screen and (min-width: 900px) {
.bill-container {
border-radius: 10px;
margin: 2em 12em;
}
}


/* test colors */


/* .reset-button {
background-color: hsl(183, 100%, 15%);
background-color: hsl(186, 14%, 43%);
background-color: hsl(184, 14%, 56%);
background-color: hsl(185, 41%, 84%);
background-color: hsl(189, 41%, 97%);
background-color: hsl(0, 0%, 100%);
} */

.attribution {
font-size: 11px;
text-align: center;
}

.attribution a {
color: hsl(228, 45%, 44%);
}
Binary file added tip-caculator/images/favicon-32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions tip-caculator/images/icon-dollar.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions tip-caculator/images/icon-person.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions tip-caculator/images/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tip-caculator/images/main.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tip-caculator/images/main2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading