-
Notifications
You must be signed in to change notification settings - Fork 1
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 input #22
base: master
Are you sure you want to change the base?
Dz input #22
Conversation
Добавляю преподавателя (@GSemikozov) для код-ревью. |
Решение было обновлено, посмотрим что скажет @GSemikozov |
07-lection5/04-input/input.css
Outdated
@@ -0,0 +1,72 @@ | |||
.inputs { |
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.
.input
07-lection5/04-input/input.css
Outdated
display: inline-block; | ||
} | ||
|
||
.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.
.input__control
07-lection5/04-input/input.css
Outdated
padding-right: 40px; | ||
} | ||
|
||
.input_label { |
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.
.input__label
07-lection5/04-input/input.css
Outdated
} | ||
|
||
.input_label { | ||
border: 1px solid #DDE2E5; |
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.
а точно лейблу нужен этот бордер?
07-lection5/04-input/input.css
Outdated
border: 1px solid #374FC7; | ||
} | ||
|
||
.input_success:focus { |
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.
см выше (модификатор - у блока, а фокус - будет у элемента)
07-lection5/04-input/input.css
Outdated
} | ||
|
||
.input::placeholder { | ||
font-family: 'Inter' sans-serif; |
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.
все лишнее и дублирует стили для самого инпута, так что уносим туда. Здесь - только цвет
07-lection5/04-input/input.css
Outdated
height: 24px; | ||
position: absolute; | ||
top: 50%; | ||
left: 310px; |
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.
right; 16px попроще и понадежнее
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.
а показываем нужную в зависимости от модификатора блока
07-lection5/04-input/index.html
Outdated
<body> | ||
<body> | ||
<div class="inputs"> | ||
<input type="text" class="input input_label" placeholder="Placeholder" /> |
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.
input_label - это не модификатор элемента, здесь это не нужно) зато нужен полноценный лейбл, который на макете сверху
07-lection5/04-input/index.html
Outdated
|
||
<div class="inputs"> | ||
<div class="input__icon input__icon_succes"> |
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.
и тогда иконки и инпут надо завернуть в общий враппер, чтоб они нормально позиционировались
box-shadow: 0px 1px 1px 0px #339AF01A; | ||
} | ||
|
||
.input__success { |
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.
.input_success .input__control {}
border: 1px solid #374FC7; | ||
} | ||
|
||
.input__success:focus { |
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.
по анлогии
border: 1px solid #374FC7; | ||
} | ||
|
||
.input__invalid { |
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.
.input_invalid .input__control {}
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.
и ниже надо исправить по аналогии
transform: translateY(-50%); | ||
} | ||
|
||
.input__icon_succes { |
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.
.input_success .input__icon_succes { display: block; }
и ниже по аналогии
Добавляю преподавателя (@GSemikozov) для код-ревью. |
No description provided.