-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
add task solution #4919
base: master
Are you sure you want to change the base?
add task solution #4919
Changes from 1 commit
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,78 @@ | ||||
body { | ||||
:root { | ||||
--nav-active: #00acdc; | ||||
--header-color: #fff; | ||||
--nav-color: #000; | ||||
--nav-backgroundcolor: #fff; | ||||
} | ||||
|
||||
* { | ||||
font-family: | ||||
system-ui, | ||||
roksolanap marked this conversation as resolved.
Show resolved
Hide resolved
|
||||
-apple-system, | ||||
BlinkMacSystemFont, | ||||
'Segoe UI', | ||||
Roboto, | ||||
Oxygen, | ||||
Ubuntu, | ||||
Cantarell, | ||||
'Open Sans', | ||||
'Helvetica Neue', | ||||
sans-serif; | ||||
font-size: 12px; | ||||
margin: 0; | ||||
box-sizing: border-box; | ||||
} | ||||
|
||||
.site_header { | ||||
width: 100%; | ||||
display: flex; | ||||
align-items: center; | ||||
justify-content: space-between; | ||||
background-color: var(--header-color); | ||||
padding: 0 50px; | ||||
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. This color is default
Suggested change
|
||||
} | ||||
|
||||
.logo { | ||||
height: 40px; | ||||
width: 40px; | ||||
} | ||||
|
||||
.nav li { | ||||
display: inline; | ||||
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. do not add styles using combined selectors without necessary fix all similar cases |
||||
align-items: center; | ||||
position: relative; | ||||
text-transform: uppercase; | ||||
white-space: nowrap; | ||||
line-height: 60px; | ||||
margin-right: 20px; | ||||
background-color: var(--nav-backgroundcolor); | ||||
} | ||||
|
||||
.nav li a { | ||||
text-decoration: none; | ||||
color: var(--nav-color); | ||||
font-weight: 500; | ||||
} | ||||
|
||||
.nav li:last-child { | ||||
margin-right: 0; | ||||
} | ||||
|
||||
.nav li .is-active { | ||||
color: var(--nav-active); | ||||
} | ||||
|
||||
.nav li a:hover { | ||||
color: var(--nav-active); | ||||
} | ||||
|
||||
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. you can list selectors with same styles separated by comma:
|
||||
.nav li .is-active::after { | ||||
content: ''; | ||||
position: absolute; | ||||
background-color: var(--nav-active); | ||||
border-radius: 8px; | ||||
height: 4px; | ||||
top: 34px; | ||||
right: 0; | ||||
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.
|
||||
left: 0; | ||||
} |
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.
better not adding a lot of styles to * selector without necessary
For example, if you add font-family and font-size to
body
they will be inherited by all nested elementsIt is not a good idea to reset the margin for all elements, better to do it for the list of tags you really need
What really should be here is
box-sizing
property