Skip to content

Instantly share code, notes, and snippets.

@gouvermxt
Last active October 20, 2017 11:58
Show Gist options
  • Save gouvermxt/0543515decfc7ed8505a847a1b2e26ee to your computer and use it in GitHub Desktop.
Save gouvermxt/0543515decfc7ed8505a847a1b2e26ee to your computer and use it in GitHub Desktop.
My basic css style
/* -------------------------------------------------------------------------------------- */
/* BASIC SETUP */
/* -------------------------------------------------------------------------------------- */
* {
/* default css reset */
padding: 0;
margin: 0;
box-sizing: border-box;
}
*:focus {
outline: none;
}
/* removes browser focus effect on inputs etc */
body,
html {
/* default html rules */
background-color: #F4F4F4;
color: #555;
font-family: -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Meiryo UI';
/* main google font plus alternatives */
font-size: 13px;
font-weight: 300;
text-rendering: optimizeLegibility;
overflow-x: hidden;
}
.clearfix {
zoom: 1;
}
.clearfix:after {
content: '.';
clear: both;
display: block;
height: 0;
visibility: hidden;
}
.left {
float: left;
}
.right {
float: right;
}
/* -------------------------------------------------------------------------------------- */
/* REUSABLE COMPONENTS */
/* -------------------------------------------------------------------------------------- */
.row {
/* fluid row rules */
max-width: 1140px;
margin: 0 auto;
}
section {
padding-top: 2%;
height: 100vh;
}
.full_height {
height: 80vh;
}
.rounded-image {
}
.formatted-text {
p + p {
margin-top: 1em;
}
}
/* ----------- BOXES ----------- */
.box {
background-color: #fff;
border-radius: 5px;
box-shadow: 0 2px 2px #efefef;
margin-bottom: 15px;
padding: 3% 3%;
}
.bottom-action-bar {
width: 100%;
}
.bottom-action-bar:before {
display: block;
height: 1px;
background-color: lightgray;
content: "";
margin: 30px auto;
}
.bottom-action-bar .left {
float: left;
}
.bottom-action-bar .right {
float: right;
}
.right {
float: right;
}
/* ----------- HEADINGS ----------- */
h1,
h2,
h3 {
font-weight: bold;
/* reduce font weigth for bigger font sizes */
// text-transform: uppercase;
}
h1 {
margin: 0;
/* reset normalize rule */
margin-bottom: 20px;
color: #fff;
font-size: 240%;
/* relative to 20px in HTML rule */
word-spacing: 4px;
letter-spacing: 1px;
}
h2 {
font-size: 160%;
word-spacing: 2px;
margin-bottom: 30px;
letter-spacing: 1px;
text-transform: uppercase;
}
h2:after {
display: block;
height: 2px;
background-color: #e7eaec;
content: "";
width: 100%;
margin: 20px auto 0;
}
h3 {
font-size: 110%;
margin-bottom: 15px;
}
.centered {
width: 90%;
margin: 0 auto;
}
/* ----------- ICONS ----------- */
.icon-small {
width: 17px;
margin-right: 5px;
}
.icon-big {
font-size: 350%;
display: block;
color: #e67e22;
margin-bottom: 10px;
}
/* ----------- LINKS ----------- */
a:link,
a:visited {
color: #BB362F;
text-decoration: none;
padding-bottom: 1px;
border-bottom: 1px solid #BB362F;
-webkit-transition: border-bottom 0.2s, color 0.2s;
transition: border-bottom 0.2s, color 0.2s;
}
a:active,
a:hover {
color: #555;
border-bottom: 1px solid transparent;
}
/* ----------- BUTTONS ----------- */
.btn:link,
.btn:visited,
input[type=submit],
button[type=submit] {
display: inline-block;
/* dont force linebreak like block elements, but can have margin and padding */
padding: 10px 30px;
font-weight: 300;
text-decoration: none;
border-radius: 3px;
color: #BB362F;
-webkit-transition: background-color 0.2s, border 0.2s, color 0.2s;
transition: background-color 0.2s, border 0.2s, color 0.2s;
/* */
}
.btn-full:link,
.btn-full:visited,
input[type=submit],
button[type=submit] {
background-color: #BB362F;
border: 1px solid #BB362F;
color: #fff;
margin-right: 15px;
}
.btn-ghost:link,
.btn-ghost:visited {
border: 1px solid #BB362F;
}
.btn:active,
.btn:hover,
input[type=submit]:active,
input[type=submit]:hover,
button[type=submit]:active,
button[type=submit]:hover {
background-color: #992924;
}
.btn-full:active,
.btn-full:hover,
input[type=submit]:active,
input[type=submit]:hover,
button[type=submit]:active,
button[type=submit]:hover {
border: 1px solid #992924;
}
.btn-ghost:active,
.btn-ghost:hover {
border: 1px solid #992924;
color: #fff;
}
.btn.disabled,
input[type=submit].disabled,
button[type=submit].disabled {
border-color: #BBBBBB;
background-color: #BBBBBB;
cursor: default;
}
input[type=submit],
button[type=submit] {
font-weight: normal;
}
input[type=submit]:hover,
button[type=submit]:hover {
cursor: pointer;
}
/* ----------- PARAGRAPHS ----------- */
.long-copy {
line-height: 145%;
width: 70%;
margin-left: 15%;
/* to center. 100 % - 70% of width = 30% /2 = 15% */
}
/* -------------------------------------------------------------------------------------- */
/* FORM */
/* -------------------------------------------------------------------------------------- */
.default-form {
width: 100%;
margin: 0 auto;
}
input[type=email],
input[type=text],
select,
textarea {
width: 100%;
padding: 7px;
border-radius: 3px;
border: 1px solid #ccc;
}
textarea {
height: 100px;
}
input[type=checkbox] {
margin: 10px 5px 1px 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment