Skip to content

Commit

Permalink
feat: Scroll in notes
Browse files Browse the repository at this point in the history
  • Loading branch information
lucia-gm committed Sep 3, 2018
1 parent 00b9f32 commit 9b8eab0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
3 changes: 2 additions & 1 deletion app.js
Expand Up @@ -16,7 +16,8 @@ function addNote() {

note.classList.add('note');
note.classList.add(form.color.value);
note.innerHTML = text;
note.innerHTML = `<div class='note-text'>${text}</div>`;
deleteButton.classList.add('note-delete');
deleteButton.innerHTML = '&times;';

note.appendChild(deleteButton);
Expand Down
2 changes: 1 addition & 1 deletion index.html
Expand Up @@ -10,7 +10,7 @@
<body>
<h1>Note Taking App</h1>
<form>
<textarea name="formNoteText" id="formNoteText" cols="50" rows="8" maxlength="100"></textarea>
<textarea name="formNoteText" id="formNoteText" cols="50" rows="8" maxlength="300"></textarea>
<select name="formColor" id="formColor">
<option value="none">Select color</option>
<option value="red">Red</option>
Expand Down
5 changes: 5 additions & 0 deletions style.css
Expand Up @@ -39,6 +39,11 @@ textarea {
position: relative;
}

.note-text {
height: 100%;
overflow-y: scroll;
}

.note::after {
content: '';
position: absolute;
Expand Down

0 comments on commit 9b8eab0

Please sign in to comment.