-
Notifications
You must be signed in to change notification settings - Fork 12
Cubes widget #8
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?
Cubes widget #8
Conversation
Krivorotova Tatyana/index.html
Outdated
| </head> | ||
| <body> | ||
| <div id="widget"> | ||
| <div id="a" class="elem"> |
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 more verbose names for classes and ids instead of a, b, c... and widget, elem? 😄
Krivorotova Tatyana/index.html
Outdated
| <body> | ||
| <div id="widget"> | ||
| <div id="a" class="elem"> | ||
| <img src="images/chicago.png"> |
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.
by specification tag <img> has two required attributes - src and alt https://www.w3schools.com/tags/tag_img.asp
Krivorotova Tatyana/index.html
Outdated
| <img src="images/brooklyn_cloud.png"> | ||
| <span>BROOKLYN / 55°</span> | ||
| </div> | ||
| <div id="d" class="elem"> |
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.
hmm, #a ,#b ,#c, #d #f looks like the similar elements. Can you change <div> to <section> and add some css class like city-card?
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 mean I have to change all the divs from class “elem” to sections or add sections which would contain class=“elem” elements and have class=“city-card”?
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 - change all the divs from class “elem” to sections (exclude #e element - see another comment) and add to them class city-card
Krivorotova Tatyana/index.html
Outdated
| <img src="images/portland.png"> | ||
| <span>PORTLAND / 27°</span> | ||
| </div> | ||
| <div id="e" class="elem"> |
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 for me #e looks like the main part of the widget and you can change <div> to <main>
Krivorotova Tatyana/index.html
Outdated
| <img src="images/montue_cloud.png"> | ||
| <div id="g"> | ||
| <div id="i"> | ||
| <div class="row"> |
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.
hmm, looks like elements from the next 3 rows below - logically is the one entity ( I mean that here is just 4 entities like <span>MON</span><img/><span>22°</span> if I'm correct you need to change this markup to something like
<ul class=row>
<li class="something with display: flex and flex-direction: column">
<span>MON</span><img/><span>22°</span>
</li> and so on
Krivorotova Tatyana/style.css
Outdated
| margin: 0; | ||
| } | ||
|
|
||
| #widget{ |
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's not good idea to use id selector for styling your markup. This selector has big specifity and it will be hard to override it if needed (see https://developer.mozilla.org/ru/docs/Web/CSS/Specificity). In general, you should use classes for this purpose.
| height: 70px; | ||
| margin-left: 20px; | ||
| margin-top: 15px; | ||
| display: flex; |
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.
try to use some ordering for your css properties - there is good example http://codeguide.academy/html-css.html. Order should be consistent for all css rules (if in one you add display before width - do the same for other rules as well)
| padding-inline-start: 0; | ||
| margin-block-start: 0; | ||
| margin-block-end: 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.
The .city-card-schedule__days-list element's padding and margins styles have to be changed in order to be properly displayed on IE/Edge
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 can use padding: 0; and margin: 0; for this purposes. It should overwrite padding-inline-start and margin-block-start, margin-block-end in modern browsers and will work for old
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 works! Thank you
| </head> | ||
| <body> | ||
| <div class="weather-widget"><!-- Widget --> | ||
| <section class="weather-widget__city-card city-card-chicago"><!-- First card "Chicago" (img and name of the city) --> |
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 comments in html are excessive. In general, other developers should understand your markup by semantic (using suitable html tags, verbose class names, good naming for custom elements).
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.
Are class names that I've chosen correct and verbose enough? I mean, there was an issue with first version of names and I would like to know how good it is done now.
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 it's good now 😄 - for now I pretty easily can understand what you do in this file)
No description provided.