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 input #22

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

Dz input #22

wants to merge 3 commits into from

Conversation

julia-ma98
Copy link

No description provided.

Юлия Малова added 2 commits December 3, 2024 21:59
@jsru-1
Copy link
Contributor

jsru-1 commented Dec 22, 2024

Добавляю преподавателя (@GSemikozov) для код-ревью.

@jsru-1 jsru-1 requested a review from GSemikozov December 22, 2024 12:05
@jsru-1
Copy link
Contributor

jsru-1 commented Dec 22, 2024

Решение было обновлено, посмотрим что скажет @GSemikozov

@@ -0,0 +1,72 @@
.inputs {

Choose a reason for hiding this comment

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

.input

display: inline-block;
}

.input {

Choose a reason for hiding this comment

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

.input__control

padding-right: 40px;
}

.input_label {

Choose a reason for hiding this comment

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

.input__label

}

.input_label {
border: 1px solid #DDE2E5;

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_success:focus {

Choose a reason for hiding this comment

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

см выше (модификатор - у блока, а фокус - будет у элемента)

}

.input::placeholder {
font-family: 'Inter' sans-serif;

Choose a reason for hiding this comment

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

все лишнее и дублирует стили для самого инпута, так что уносим туда. Здесь - только цвет

height: 24px;
position: absolute;
top: 50%;
left: 310px;

Choose a reason for hiding this comment

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

right; 16px попроще и понадежнее

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.

а показываем нужную в зависимости от модификатора блока

<body>
<body>
<div class="inputs">
<input type="text" class="input input_label" placeholder="Placeholder" />

Choose a reason for hiding this comment

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

input_label - это не модификатор элемента, здесь это не нужно) зато нужен полноценный лейбл, который на макете сверху


<div class="inputs">
<div class="input__icon input__icon_succes">

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 {

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 {

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 {

Choose a reason for hiding this comment

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

.input_invalid .input__control {}

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 {

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

и ниже по аналогии

@jsru-1
Copy link
Contributor

jsru-1 commented Dec 26, 2024

Добавляю преподавателя (@GSemikozov) для код-ревью.

@jsru-1 jsru-1 requested a review from GSemikozov December 26, 2024 19:58
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.

3 participants