DEV Community

Cover image for Clock In, Clock Out: Office Life through CSS Art
Pranamya Rajashekhar
Pranamya Rajashekhar

Posted on

Clock In, Clock Out: Office Life through CSS Art

Frontend Challenge CSS Art Submission

This is a submission for Frontend Challenge: Office Edition sponsored by Axero, CSS Art: Office Culture.


Inspiration

Welcome to the cubicle jungle - rendered entirely in HTML and CSS!

In this creative project, I decided to bring the quiet chaos of office life to the screen using nothing but pure CSS art. No JavaScript - just lines of code mimicking office chairs, cluttered desks, blistering hot coffee straight from the coffeemaker, and even that one perpetually malfunctioning printer out of ink. The idea? To capture the quirks of the everyday workspace digitally.

To add a touch of charm and personality to the project, I implemented cursor trails that follow the mouse pointer in the form of footsteps. This subtle detail playfully represents the daily pattern of clocking in and out of office life. This effect ties the theme of representing the daily office life together both visually and metaphorically.

Now, make sure to dive in, take a seat, and donโ€™t forget to clock out!๐Ÿ˜‰


Demo

Hereโ€™s the live demo of my project in Codepen โ€” a snapshot of everyday office life crafted entirely with HTML and CSS. From the desk and chair to the glowing monitor and ambient details, every element was hand-coded to mimic a familiar workspace vibe.

If you'd like to view the full-screen demo in your own browser or check out the code, you can use the links below:

๐Ÿ’ป Live Demo โ€“ Best viewed on desktop for the full experience!
๐Ÿ“‚ GitHub Repository โ€“ Explore the source code, structure, and animations behind the scene.

(P.S. Remember to hover around and catch a few animations in action!)


Journey

At first, I just wanted to build something simple; perhaps a desk, a laptop and a chair. But then I realized the desk looked rather empty๐Ÿ˜… which I did not like at all. So, I found myself planning out an extensive scene, with other items such as a lamp, phone, printer, files and folders, plants and sticky notes.

But I realised I needed something to simulate a real-life office environment but I was not sure how I would do anything complicated without the help of Javascript ๐Ÿค”. I decided I could simulate a path of footsteps following the cursor trail; from and to the office chair which was possible in CSS, and was an ode to the 9-to-5 we are so familiar with.

A short GIF showcasing the cursor trail implemented

After sketching out the entire scene, I wanted to take it a step further by adding animations to enhance interactivity and inject a bit more fun into the project. By making use of Keyframes and some simple hover effects, I was able to bring several elements to life. Hereโ€™s what animates in the scene:

  • The office chair ๐Ÿช‘ shrinks on hover - like someone just sat down.

  • The lamp lights up ๐Ÿ’ก(because what's an office without some late-night overtime?).

  • The laptop screen ๐Ÿ’ป and keyboard subtly glow on hover.

  • The phone screen ๐Ÿ“ฑ lights up, ready for that never-ending call.

  • The potted plant ๐ŸŒฑ shakes, giving a touch of life to the space.

  • The coffee cup โ˜• trembles on hover โ€” with a little surprise message! Ouch!

  • The printer paper ๐Ÿ–จ๏ธ shakes, as it is still out of ink (as usual).

These playful details not only added character, but made the entire experience feel more dynamic and immersive.

There were moments when I hit a wall โ€” like figuring out how to make trapezium shapes for the chair or choosing a background that felt just right. But every roadblock led me to learn something new, thanks to the many blogs and resources I discovered along the way (separate section for these resources below).

I also utilized CSS media queries to enhance responsiveness - specifically, I hid the section containing the footstep cursor trails when the browser window became too small, ensuring the layout remained clean and uncluttered on smaller screens.

One feature Iโ€™d love to explore next is adding sound effects๐ŸŽต especially when tied to animations, since they would bring an extra layer of interactivity and personality to the scene. Iโ€™m also considering adding a Day/Night mode toggle, so users can switch between a bright morning office and a cozy late-night work vibe. And to make it more accessible, Iโ€™d like to work on full mobile responsiveness, ensuring the scene adapts well to smaller screens without losing any of its charm.

Overall, I really enjoyed building this project - it was a fun blend of creativity and code, and Iโ€™m definitely looking forward to taking on more challenges like this in the future.โœจ


References and Resources:

Throughout this project, I often found myself stuck or unsure how to bring certain elements to life โ€” and these amazing resources were my go-to guides:

  • This fantastic blog that kickstarted my entire CSS Art journey, laying the foundation for everything that followed.

  • This helpful site that was a great reference and helped me add depth and realism to my items using box-shadows.

  • This brilliant reference that rescued me when I was struggling with creating trapeziums for the chair and the laptop.

  • This creative blog that introduced me to the magic of cursor trails โ€” an effect I now love.

  • This visually inspiring site that helped me choose the perfect background to tie the whole scene together.

Big thanks to these creators โ€” their work made mine possible. ๐ŸŒŸ


TL;DR: I decided to try my hand at CSS Art, and it turned out much better than I expected. ๐Ÿ˜

Whether you liked this post or found a few bugs, Iโ€™d love to hear your thoughts - feel free to like and drop a comment!

Top comments (4)

Collapse
 
sarahokolo profile image
sahra ๐Ÿ’ซ

Amazing workโœจโœจ

Collapse
 
pranamyark profile image
Pranamya Rajashekhar

Thank you so much! <3

Collapse
 
cristea_theodora_6200140b profile image
Theodora Cristea

Your work looks amazing!๐Ÿ‘ I really love the details and the colors.๐Ÿ˜
Congratulations, and good luck in the competition!
Iโ€™m looking forward to seeing your next creation!๐Ÿ‘

Collapse
 
pranamyark profile image
Pranamya Rajashekhar

Thank you Theodora! :)

Some comments may only be visible to logged-in visitors. Sign in to view all comments.