CSS Logos: Figma logo

I'm a full-stack developer from South Africa 🇿🇦. I love writing about JavaScript, HTML and CSS.
Search for a command to run...

I'm a full-stack developer from South Africa 🇿🇦. I love writing about JavaScript, HTML and CSS.
OMG, I can't believe this. It's amazing how powerful CSS is.
Is it possible to upload a CSS logo to a social media profile?
Well, you could always download your CSS art as an image and use that?
Thanks Estee 💖
Most of you know me for my consistency, a golden arrow in my blog series. I've written 1000 articles in 1008 days! Almost an article a day, and my honeymoon was the only holiday I ever took. I'm super proud of this achievement; it has been a fantasti...

It's not the first time I'll be talking about community. I think it's an essential aspect of any successful tool. This shows in my previous explorations of Astro, Medusa, and now Vendure as well. All these products thrive in a super open, welcoming, ...

The cool part about Vendure is how easy it is to set up and how abstract each layer is. Basically, we get the following elements: External database Server Worker Admin UI Frontend While this is amazing, it also brings a bit of complexity when it co...

The previous article looked at customizing Vendure on a data and process level. In this article, we'll look at customizing emails, as they are often a big part of a webshop system. We'll be looking at two different layers of customization for customi...

Even though Vendure is a pretty significant project out of the box, in some cases, we might want to go in and modify some elements to work to our specific use case. In this article, I'll take a high-level look at some elements we can customize within...

While creating the CSS Slack logo I couldn't help but think it looks a lot like the Figma logo in the primary setup.
So why not look at how we can create the Figma logo in CSS.
The logo looks like this:

Much like we've seen with the grid solution for the slack logo, we could also opt to make this with a grid.
Or we could use flexbox for this one.
Since I couldn't choose, I'll do both, and you can decide which one looks neater.
We can use single grid element options for the grid that will get auto-placed on a 2x3 grid.
We force two elements per row for the flex and wrap them. This way, we achieve the same output.
The corners will be the same as we saw for the Slack logo, but as you can tell, these all have different shapes, so the best bet is to state it for each element.
The HTML for this project will be two times the same, but we will change the main wrapping class.
<div class="figma-flex figma-grid">
<div class="block red"></div>
<div class="block orange"></div>
<div class="block purple"></div>
<div class="block blue"></div>
<div class="block green"></div>
</div>
We can choose either figma-flex or figma-grid in the above HTML.
Then we can add some styling that is needed for each block, which will make them a certain size:
.block {
width: 5rem;
aspect-ratio: 1;
}
Now we can add the colors for each block and give them the needed border-radius. Since every color has a different border-radius, this is the easiest way.
.red {
background: #f24e1e;
border-radius: 50% 0 0 50%;
}
.orange {
background: #ff7262;
border-radius: 0 50% 50% 0;
}
.purple {
background: #a259ff;
border-radius: 50% 0 0 50%;
}
.blue {
background: #1abcfe;
border-radius: 50%;
}
.green {
background: #0acf83;
border-radius: 50% 0 50% 50%;
}
This should now take care of all the block styling, and at this point, we should have all the blocks available but not ordered correctly.

Let's start by trying to order them in flexbox, which is as simple as adding the following classes.
.figma-flex {
max-width: 10rem;
display: flex;
flex-wrap: wrap;
}
Note: The
max-widthis twice the size of one block!
And this already takes care of everything for the flex solution. For the grid we can use the following code:
.figma-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
max-width: 10rem;
}
And as you can see, it's super similar to the flex solution. We choose to show two columns so that the rows will auto-flow. Then we make sure the max-width doesn't exceed.
You can find the complete result in this CodePen.
Thank you for reading my blog. Feel free to subscribe to my email newsletter and connect on Facebook or Twitter