-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
layout_moyo-header solution #5830
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,71 @@ | ||
* { | ||
margin: 0; | ||
padding: 0; | ||
box-sizing: border-box; | ||
font-family: Roboto, sans-serif; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The font-family is set globally, which is fine, but ensure that the 'Roboto' font is correctly loaded in your HTML file. This is already done in your HTML file using Google Fonts, so this line is correctly implemented. |
||
} | ||
|
||
body { | ||
font-size: 12px; | ||
margin: 0; | ||
background-color: gray; | ||
} | ||
|
||
.header { | ||
position: fixed; | ||
top: 0; | ||
left: 0; | ||
width: 100%; | ||
background-color: #fff; | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
padding: 0 50px; | ||
box-sizing: border-box; | ||
} | ||
|
||
.img { | ||
height: 40px; | ||
width: 40px; | ||
display: block; | ||
} | ||
|
||
.navigation { | ||
list-style: none; | ||
display: flex; | ||
padding: 0; | ||
margin: 0; | ||
} | ||
|
||
.navbar { | ||
display: inline-block; | ||
position: relative; | ||
text-align: center; | ||
line-height: 60px; | ||
text-decoration: none; | ||
color: #000; | ||
text-transform: uppercase; | ||
} | ||
|
||
.navigation li:not(:last-child) { | ||
margin-right: 20px; | ||
} | ||
|
||
.navbar:hover { | ||
color: #00acdc; | ||
} | ||
|
||
.navbar.is-active { | ||
color: #00acdc; | ||
} | ||
|
||
.navbar.is-active::after { | ||
content: ''; | ||
position: absolute; | ||
bottom: 0; | ||
left: 0; | ||
width: 100%; | ||
height: 4px; | ||
border-radius: 8px; | ||
background: #00acdc; | ||
Comment on lines
+55
to
+70
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The color #00acdc is used multiple times. The task requires using a CSS variable for the blue color. Consider defining a CSS variable for this color and using it throughout the stylesheet. |
||
} |
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.
Using the universal selector (*) is against the checklist requirements due to potential performance impacts. Consider applying styles more selectively to improve performance.