Merge pull request #4 from dannymcgee/master

Misc styling changes
This commit is contained in:
Kognise 2019-04-05 14:17:16 -04:00 committed by GitHub
commit 24d24c8390
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 91 additions and 23 deletions

View file

@ -2,8 +2,9 @@
<html lang='en'> <html lang='en'>
<head> <head>
<title>Water.css</title> <title>Water.css</title>
<link rel='stylesheet' href='https://cdn.jsdelivr.net/gh/kognise/water.css@latest/water.css'> <link rel='stylesheet' href='water.css'>
<meta name='viewport' content='width=device-width, initial-scale=1.0'> <meta name='viewport' content='width=device-width, initial-scale=1.0'>
<!-- Global site tag (gtag.js) - Google Analytics --> <!-- Global site tag (gtag.js) - Google Analytics -->
<script async src='https://www.googletagmanager.com/gtag/js?id=UA-116663597-6'></script> <script async src='https://www.googletagmanager.com/gtag/js?id=UA-116663597-6'></script>
<script> <script>
@ -47,6 +48,7 @@
Below I'm gonna put an <code>&lt;hr&gt;</code>, because why not? Below I'm gonna put an <code>&lt;hr&gt;</code>, because why not?
</p> </p>
<hr> <hr>
<textarea>Hello from a textarea!</textarea>
<form> <form>
<label for='email'>Email</label> <label for='email'>Email</label>
<input type='email' name='email' id='email' placeholder='john.doe@gmail.com'> <input type='email' name='email' id='email' placeholder='john.doe@gmail.com'>

110
water.css
View file

@ -1,16 +1,34 @@
body { body {
background: #202b38;
color: #dbdbdb;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
text-rendering: optimizeLegibility;
margin: 20px;
max-width: 800px;
line-height: 1.4; line-height: 1.4;
max-width: 800px;
margin: 20px auto;
color: #dbdbdb;
background: #202b38;
text-rendering: optimizeLegibility;
}
button,
input[type='submit'],
input[type='button'],
input[type='checkbox'] {
cursor: pointer;
}
a, button, input, textarea {
transition: background-color .1s linear,
border-color .1s linear,
color .1s linear,
box-shadow .1s linear,
transform .1s linear;
} }
a { a {
color: #41adff;
text-decoration: none; text-decoration: none;
color: #41adff;
} }
a:hover { a:hover {
@ -23,8 +41,8 @@ hr {
} }
h1 { h1 {
margin-top: 0;
font-size: 2.2em; font-size: 2.2em;
margin-top: 0;
} }
h1, h2, h3, h4, h5, h6 { h1, h2, h3, h4, h5, h6 {
@ -44,44 +62,92 @@ input:not([type='checkbox']), select {
} }
input, select, button, textarea { input, select, button, textarea {
border-radius: 6px;
padding: 10px;
background: #161f27;
color: #ffffff;
font-size: inherit;
font-family: inherit; font-family: inherit;
border: none; font-size: inherit;
outline: none;
margin-bottom: 6px;
margin-right: 6px; margin-right: 6px;
margin-bottom: 6px;
padding: 10px;
color: #ffffff;
border: none;
border-radius: 6px;
outline: none;
background: #161f27;
}
input:not([type='checkbox']), select, button, textarea {
-webkit-appearance: none; -webkit-appearance: none;
} }
input:focus, select:focus, button:focus, textarea:focus { textarea {
margin-right: 0;
width: 100%;
box-sizing: border-box;
resize: vertical;
}
button, input[type='submit'], input[type='button'] {
padding-right: 30px;
padding-left: 30px;
}
button:hover,
input[type='submit']:hover,
input[type='button']:hover {
background: #324759;
}
input:focus,
select:focus,
button:focus,
textarea:focus {
box-shadow: 0 0 0 2px #0096bfab; box-shadow: 0 0 0 2px #0096bfab;
} }
input[type='checkbox']:active, input[type='submit']:active, input[type='button']:active, button:active { input[type='checkbox']:active,
input[type='submit']:active,
input[type='button']:active,
button:active {
transform: translateY(2px); transform: translateY(2px);
} }
input:disabled { input:disabled {
opacity: 0.5;
cursor: not-allowed; cursor: not-allowed;
opacity: .5;
} }
body.light { body.light {
background: #ffffff;
color: #363636; color: #363636;
background: #ffffff;
} }
body.light h1, body.light h2, body.light h3, body.light h4, body.light h5, body.light h6, body.light strong { body.light a {
color: #0076d1;
}
body.light h1,
body.light h2,
body.light h3,
body.light h4,
body.light h5,
body.light h6,
body.light strong {
color: #000000; color: #000000;
} }
body.light input, body.light select, body.light button, body.light textarea { body.light input,
body.light select,
body.light button,
body.light textarea {
color: #000000;
background: #efefef; background: #efefef;
color: #000000; }
body.light button:hover,
body.light input[type='submit']:hover,
body.light input[type='button']:hover {
background: #dddddd;
} }
::placeholder { ::placeholder {