Last active
June 5, 2020 21:49
-
-
Save A-Ostrovnyy/5638ff534594a30e886854d70f50e484 to your computer and use it in GitHub Desktop.
Some students mistakes and good parts from Kottans frontend cource 2019
This file contains hidden or 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
//Mixin for media rules | |
=r($width) | |
@media only screen and (max-width: $width+ "px") | |
@content | |
.nav | |
font-family: $bebas | |
font-size: 16px | |
+r(1000) | |
position: absolute | |
top: -500px | |
.nav__list | |
margin: 0 | |
padding: 0 | |
+r(1000) | |
flex-direction: column | |
justify-content: flex-start | |
.nav__list::after | |
content: '' | |
display: none | |
+r(1000) | |
display: block | |
.nav__item | |
margin-left: 30px | |
color: $nav | |
+r(1000) | |
margin-bottom: 30px |
This file contains hidden or 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
// Too specific selector | |
*, body { | |
margin: 0; | |
padding: 0; | |
line-height: 1; | |
box-sizing: border-box; | |
font-family: arial, sans-serif; } | |
.header { | |
padding: 20px; } | |
li { | |
list-style: none; } | |
a { | |
text-decoration: none; | |
color: rgba(0, 0, 0, 0.87); | |
line-height: 24px; | |
font-size: 14px; } | |
.navigation { | |
display: flex; | |
align-items: center; } | |
.navigation-list { | |
display: -webkit-box; | |
display: -webkit-flex; | |
position: relative; } | |
.navigation-list .list-item { | |
margin: 0 10px; } | |
.navigation-list .list-item .post:hover, | |
.navigation-list .list-item .images:hover { | |
border-bottom: 1px solid #000; } | |
.navigation-list .list-item:focus { | |
outline: none; } | |
.navigation-list .list-item .apps-input { | |
display: none; } | |
.navigation-list .list-item .apps-label .apps-icon { | |
width: 20px; | |
height: 20px; | |
background-size: contain; | |
display: block; } | |
.navigation-list .list-item .apps-label .apps-icon:hover { | |
opacity: 1; } | |
.navigation-list .list-item .apps-label .apps-close { | |
height: 100vh; | |
z-index: -1; } | |
.navigation-list .list-item .apps-popup { | |
display: none; } | |
.navigation-list .list-item .apps-popup:before { | |
content: ""; | |
width: 12px; | |
transform: rotate(-45deg); } | |
.navigation-list .list-item .apps-popup .wrapper { | |
-webkit-box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2); | |
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2); } | |
.navigation-list .list-item .apps-popup .wrapper .apps-popup-block { | |
display: flex; | |
padding: 15px 20px; } | |
.navigation-list .list-item .apps-popup .wrapper .apps-popup-block .popup-item { | |
width: 33%; | |
text-align: center; | |
padding: 6px; | |
border: 1px solid #fff; } | |
.navigation-list .list-item .apps-popup .wrapper .apps-popup-block .popup-item:hover { | |
border: 1px solid #ddd; } | |
.navigation-list .list-item .apps-popup .wrapper .apps-popup-block .popup-item .app-image { | |
width: 70%; | |
height: 50px; } | |
.navigation-list .list-item .apps-popup .wrapper .apps-popup-block .other-products { | |
width: 100%; | |
color: rgba(0, 0, 0, 0.87); | |
text-align: center; | |
margin-top: 30px; } | |
.navigation-list .list-item .apps-popup .wrapper .apps-popup-block .other-products:hover { | |
color: #808080; } | |
.navigation-list .list-item .apps-popup .wrapper .apps-popup-block .account-image { | |
border-radius: 50%; } | |
.navigation-list .list-item .apps-popup .wrapper .additional-items { | |
display: none; } | |
.navigation-list .list-item .apps-popup .more-apps { | |
display: none; } | |
.navigation-list .list-item .apps-popup .more-apps:checked ~ .additional-items { | |
display: flex; } | |
.navigation-list .list-item .apps-popup .more-apps:checked ~ .more-button { | |
display: block; | |
margin: 0 auto; } | |
.navigation-list .list-item .apps-popup .more-button { | |
font-size: 14px; | |
opacity: 1; | |
border: 1px solid #f5f5f5; } | |
.navigation-list .list-item .apps-popup .more-button:hover { | |
border: 1px solid #ccc; } | |
.navigation-list .notify { | |
padding: 5px; | |
background: #000; | |
opacity: 0.5; | |
-webkit-border-radius: 20px; | |
border-radius: 20px; } | |
.navigation-list .notify:hover { | |
opacity: 1; } | |
.navigation-list .notify-link { | |
display: block; | |
background-size: 70%; } | |
.navigation-list .user { | |
-webkit-border-radius: 20px; | |
border-radius: 20px; | |
position: relative; | |
padding: 5px; } | |
.navigation-list .user-link { | |
background-image: url(https://lh3.googleusercontent.com/-wR45nNlb0jY/AAAAAAAAAAI/AAAAAAAAAAA/ACevoQOrtxfoKv7go3rZDlVl-xoTZ7AifA/s64-c-mo/photo.jpg); | |
display: block; | |
border-radius: 20px; } | |
.apps-input:checked ~ .apps-popup { | |
display: block; | |
} | |
.apps-input:focus ~ .apps-label .apps-icon { | |
outline: 2px solid #4d90fe; } | |
.apps-input:checked + .apps-label > .apps-close { | |
display: block; } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment