Skip to content

NoonPanirSabzi/chat-app-css

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Chat app CSS illustration

Table of contents

Overview

Screenshot and live site URL

Desktop Mobile
desktop Mobile

Live Site URL

My process

Built with

  • HyperText Markup Language
  • pure Cascading Style Sheets for visuals

What I Learned

  1. CSS clamp for responsive sizing
    how to create a range of values that decreases as the viewport gets larger:

    clamp(75px, 625px - 22.6vw, 300px);

    As the viewport width increases, the subtracted value (22.6vw) grows, which makes the overall result smaller.

  2. Creating negative values in CSS
    In CSS, you can create negative numbers by using the calc() function. For example:

    calc(0px - 10px)  /* results in -10px */
  3. Handling decorative boxes with overflow
    At first, I placed decorative boxes inside the <body> and used position: absolute. However, when I set body { overflow: hidden; }, it also clipped the <main> content. The solution was to place the decorative boxes inside <main> instead. Since the boxes are absolutely positioned, they are taken out of normal flow, while <main> still sizes itself based on the content. This way, applying overflow: hidden to <main> achieves the desired effect without clipping the actual content.

  4. Controlling flex container width
    In a row flex container with lots of horizontal space, the container will try to stretch and occupy all available width—even if child elements have fixed widths. One way to control this is:

    • Give children a fixed width.
    • Set the desired gap between them.
    • Then set the container’s inline-size (or width) to fit-content.

Author

Inspired by

About

challanging my css skill. built with pure css

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published