-
Notifications
You must be signed in to change notification settings - Fork 0
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
Dz 02 html #2
base: master
Are you sure you want to change the base?
Dz 02 html #2
Conversation
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.
Пожалуйста, пересмотрите лекции по композиции лайаута и по методологиям вёрстки
</div> | ||
<div class="todos-items-list"> | ||
<div class="todos-item"> | ||
<div class="todos-item_done-mark-wrap"> |
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.
Чекбокс должен быть вынесен в отдельные базовые компоненты и иметь класс элемента блока todos-item
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.
А в чем минус моего подхода? Сложнее потом до него добираться?
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.
Нужно научиться работать с базовыми компонентами и понять принцип их реиспользования
<button class="todos-item_delete" aria-label="Delete item"> | ||
<div class="todos-item_delete_icon"></div> | ||
</button> | ||
<div class="todos-item_text-wrap" > |
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.
зачем обёртка?
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.
Подумал, что логично распределить пространство с помощью оберток, а в них уже добавлять элементы. на случай, если придется к тексту добавить что-то еще
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.
Лучше избегать обёрток, пока они не понадобились
<button class="todos-status-bar_filters_filter __active" aria-label="Show all items" data-filter="all"> | ||
<div class="button-text">All</div> | ||
</button> | ||
<button class="todos-status-bar_filters_filter __active" aria-label="Show done items" data-filter="all"> |
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.
- Фильтры должны быть отдельным базовым компонентом
- В нашем вексе не может быть 2 модификатора
__active
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.
по поводу первого пункта - если я его вынесу за пределы todos-status-bar
каким образом мне тогда все эти три div'a расположить на одном уровне?
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.
1 пункт про нейминг и отлеьный файл стилей
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.
«каким образом мне тогда все эти три div'a расположить на одном уровне?»
Посмотрите примеры разбора вёрстки элементов списка. Там такой же лайаут на самом деле
@@ -0,0 +1,49 @@ | |||
.todos-input { |
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.
наверное это не просто инпут, а больше похоже на добавление, к тому же при таком нейминге получается боль с todos-input_input-text
overflow: hidden; | ||
} | ||
|
||
.todos-item_done-mark-wrap { |
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.
Зачем здесь обёртка?
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.
с помощью нее определяю положение элементов внутри. чтобы и невидимый, и видимый чекбоксы располагать относительно нее
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.
Чекбокс не бывает невидимым. Калочка бывает скрыта. Надо просто показывать и скрывать её по по псевдоклассу :checked
border-bottom: 1px solid #e6e6e6; | ||
min-height: 60px; | ||
display: flex; | ||
overflow: hidden; |
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.
Зачем оверфлоу?
} | ||
.todos-item_done-mark { | ||
opacity: 0; | ||
width: 50%; |
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.
Очень странно: элемент в 50% ширины обёртки
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.
Я подумал, что тогда изменяя размер обертки, например, при изменении размеров всех элементов, за счет того, что они автоматически подстроятся будет проще.
В чем недостаток использования процентных высоты и ширины?
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.
А, кажется понял. Имеется в виду, что он должен быть полностью во всю обертку?
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.
Картинка же не резиновая. Поэтому и не может быть в данном чекбоксе резиновых элементов
opacity: 0; | ||
width: 50%; | ||
height: 50%; | ||
margin: 25%; |
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.
не должно быть ни каких процентных марджинов
float: right; | ||
background: none; | ||
height: 20px; | ||
width: auto; |
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.
Зачем?
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.
Игрался с шириной, пытался понять логику работы. почищу
} | ||
|
||
.todos-status-bar_filters { | ||
width: 100%; |
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.
Зачем?
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.
Жду изменения по итогам ревью
No description provided.