Skip to content
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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Dz 02 html #2

wants to merge 3 commits into from

Conversation

dimik2010
Copy link
Collaborator

No description provided.

Copy link

@DmitryMakhnev DmitryMakhnev left a 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">

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Чекбокс должен быть вынесен в отдельные базовые компоненты и иметь класс элемента блока todos-item

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

А в чем минус моего подхода? Сложнее потом до него добираться?

Copy link

@DmitryMakhnev DmitryMakhnev Jan 29, 2018

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" >

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

зачем обёртка?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Подумал, что логично распределить пространство с помощью оберток, а в них уже добавлять элементы. на случай, если придется к тексту добавить что-то еще

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">

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Фильтры должны быть отдельным базовым компонентом
  2. В нашем вексе не может быть 2 модификатора __active

Copy link
Collaborator Author

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 расположить на одном уровне?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 пункт про нейминг и отлеьный файл стилей

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 {

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 {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Зачем здесь обёртка?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

с помощью нее определяю положение элементов внутри. чтобы и невидимый, и видимый чекбоксы располагать относительно нее

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;

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%;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Очень странно: элемент в 50% ширины обёртки

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Я подумал, что тогда изменяя размер обертки, например, при изменении размеров всех элементов, за счет того, что они автоматически подстроятся будет проще.
В чем недостаток использования процентных высоты и ширины?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

А, кажется понял. Имеется в виду, что он должен быть полностью во всю обертку?

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%;

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;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Зачем?

Copy link
Collaborator Author

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%;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Зачем?

Copy link

@DmitryMakhnev DmitryMakhnev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Жду изменения по итогам ревью

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants