-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Develop #93
base: master
Are you sure you want to change the base?
Develop #93
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/style.css
Outdated
} | ||
|
||
.nav__list:hover { | ||
color: aqua; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's not the right color. Please take color from Figma design.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, changed color to #00acdc per figma design
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as tests, I've never been able to get them to pass properly even on the simplest of tasks. I'll ask in chat
src/style.css
Outdated
|
||
.is-active { | ||
color: aqua; | ||
text-decoration: underline; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be done with ::after and without text-decoration: underlane.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Used bottom-border instead, see change. I'm unclear how pseudo-element ::after is supposed to work, haven't gone over this in lectures.
src/index.html
Outdated
<li class="nav__list">Photo</li> | ||
<li class="nav__list">Video</li> | ||
</ul> | ||
</div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nesting for this task , follow below format
<body>
<header class="header">
<a href="#" class="logo">
<img
src=""
alt=""
class=""
>
</a>
<nav class="nav">
<ul class="nav__list">
<li class="nav__item">
<a href="#" class="nav__link is-active">Apple</a>
</li>
<li class="nav__item">
<a href="#" class="nav__link">Samsung</a>
</li>
.........
<li class="nav__item">
<a href="#" class="nav__link">Video</a>
</li>
</ul>
</nav>
</header>
</body>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've altered the HTML accordingly. See latest revision and tell me what you think
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please follow suggestions, but need to implement more than I have suggested
src/style.css
Outdated
.logo { | ||
margin-left: 2.5%; | ||
flex-grow: 3; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- you wont require both
margin-left
andflex-grow
after you are done with suggestion forheader
class - add height and width desired for the logo here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed and added height, width 40px. Cool, it still works
src/style.css
Outdated
.nav__list { | ||
display: inline-flex; | ||
justify-content: space-evenly; | ||
list-style: none; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.nav__list { | |
display: inline-flex; | |
justify-content: space-evenly; | |
list-style: none; | |
} | |
.nav__list { | |
display: flex; | |
list-style: none; | |
} | |
} |
this will fix the alignment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also works
src/style.css
Outdated
} | ||
|
||
.is-active { | ||
color: #00acdc; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use ::after
instead of border-bottom
and have position: absolute
and make it position according to nav__link
(for that you have to give nav__link
position: relative
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unsure how to get this pseudo-element to work as it should, even when I copy the figma mockup directly I see no change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why all tests failed – issues with fonts, forgetting to reset default margins, issues with is-active
, etc.
let it be this way, do not spend too much time on one task, keep moving, but make sure to review my comments down below
.nav__list { | ||
display: flex; | ||
list-style: none; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you have to reset default paddings/margins for ul
.nav__link::after { | ||
position: absolute; | ||
width: 37px; | ||
height: 4px; | ||
left: 509px; | ||
top: 56px; | ||
background: #00acdc; | ||
border-radius: 8px; | ||
/* padding-bottom: 20px; */ | ||
/* border-bottom: 4px solid #00acdc; */ | ||
} | ||
|
||
/* .is-active {} */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- these styles should be applied to
.is-active
, not.nav__link
- to make that blue dash appear, add
content: ""
line in your styles
NB: do not just copy-paste styles from Figma, those are just auto-generated, literally hardcoded
some of them are required (colors, fonts, line-heights, paddings, etc.), some of them should not be copy-pasted (position, etc.)
@@ -6,9 +6,42 @@ | |||
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> | |||
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |||
<title>Moyo header</title> | |||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Roboto"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you've imported the font, but there is not font-weight, so you text does not match
should be something like this one
https://fonts.googleapis.com/css2?family=Roboto:wght@500&display=swap
https://mfckr.github.io/layout_moyo-header-en/
https://mfckr.github.io/layout_moyo-header-en/report/html_report/