Skip to content

Commit

Permalink
Enhance input and textarea styling
Browse files Browse the repository at this point in the history
Apply Roboto font with appropriate fallbacks and adjust direction based on language (RTL/LTR).
  • Loading branch information
miladsoft committed Aug 29, 2024
1 parent 052b878 commit 17adf58
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
9 changes: 7 additions & 2 deletions src/app/components/chat-list/chat-list.component.css
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,14 @@
display: block;
width: 100%;
}

.chat-time {
.chat-message {
font-size: 0.9em;
}
.chat-name{
font-size: 1.2em;
}
.chat-time {
font-size: 0.7em;
color: #aaa;
flex-shrink: 0;
white-space: nowrap;
Expand Down
6 changes: 4 additions & 2 deletions src/app/components/messages/messages.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@ <h1 itemprop="name">

</div>
<div class="chat-input">
<textarea [(ngModel)]="message" placeholder="Type your message here"></textarea>
<button class="btn-angor" (click)="sendMessage()">Send</button>
<textarea [(ngModel)]="message"
[dir]="isRTL(message) ? 'rtl' : 'ltr'"
placeholder="Type your message here"></textarea>
<button class="btn-angor" (click)="sendMessage()">Send</button>
<button class="btn-angor" (click)="toggleEmojiPicker()">😊</button>
<div *ngIf="isEmojiPickerVisible" class="emoji-picker">
<span *ngFor="let emoji of customEmojis" (click)="addEmoji(emoji)">{{ emoji }}</span>
Expand Down
5 changes: 4 additions & 1 deletion src/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,14 @@ textarea {
padding: 12px 16px !important;
border: none !important;
font-size: 14px !important;
color: var(--neut-L30) !important;
color: var(--neut-L70) !important;
transition: background 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
width: 100%;
box-sizing: border-box;
font: 16px "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", "Oxygen",
"Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue",
sans-serif !important;
}

input[type="text"]::placeholder,
Expand Down

0 comments on commit 17adf58

Please sign in to comment.