-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Develop #1467
base: master
Are you sure you want to change the base?
Develop #1467
Conversation
AnOvramenko
commented
Mar 1, 2025
- DEMO LINK
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.
Great job on meeting the task requirements! 🎉 Your code is functional and well-structured. While there are a few minor improvements suggested, such as renaming the function for clarity and ensuring the SCSS is compiled to CSS, these do not impact the core functionality. Keep up the good work and consider these suggestions for future enhancements! 😊
✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨
@@ -12,6 +12,7 @@ | |||
href="./styles/main.scss" |
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 stylesheet is linked as a SCSS file (main.scss
). Browsers cannot directly interpret SCSS files. You should compile the SCSS to CSS and link the resulting CSS file instead.
src/scripts/main.js
Outdated
function labelAndPholders(inputs) { | ||
for (const item of inputs) { | ||
const el = document.createElement('label'); | ||
|
||
el.className = 'label__field'; | ||
el.setAttribute('for', `${item.id}`); | ||
el.innerHTML = item.name.toUpperCase(); | ||
// el.style.fontSize = '12px'; | ||
|
||
item.placeholder = item.name.charAt(0).toUpperCase() + item.name.slice(1); | ||
|
||
item.insertAdjacentElement('beforebegin', el); | ||
} | ||
} |
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 function labelAndPholders
is named in a way that might be confusing. Consider renaming it to something more descriptive, like addLabelsAndPlaceholders
, to better convey its purpose.
el.innerHTML = item.name.toUpperCase(); | ||
// el.style.fontSize = '12px'; | ||
|
||
item.placeholder = item.name.charAt(0).toUpperCase() + item.name.slice(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.
The placeholder text is set to the capitalized name of the input field. Ensure that the name
attribute of each input field is appropriately descriptive, as this will directly affect the placeholder text.