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
30 changes: 30 additions & 0 deletions 01-review/excercise/base.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/* presentational CSS, no answers here -- ignore below this line */
div > div {
font-size: 5rem;
text-align: center;
color: white;
}
.a {
background-color: #fcb10f;
}
.b {
background-color: #801340;
}
.c {
background-color: #4d2975;
}
.d {
background-color: #244479;
}
.e {
background-color: #55b4af;
}
.f {
background-color: rgba(128, 19, 64, 0.7);
}
.g {
background-color: rgba(77, 41, 117, 0.5);
}
.h {
background-color: rgba(252, 177, 15, 0.7);
}
27 changes: 27 additions & 0 deletions 01-review/excercise/ex-1-flex.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
.wrapper {
display: flex;
flex-flow: row wrap;
justify-content: space-between;
align-items: stretch;
}

.wrapper > * {
margin-bottom: 1rem;
}

.a,
.h {
flex-basis: 66%;
}

.b,
.d,
.e,
.f,
.g {
flex-basis: 32%;
}

.c {
flex: 100%;
}
14 changes: 14 additions & 0 deletions 01-review/excercise/ex-1-grid.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
.wrapper {
display: grid;
grid-template-columns: repeat(3, 1fr);
grid-gap: 1rem;
}

.a,
.h {
grid-column: span 2;
}

.c {
grid-column: span 3;
}
24 changes: 24 additions & 0 deletions 01-review/excercise/start.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<link rel="stylesheet" href="./base.css" />
<link rel="stylesheet" href="./ex-1-flex.css" />
<link rel="stylesheet" href="./ex-1-grid.css" />
</head>
<body>
<div class="wrapper">
<div class="a">A</div>
<div class="b">B</div>
<div class="c">C</div>
<div class="d">D</div>
<div class="e">E</div>
<div class="f">F</div>
<div class="g">G</div>
<div class="h">H</div>
</div>
</body>
</html>
207 changes: 163 additions & 44 deletions 02-hamburger/begin/css/nav.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,61 +5,180 @@ Below is a starting navigation bar formatted for mobile and desktop. MQ is set t

*/

header .row {
display: flex;
flex-flow: row nowrap;
}

.menu-toggle {
color: #333;
margin-right: 1rem;
}

.menu-toggle:hover,
.menu-toggle:focus {
color: #c85028;
}

.main-menu {
position: fixed;
display: none;
left: -200px;
top: 0;
height: 100%;
overflow-x: visible;
overflow-y: auto;
transition: left 0.3s ease;
z-index: 999;
}

.main-menu ul {
list-style: none;
margin: 0;
padding-top: 2.5em;
min-height: 100%;
width: 200px;
background-color: #1a1a1a;
}

.main-menu a {
display: block;
padding: 0.75em;
color: #fff;
text-decoration: none;
border-bottom: 1px solid #383838;
}

.main-menu li:first-child a {
border-top: 1px solid #383838;
}

.main-menu a:hover,
.main-menu a:focus {
background-color: #333;
text-decoration: underline;
}

.main-menu .menu-close {
position: absolute;
right: 0;
top: 0;
border-bottom: none;
}

.main-menu:target {
display: block;
left: 0;
outline: none;
}

.main-menu:target .menu-close {
z-index: 1001;
}

.main-menu:target ul {
position: relative;
z-index: 1000;
}

.main-menu:target + .backdrop {
position: fixed;
display: block;
left: 0;
top: 0;
width: 100%;
height: 100%;
z-index: 998;
background-color: rgba(0, 0, 0, 0.5);
cursor: default;
}

header {
border-bottom: 4px solid #9EA9C1;
border-bottom: 4px solid #9ea9c1;
}
main {
border-top: 2px solid #dddddd;
margin-top: 0.5rem;

}
nav ul {
list-style: none;
margin: 0;
list-style: none;
margin: 0;
}

nav a {
display: block;
padding: 0.75rem;
text-decoration: none;
}
@media (min-width: 800px) {
/* header and nav borders rearranged for desktop */
header,
main {
border: none;
margin: 0;
}
nav {
border-top: 4px solid #9ea9c1;
border-bottom: 1px solid #dddddd;
padding: 0.3rem 0;
}

.menu-toggle,
.main-menu .menu-close {
display: none;
}

.main-menu {
position: static;
display: block;
padding: .75rem;
}

.main-menu ul {
padding: 0;
height: auto;
width: auto;
background: none;
overflow: hidden;
text-align: center;
}

.main-menu li {
display: inline-block;
}

.main-menu li:first-child a {
border-top: none;
}

.main-menu a {
color: #c85028;
border-bottom: none;
display: inline;
}

.main-menu a:hover,
.main-menu a:focus {
background: none;
color: #7e64be;
text-decoration: none;
}
}

@media (min-width: 800px) {
/* header and nav borders rearranged for desktop */
header, main {
border: none;
margin: 0;
}
nav {
border-top: 4px solid #9EA9C1;
border-bottom: 1px solid #dddddd;
padding: 0.3rem 0;
}
nav ul {
text-align: center;
}
/* display the li's horizontally */
nav li {
display: inline-block;
}
/* add cute divider after each li, but not the last one */
nav li:not(:last-child)::after {
content: " || ";
}
/* above style the same as
nav li::after {
content: " || ";
/* add cute divider after each li, but not the last one */
nav li:not(:last-child)::after {
content: " || ";
}
/* above style the same as
nav li::after {
content: " || ";
}
nav li:last-child::after {
content: "";
}
nav li:last-child::after {
content: "";
}
*/
/* desktop assumes a pointer display */
nav a {
color: #C85028;
border-bottom: none;
display: inline;
}

}
*/
/* desktop assumes a pointer display */
nav a {
color: #c85028;
border-bottom: none;
display: inline;
}
}
Loading