Suna
Suna
KPCKevin Powell - Community
Created by Suna on 6/4/2024 in #front-end
Keep absolute positioned item in the same place regardless of the screen size
ah alright. Gonna try it out. Thank you!
7 replies
KPCKevin Powell - Community
Created by Suna on 6/4/2024 in #front-end
Keep absolute positioned item in the same place regardless of the screen size
i am currently using percentage. I am not entirely sure how to calculate viewport units? any hints?
7 replies
KPCKevin Powell - Community
Created by Suna on 6/4/2024 in #front-end
Keep absolute positioned item in the same place regardless of the screen size
i think i got it. if i do:
x: Math.floor((x / rect.width) * 100),
y: Math.floor((y / rect.height) * 100)
x: Math.floor((x / rect.width) * 100),
y: Math.floor((y / rect.height) * 100)
it stays almost the same regardless of the screen size. I had y / rect.width and didn't notice it untill now
7 replies
KPCKevin Powell - Community
Created by Suna on 1/25/2024 in #front-end
Creating a speech bubble tail using linear gradient
No description
13 replies
KPCKevin Powell - Community
Created by Suna on 1/25/2024 in #front-end
Creating a speech bubble tail using linear gradient
Played around with it some more but still no result. Now I understand why having multiple lines makes it tricky. I think the tail's background shoud match the message's only if it's one line.That should making it less tricky. Clip path is tricky 😅. Gonna try again tomorrow 🤔
13 replies
KPCKevin Powell - Community
Created by Suna on 1/25/2024 in #front-end
Creating a speech bubble tail using linear gradient
thanks. I'll try this out. Don't have a lot of experience using clip-path should a good learning opportunity.
13 replies
KPCKevin Powell - Community
Created by Suna on 1/25/2024 in #front-end
Creating a speech bubble tail using linear gradient
No description
13 replies