-
Notifications
You must be signed in to change notification settings - Fork 12
Homework#1 [Done] #2
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
base: master
Are you sure you want to change the base?
Conversation
Tigran Kirakosov/index.html
Outdated
| <div class="weather-container_widget"> | ||
| <div class="weather-container_first-half"> | ||
| <div class="current-weather__state"><img class="current-weather__state_image" src="/assets/images/icons/sun-ico.png"></div> | ||
| <div class="current-weather__desc">Sunny</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.
Can you use <p> for elements with text instead of <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.
Sure, I'll do that!
Tigran Kirakosov/index.html
Outdated
| <div class="weather-container_first-half"> | ||
| <div class="current-weather__state"><img class="current-weather__state_image" src="/assets/images/icons/sun-ico.png"></div> | ||
| <div class="current-weather__desc">Sunny</div> | ||
| <div class="current-weather__date">Tokyo - Wednesday, July 31</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.
the same
Tigran Kirakosov/index.html
Outdated
| <div class="current-weather__date">Tokyo - Wednesday, July 31</div> | ||
| </div> | ||
| <div class="weather-container_second-half"> | ||
| <div class="current-weather__temperature">28 °C</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.
the same
Tigran Kirakosov/index.html
Outdated
| <div class="weather-container_second-half"> | ||
| <div class="current-weather__temperature">28 °C</div> | ||
| <div class="current-weather__graph"><img class="current-weather__graph_image" src="/assets/images/graph.png"></div> | ||
| <div class="current-weather__next-days"> |
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 looks like list of similar elements - can you use <ul> and <li> instead of <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.
I'll rethink the approach I'm using. Definitely, I should use ul/li here
Tigran Kirakosov/index.html
Outdated
| <div class="current-weather__graph"><img class="current-weather__graph_image" src="/assets/images/graph.png"></div> | ||
| <div class="current-weather__next-days"> | ||
| <div class="day"> | ||
| <img class="day_symb" src="/assets/images/icons/sunny.png"><div class="current-weather__day day-props">Thu</div><div class="day-props">28 °C</div><div class="night-props">18 °C</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.
<img> tag has two required attributes - src and alt https://www.w3schools.com/tags/tag_img.asp
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.
So I should always keep these alt attributes in mind. Though it seemed to be unnecessary for me, and if that is required - so be it
Tigran Kirakosov/style.css
Outdated
| align-items: center; | ||
| } | ||
| .current-weather__day { | ||
| border-bottom: 1px solid #7b1f27; |
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 see that in general you use the good approach for ordering css properties - it's cool :) but try to not break it - border-bottom shouldn't be before width if you are not sure about some cases - there is good example http://codeguide.academy/html-css.html
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.
Thank you 👍
And thanks for the example - it's a very useful and informative tip!
Tigran Kirakosov/style.css
Outdated
| .current-weather__day { | ||
| border-bottom: 1px solid #7b1f27; | ||
| width: 45px; | ||
| text-align: center; |
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.
the same - text-align should be after any padding
Tigran Kirakosov/style.css
Outdated
| .weather-container_first-half { | ||
| display: flex; | ||
| flex-direction: column; | ||
| text-align: center; |
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.
the same about ordering
| background-image: url("/assets/images/bg/Tokyo-bg.png"); | ||
| border-radius: 10px; | ||
| color: white; | ||
| cursor: default; |
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.
just out of curiosity - isn't cursor: default for <article>?
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.
Yes, I did it in order to prevent cursor change on text hovering. I feel like its better for a user not to think about widget like its something common to the rest of the environment, but instead something different. I may be wrong, but for me, it feels right
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.
Ok, actually I don't have any concerns about that 👍
Tigran Kirakosov/style.css
Outdated
| } | ||
| /* Highier level containers states */ | ||
| .weather-container_main { | ||
| padding: 80px 110px; |
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.
the same about ordering
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 missed something. What was that previous note about ordering?...
upd: If it's about ordering css props, I'll fix that
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.
yeap - it's about css properties
| <ul class="weather-container_second-half"> | ||
| <li class="current-weather__temperature"><p>28 °C</p></li> | ||
| <li class="current-weather__graph"><img class="current-weather__graph_image" src="./assets/images/graph.png" alt="weather graph"></li> | ||
| <ul class="current-weather__next-days"> |
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.
yeah, that's what I meant 👍
Tigran Kirakosov/index.html
Outdated
| <p class="current-weather__desc">Sunny</p> | ||
| <p class="current-weather__date">Tokyo - Wednesday, July 31</p> | ||
| </div> | ||
| <ul class="weather-container_second-half"> |
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 think this ul is overhead - you have 3 absolutely different items inside (in general list items should be quite similar), but it's rather about semantic than some technical issue. more important - third element of list is <ul> - by specification children of <ul> should be just <li> elements (https://stackoverflow.com/questions/12242041/allowed-child-elements-of-ul)
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.
Yea, the first <ul> looks kinda weird and has no certain reason.
Well, I'll keep in mind the fact <ul> must contain nothing but <li> child elements.
Completed Homework#1