Last active
July 9, 2021 10:30
-
-
Save mayinx/619bba622dbe84cec99866bf9bc2b74c to your computer and use it in GitHub Desktop.
webprojects-utilities
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*, | |
*::before, | |
*::after { | |
box-sizing: border-box; | |
margin: 0; | |
padding: 0; | |
} | |
html { | |
font-size: 16px; | |
font-family: "News Cycle"; | |
/* to prvgent scrolling of the body - we just want scrolling in the main container */ | |
height: 100%; | |
overflow: hidden; | |
color: var(--page-font-color); | |
} | |
:root { | |
--primary-color: #56c6c6; | |
--secondary-color: #79d2d2; | |
--tertiary-color: #14b8b8; | |
--quaternary-color: #00bcd4; | |
--quinary-color: hsla(200, 0%, 0%, 0.7); | |
--senary-color: #e5eaf5; | |
/* quaternary, quinary, senary, septenary, octonary, nonary */ | |
--header-height-mobile: 75px; | |
--page-bg-color: var(--senary-color); | |
--page-font-color: var(--quinary-color); | |
--hover-font-color: #eee; | |
/* HEADER */ | |
--header-bg-color: var(--primary-color); | |
--header-font-color: var(--page-font-color); | |
--header-border-bottom-color: var(--secondary-color); | |
/* FOOTER*/ | |
--footer-bg-color: var(--primary-color); | |
--footer-font-color: var(--page-font-color); | |
--footer-nav-item-link-color: var(--page-font-color); | |
--footer-nav-item-hover-bg-color: var(--secondary-color); | |
--footer-nav-item-hover-border-color: var(--tertiary-color); | |
--footer-nav-item-hover-font-color: var(--hover-font-color); | |
--form-inputs-bg-color: #f5f5f5; | |
--form-inputs-color: var(--page-font-color); | |
--form-inputs-border-color: #e7e7e7; | |
--form-inputs-focus-bg-color: #f0f0f0; | |
--form-inputs-focus-border-color: #00bcd4; | |
/* question cards */ | |
--card-bg-color: #fff; | |
--question-card-answer-bg-color: var(--form-inputs-bg-color); | |
--question-card-bookmark-icon-color: var(--page-font-color); | |
--question-card-bookmarked-bookmark-icon-color: var(--secondary-color); | |
--question-card-bookmark-icon-bg-color: var(--card-bg-color); | |
--question-card-bookmark-icon-hover-color: var(--secondary-color); | |
--question-card-toggle-answer-btn-hover-font-color: var(--secondary-color); | |
/* --question-card-toggle-answer-btn-hover-bg-color: var(--secondary-color); */ | |
--question-card-toggle-answer-btn-hover-border-color: var(--tertiary-color); | |
--question-card-answer-overlay-bg-color: #e7e7e7; | |
} | |
[data-theme="dark"] { | |
--primary-color: #3f3f3f; | |
--secondary-color: #999999; | |
--tertiary-color: #cccccc; | |
--quinary-color: #fff; | |
--senary-color: #e5eaf5; | |
/* question cards */ | |
--card-bg-color: #3f3f3f; | |
/* form */ | |
--form-inputs-bg-color: var(--tertiary-color); | |
--form-inputs-focus-bg-color: var(--secondary-color); | |
} | |
p { | |
padding: 1em; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@media all and (min-width: 400px) { | |
} | |
@media all and (min-width: 600px) { | |
main section.card { | |
width: 80vw; | |
} | |
main section.card { | |
margin: 2rem; | |
padding: 2.5rem; | |
} | |
main section.card.question { | |
margin: 2rem; | |
padding: 2.5rem; | |
} | |
/* main section.card .bookmark-icon { | |
position: absolute; | |
top: -20px; | |
right: 30px; | |
} */ | |
footer nav ul li a i { | |
margin-right: 0.5rem; | |
} | |
footer nav ul li a span { | |
display: inline-block; | |
} | |
body.profile .about-me { | |
width: 80%; | |
font-size: 1.3rem; | |
} | |
body.profile .tag-list { | |
width: 50%; | |
} | |
} | |
@media all and (min-width: 800px) { | |
header { | |
justify-content: space-between; | |
} | |
header .user-score { | |
display: block; | |
} | |
/* main section.card .bookmark-icon { | |
position: absolute; | |
top: -20px; | |
right: 30px; | |
font-size: 2.5rem; | |
} */ | |
} | |
@media all and (min-width: 900px) { | |
header .game-area { | |
display: block; | |
} | |
body.create main form { | |
width: 80%; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 1. FONT BOLD 16 PX */ | |
/* used in header h1 */ | |
.font-bold-16-dark { | |
font-weight: 700; /* == bold */ | |
font-size: 1rem; /* 1rem == 16px as per page font size */ | |
letter-spacing: 1px; | |
color: var(--color-dark-blue); | |
} | |
/* 2. FONT SEMIBOLD 16 PX (DARKBLLUE) */ | |
/* used in ... */ | |
.font-sb-16-medium { | |
font-weight: 600; | |
font-size: 1rem; /* 1rem == 16px as per page font size */ | |
/* color: var(--main-font-color); */ | |
color: var(--color-medium-blue); | |
letter-spacing: 0.5px; | |
} | |
/* 3. FONT SEMIBOLD 16 PX (LIGHTBLLUE) */ | |
/* used in simple list component */ | |
.font-sb-16-light { | |
/* INFO: normally a font-weight of '600' woulb be semi-bold - but that doesn't look right - so we use '500' to achieve that desired semi-bold look specified in the artboard - plus: Roboto doesn't really specify a font-weight pf 600 according to google fonts */ | |
font-weight: 500; | |
font-size: 1rem; /* 1rem == 16px as per page font size */ | |
/* color: var(--main-font-color); */ | |
color: var(--color-medium-blue); | |
letter-spacing: 0.5px; | |
} | |
/* FONT-SEMIBOLD-14PX */ | |
.font-sb-14 { | |
font-weight: 600; | |
font-size: 0.875rem; /* == 14px as per page base font size of 16px == 1rem */ | |
color: var(--color-dark-blue); | |
letter-spacing: 1px; | |
} | |
/* FONT-REGULAR-14PX */ | |
.font-reg-12 { | |
font-weight: 400; /* 400 == normal / regular */ | |
font-size: 0.75rem; /* 12px as per page font size of 16px */ | |
color: var(--color-medium-blue); | |
letter-spacing: 1px; | |
} | |
.font-upper { | |
text-transform: uppercase; | |
} | |
.ta-left { | |
text-align: left; | |
} | |
.ta-right { | |
text-align: right; | |
} | |
.ta-center { | |
text-align: center; | |
} | |
/* utils for height */ | |
/* usd for sizing (small / big) */ | |
.height-50 { | |
height: 50px; | |
} | |
.height-75 { | |
height: 75px; | |
} | |
/* utils for margins */ | |
.mb-0_25 { | |
margin-bottom: 0.25rem; | |
} | |
.mb-0_5 { | |
margin-bottom: 0.5rem; | |
} | |
.mb-1 { | |
margin-bottom: 1rem; | |
} | |
.mb-1_5 { | |
margin-bottom: 1.5rem; | |
} | |
.mb-2 { | |
margin-bottom: 2rem; | |
} | |
/* useful to left align an element*/ | |
.mr-auto { | |
margin-right: auto; | |
} | |
/* useful to right align an element*/ | |
.ml-auto { | |
margin-left: auto; | |
} | |
.mr-1 { | |
margin-right: 1rem; | |
} | |
.p-1 { | |
padding: 1rem; | |
} | |
.ptb-0_5 { | |
padding: 0.5rem 0; | |
} | |
.ptb-1 { | |
padding: 1rem 0; | |
} | |
.w-100 { | |
width: 100%; | |
} | |
/* UTILS FOR FLEX */ | |
.d-flex { | |
display: flex; | |
} | |
.d-flex-column { | |
display: flex; | |
flex-direction: column; | |
} | |
.d-flex-row { | |
display: flex; | |
flex-direction: row; | |
} | |
.flex-nowrap { | |
flex-wrap: nowrap; | |
} | |
.justify-content-start { | |
justify-content: flex-start; | |
} | |
.justify-content-end { | |
justify-content: flex-end; | |
} | |
.justify-content-between { | |
justify-content: space-between; | |
} | |
.justify-content-around { | |
justify-content: space-around; | |
} | |
.justify-content-evenly { | |
justify-content: space-evenly; | |
} | |
.align-items-center { | |
align-items: center; | |
} | |
.align-items-start { | |
align-items: flex-start; | |
} | |
.align-items-end { | |
align-items: flex-end; | |
} | |
.align-self-start { | |
align-self: flex-start; | |
} | |
.align-self-end { | |
align-self: flex-end; | |
} | |
.flex-auto { | |
flex: auto; | |
} | |
/* grid related utils */ | |
.d-grid { | |
display: grid; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment