public inbox for [email protected]
 help / color / mirror / Atom feed
From: Muhammad Rizki <[email protected]>
To: Ammar Faizi <[email protected]>
Cc: Muhammad Rizki <[email protected]>,
	Alviro Iskandar Setiawan <[email protected]>,
	Arthur Lapz <[email protected]>, Memet Zx <[email protected]>,
	GNU/Weeb Mailing List <[email protected]>
Subject: [PATCH v1 10/11] feat(css): add initial CSS class styles for chat bubbles
Date: Sat, 23 Sep 2023 03:58:16 +0700	[thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>

This CSS is designed for rendering chat bubbles in the list of recent
Telegram group messages.

Signed-off-by: Muhammad Rizki <[email protected]>
---
 style.css | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 54 insertions(+)

diff --git a/style.css b/style.css
index b5c61c9..19d1659 100644
--- a/style.css
+++ b/style.css
@@ -1,3 +1,57 @@
 @tailwind base;
 @tailwind components;
 @tailwind utilities;
+
+
+.chat {
+  @apply grid gap-x-3 py-1
+}
+
+.chat-start {
+  @apply place-items-start grid-cols-[auto,1fr];
+}
+
+.chat-image {
+  @apply row-span-2 self-end;
+}
+
+.chat-start .chat-image {
+  @apply col-start-1;
+}
+
+.chat-start .chat-header {
+  @apply col-start-2;
+}
+
+.chat-bubble {
+  @apply relative block w-fit px-4 py-2 max-w-[90%] rounded-2xl
+  min-h-[2.75rem] min-w-[2.75rem] bg-neutral-900 text-neutral-500;
+}
+
+.chat-bubble::before {
+  @apply absolute bottom-0 h-3 w-3 bg-inherit content-[""];
+  mask-size: contain;
+  -webkit-mask-size: contain;
+  mask-repeat: no-repeat;
+  -webkit-mask-repeat: no-repeat;
+  mask-position: center;
+  -webkit-mask-position: center;
+}
+
+.chat-start .chat-bubble {
+  @apply col-start-2 rounded-bl-none;
+}
+
+.chat-start .chat-bubble::before {
+  @apply content-[""] -left-3;
+  mask-image: url("data:image/svg+xml,%3csvg width='3' height='3' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill='black' d='m 0 3 L 3 3 L 3 0 C 3 1 1 3 0 3'/%3e%3c/svg%3e");
+  -webkit-mask-image: url("data:image/svg+xml,%3csvg width='3' height='3' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill='black' d='m 0 3 L 3 3 L 3 0 C 3 1 1 3 0 3'/%3e%3c/svg%3e");
+}
+
+.avatar {
+  @apply relative inline-flex;
+}
+
+.avatar > div {
+  @apply block aspect-square overflow-hidden;
+}
-- 
Muhammad Rizki


  parent reply	other threads:[~2023-09-22 20:59 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-22 20:58 [PATCH v1 00/11] Refactoring and Add New Features Muhammad Rizki
2023-09-22 20:58 ` [PATCH v1 01/11] style: remove extra newline at end of file Muhammad Rizki
2023-09-22 20:58 ` [PATCH v1 02/11] feat(static/img): add `profile-cover.jpg` Muhammad Rizki
2023-09-22 20:58 ` [PATCH v1 03/11] refactor(page): improve page design and add profile image cover Muhammad Rizki
2023-09-22 20:58 ` [PATCH v1 04/11] feat(page): improve UX for copying text Muhammad Rizki
2023-09-22 20:58 ` [PATCH v1 05/11] chore(page): add newlines to enhance Developer Experience Muhammad Rizki
2023-09-22 20:58 ` [PATCH v1 06/11] feat(page): add GNUWeeb member list UI Muhammad Rizki
2023-09-22 20:58 ` [PATCH v1 07/11] feat(page): add `getOrgMembers()` function Muhammad Rizki
2023-09-22 20:58 ` [PATCH v1 08/11] feat(page): add `renderMemberList()` function Muhammad Rizki
2023-09-22 20:58 ` [PATCH v1 09/11] feat(page): add initial UI for displaying recent group messages Muhammad Rizki
2023-09-22 20:58 ` Muhammad Rizki [this message]
2023-09-22 20:58 ` [PATCH v1 11/11] feat(page): implement chat bubble message rendering Muhammad Rizki
2023-09-23  3:15   ` Ammar Faizi
2023-09-23  8:43     ` Muhammad Rizki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox