Syntax Video
The BIGGEST CSS Web Dev Battle Tournament Ever | Round 1 | Left Bracket
Transcript
In my hands is the first ever Mad CSS trophy which will be used to crown the best CSS coder. And competing for this trophy are these 16 web developers.
We pulled some of the biggest heavy hitters in web development to battle it out in the Mad CSS bracket tournament. But only one can claim this trophy. Oh, I'm nervous. I dedicated my entire life to HTML and CSS. I'm ready. [laughter] Uh, I'm I'm feeling pretty unconfident, I have to say. So, [laughter] we'll see.
I'm just signing myself up to be humbled. Like, why did I do that? This is the biggest head-to-head coding battle we have ever hosted. There will be upsets. There will be heartbreak. Did I just forget how to center text? There will be absolutely cursed layouts. I did. I'm CJ from Syntax. Welcome to Marchm CSS. Today we're taking a look at the first four battles in the left bracket.
Contestants, meet your opponents. I'm going against who? I kind of just want to throw in the towel already. [laughter] Oh, you shouldn't. The format is simple. We've got head-to-head battles where devs will attempt to recreate a UI with HTML and CSS. They've got 2 minutes to plan and 15 minutes to build. The first player to reach a 100% match or the highest match percent when the time is up wins.
Oh, so if you lose, you just the floor opens up and you fall through. And this is the UI you'll be recreating.
Okay, so it's interface. [laughter] I wanted to draw some uh squares on the screen, not the interface. All right, let's take a quick second to break down what our competitors are looking at in this battle screen here. So, in the top right corner is the target. This is what they are trying to recreate. The top left corner is their preview. So, whatever code they write, they can preview what that looks like in the top left. The bottom left is the diff view and probably one of the most important views because that lets the competitor know how close they are to the target.
Their preview needs to be exactly in the same spot as the target. And as you'll see, even being off a pixel or two will not get you to 100%. So keep an eye on that view as our competitors are working towards 100% to match this target. Yeah. So I know this thing supports Tailwind. We'll see if I use it or not. It might not be faster if I can't use like the built-in font sizes and colors and stuff like that, especially if the elements are already there. I don't know. Maybe I'll do it the oldfashioned way for fun here. Seems pretty straightforward. And I think it's just going to be a race of speed CSSing, I guess, cuz right, we already have the HTML. So, rock and roll. Oh, this is making me more nervous then cuz it's not just like a quality situation. It's a speed. It's like racing. How did I not know that there's a timer? Obviously, it's racing.
I think I have a pretty good setup going on right now. Now, I hope me and 15 minutes also feels that way. I don't know. We'll see. I don't think it'll be too bad. I'm trying to look at the structure here of everything. So, we got our input buttons directly below that paragraph tag expans. So, yeah, flexbox is probably going to be the perfect fit for this cuz it's like a one-dimensional stack and everything else is stacked inside.
I think I'm going to get 100% on this. I realize that I have a little bit of a home field advantage. We do these CSS battles a lot. This is a little bit different than what we're used to. I'm going to Oh, that uh that got me right there. Oh my god. Okay.
And we're off now. Scott is immediately locking in the CSS selectors. This man knows how to CSS battle. Beautiful. We're cooking. We are cooking with gas. Nice. Shai locking in that background color. That's a little bit of a confidence boost. We love to see it. I'm doing something wrong already. Okay. Shai's already got the background color. So body, we'll do bg var white.
I'll do a container with a margin top of something like 100 pixels. That's way too much. Let's do 80 pixels. Okay. With a headline, we'll tac at that. What do you want to hallucinate today? The font size is too big. Font size is going to be something like 20 pixels. Uh, my text is not quite right. I don't know why that would be. That's not great. It looks dead on. It looks dead nuts on.
[laughter] Scott built the platform and he doesn't know that the opacity is wrong. There we go. Okay. So, yeah, looking at his death diff his u his text. I think he's got it spot on. I don't remember how to style an ID. How to style. [laughter] Oh, duh. Okay, I didn't have to change that then. All right. Go back to being yourself, girlfriend. You can be #container. Hold on. Let's flex. I feel like Flex Flex knows me. Oh god. Oh god.
What have I done? Is this This isn't great. This isn't great. Shai, what is wrong with you? Okay, abort mission. Yeah, Shondai is coming right along. She's figuring out the layout here. But again, I think it's really going to bite her. I want to see it. Please, Sha, get rid of that width and height cuz that's going to align things so much better. She's going to see it. Let's see. You know, mine's getting pretty close.
Padding 20 pics. It's not exactly there, but it's not exactly not there. Now, the height on mine is not on. So, something in here has margin on it. Yeah. So, there we go. Scott just bumped up to 61%. He locked in the area of that uh header there. Um, shoot. I got to get moving. All right, margin is 10 pixels zero.
Yeah, Scott's feeling the heat. Only 7 minutes left in the first battle here at Mad CSS. And the width, that's too big. But the width could be, you could be whatever you want to be, girl. What do you want to be? Three. Let's do 200 pixels. If this were work, I would alphabetize all of these class names because that's just the level of OCD that I have.
I don't know why this should have the same padding as the other one. So, I don't know why it doesn't. So, I'll say 15 pixels for paddingum. We're going to say margin bottom of 15 pixels here. No. What? Yeah. So, Scott working on this orange button. Width and height is the correct play here because you can work with padding. You can set the font size, but dialing in the width and height on that orange button seems to be the way to get it pixel perfect.
I wish I had more more time more time to sit with you, my dear code. So, I'm noticing that my items are really spaced out vertically, and it's stressing me out. See, I'm like really getting there. 84%. What I don't understand is why everything on mine is just ever so slightly off. I don't get it.
Yeah, we can see Scott's buttons are just a little bit off. I wonder I haven't seen it, but I wonder if he's flexing the container, but maybe not. I think his his padding, his sizing might be just a little bit off on these buttons. Only a minute and a half left. Let's see if if Scott can bump up that 84%. Did I put margin on these? Why would I do that? I'm so stressed out. I'm so stressed out. Why am I so stressed out?
Only one [laughter] minute left. I don't know. I don't know, but this is very stressful. Why is there a gap at the end there? I'm just I'm I'm watching my competition too much. How is he doing this so fast? The guy is a machine. I bumped it up to 85% for Scott. And now back down to 78. He's really just trying to lock in the location of those buttons. With only 30 seconds left, can he get there? I do think this is an upper 90% score if he can get these buttons in the right spot. Okay, it's getting there.
Okay, good enough. Good enough. 25 is is close enough. All right, 10 seconds left. Let's see what our competitors can pull out. And then um No, my biggest challenge here. And I think And the time [laughter] is up. Wow, that time went quick.
So fast. [laughter] Scott, you whooped me. Whooped. Well, you got locked in on setting the width and the height of the container at the beginning, but I think if you get rid of that and kind of like let your grid and flexbox kick in, that probably would have been a little bit better. And I usually use flex. I should have just stuck with flex cuz I I know how to use flex. But um all good. This is this is a lot of fun actually.
No, this Yeah, this is a great battle. Um yeah, thank you so much, Shandai. But Scott, you are heading on to the next battle. [laughter] That wraps up battle one. Scott will be moving on to face Bri or Chris. Let's head over to their battle now. What's that? I'm getting word that this video is brought to you by Sentry. Just like everywhere else, we got to pay the bills here. We are sponsored by Century. Everything we do here at Santex is brought to you by Century. The series, the podcast, everything. They're the world's best air monitoring platform. We use it. I use it personally. You should definitely give it a try. All right, back to the video.
Okay, here we go. Jeepers creepers. I'm using cursor today. Hopefully the AI autocompletes aren't too crazy on me. Let's see. Let's just get going on the body. Is it That's the white background color white. Oh, I'm letting cursor do work for me already. That feels right. So, if I hit save, is it going to go to the color I want? Yes, that looks matched perfectly. I think the whole thing is text align center.
I'm going to change the body background color to white just for now so I can see and make sure everything's working and that it looks good. Perfect. And then for the background color, I'm going to change it to what is this? Dark gray. We're seeing the competitors have AI autocomplete turned on. We'll see if it bites them cuz it is suggesting quite a bit. We can see in Breeze editor. It's like, do you want to use all this CSS?
That doesn't look right. I think the margin is is uh they're expecting me not to have zeroed out that famous 8 pixels of margin on it. So, I have to remove that and then it's going to be 65. I don't know. That doesn't look. It says five pixels numbers. What's going on there? Did I just forget how to center text? I did. Not [laughter] Not me on Stack Overflow looking up text align. That's almost as bad as centering a div.
So pre-searching for center text in HTML. It's fantastic. Yeah. Text align center. You know, we've said it for all the competitors. The nerves get you here. You forget everything. You could have been doing this for 15 years and the nerves get to you and you'll forget. It happens to the best of us. All right, describe your billion dollar idea. That's the placeholder, isn't it?
Placeholder. The color there is is white, but it's going to be var white, right? Var white. Do I get points for remembering exactly what that was? I hope so. I forgot about this thing down here. Is that helpful? Like is which one is mine and which one is theirs? All right, so mine is the one on the left.
That is pretty useful. I think [laughter] Chris messing around with the diff now. Again, this is the participants first time using the platform. There's a lot of nerves here. It's not easy. I want to see you watching at home. I want to see you try this. Um, now the height is seems a little wrong on the input box, right? Where did I set that height is like 105 pixels or something. Ooh, why' that go so wrong?
What happened? It It happened again. This little like the like the margin bottom on the tagline went crazy again. Who did that? I didn't do that. Oh, and you know what it is? Re is trying to change the color, but it's the placeholder. So, she's going to have to figure out that we're actually changing the color of the placeholder, not the color of the text. I'm asking how I change the text color on a text area or yes, the text color in a text area.
Stud class. Okay, we'll go with it. Does this help me? It did. Perfect. Yeah, look at that. One point for AI. It found the placeholder selector. Now, we need to go ahead and get the button inside. Ah, Chris is at 88%. Okay. Okay. What's the nicest way to do this diff? Oh, for one thing, it's not even in the right spot at all. Mine is too wide. Not wide enough. Four. Is it 420? [laughter] 420, boys.
We want to make the background color orange. Give it a border radius of not percentages. Let's do 40 pixels. Feels like it'll be too much. Oh, it's a circle. Maybe 20. 20 still makes it a circle. Yeah. And Bree's working on the submit button. But again, this diffing algorithm really cares where the elements on the page are. So, I think it would be a better use of her time if she worked on just getting that text aligned. But I think still like getting this button in the right spot, the right size. I think that's going to look good.
That's perfect. That looks very close to perfect. All right. And my placeholder is too big. Can I change the Should I just change the size in here? Font. That's also 15 pixels. Heck yeah. Right. 97%. My color is too white. I need to use light gray instead of white. Light gray. 97%. Only a minute left. This is a nailbiter, folks. Chris is so close. I believe his tagline text is just a little bit off. But this is in incredible play here at Mad CSS. Chris is at 97%. I am actually just prepared to take my happy L. I sure am. Yeah, [laughter] she did go against the heavyweight creator of CSS tricks, creator of Code Pin. This was going to be a tough battle. Really, shout out to Brie for for bringing her her best game today.
No, now mine's way too [music] little. I don't know. Anyway, I don't think I'm getting anything else done in 3 [laughter] seconds, but All right, time is up. Good gravy. He was fast. Amazing battle. Chris, you're so close. Like it's just moving pixels. And like Bri, you had all the elements.
It's just a matter I think your tech your top text was in align. I think if you if you got them in the right spot, you probably would have had like 80 90% too. But wow. Congrats to Chris. You are the winner of this battle. You'll make it on to the next round. Thank you. Looks like Chris will be moving on to compete against Scott in the quarterfinals. Let's move on to the next pair, Julia and Adam.
All right. So, let's get this flex stuff happening in here. We'll do a height of 100 VH. Yeah, that's fine. Let's do DVH. Come on, let's be cool. And yeah, we'll do flex flex direction. Yep, that's all the stuff that I want, honestly. Body with uh background color, which is white. Uh what else do we have here? We have our container, which is I don't care about this right now. Yeah, Julia and Adam, they found that container element with the ID right away. No issues there. Yeah, and it's coming right along. So, Julia's already got that background locked in. Um, she got the color of the the hallucinate text locked in. She's at 10%. There's nothing tricky here. Flexbox five based increments in the pixel units. But if you go for fixed positioning, it's not going to be five based increments.
[laughter] So, we'll we'll see what our competitors do. It's not like this, but okay. I don't want this. I'm just going to use pattern top because I don't see the difference here and uh I want to make it perfect. So uh I need to find the right Oh yeah, it's a letter spacing or no maybe it's a font size thing. I didn't even see that. That's uh whatever 15 probably something like that. Yeah, there we go.
Yeah, you love to see that diff locking in. Adam is is really really so close to the the official solution. And I think those bottom buttons are kind of what's throwing off his match percent. So once he gets those lined up, we might see him surpass Julia's 46%. Oh, Julia's up to uh 66%. She's locked in the border radius. She's locked in the sizing of that uh that input area. Yeah, I'm not seeing Adam's match percent go up. He's getting really close. I wonder what's going on here. I've been alerted by someone on the inside. His background color is not correct. I didn't even notice it. That actually might be what's keeping him below Julia's score because he's locked in the button sizing. He's so close here.
Uh, I don't know. Okay, color doesn't matter. Let's go to suggestions, which is display flex gap. What happened to Adam's progress? Looks like he's already done. Uh, but it's not working yet. Give it a fixed height and fixed width and border radius of 10 pixels or something like that. And whatever. Just kill this for a second. What have I done?
Okay. Okay. Now I see it's too No. Why? What's What's happening here? Uh, not the right color. Text area. Light gray. Gray. Oh, sorry. Not this one. I guess here is just gray. I'm going to use inspector because I don't remember how to set up the color for the placeholder.
Julia crossed that 90% threshold. This might be what she needs to take home the win. Only a minute and a half left. Is he going to notice his background color is using the wrong variable? All right, this is crazy. The diff view is a little bit darker and so he might be thinking that's the diff view, but if you look at his target element, it has that darker background. So only a minute left. Let's see if he he goes back up and and and notices this, but I I don't think he's going to. Oh, and Julia's dropped back down to 88.
All right, we're getting close. It looks close, but not exactly the same. It seems like Julia's going to stick around the 90% mark. Let's see if she can she can dial it in. Yes. Yes, it's 15 pixels. Uh, it means that this should be five. No, 10. Yeah. 10 seconds left. Just a few minor tweaks. We can see Adam's diff view, but it's not telling him the background color. This is so unfortunate. I'm so curious what his match percent would be if he had the right background color. And that's it. Time is up. Great job, Adam.
You had the wrong background color. I think that's why your percentage match is so low on the overall element. It's just a It's just like t It's gray instead of beige. Oh, well, what can you do? It's too focused on the layout. It was so Everything else was so aligned. It was crazy to see. Um, but I think even Julia with 90% like this this if you would have changed the background color, I I almost think you guys would have had it even. This this it looked like it wasn't a close race, but it was a very close race.
Yeah. And I was super super nervous like what's what's happening with uh with this battle because I see that Adam is so close. It's not even like 50%. [laughter] What What the hell is happening? Maybe my numbers are wrong or something happening. It was fun to see the creator of Tailwind writing real CSS instead of uh CSS uh instead of Tailwind class names.
So that was really fun. I think people are going to enjoy that. Congrats to Julia. You'll be competing against either Kyle or Jason. Let's tune in to their battle now. So let's see. What did I call this container? [music] Just called container. There we go. So we'll say the display on this is going to be flex flex direction column. There we go. I want to have it centered. Oh, that's Yeah, if we just turn down the opacity. Yeah, I can see what I'm doing over here.
Yeah, and Kyle immediately in it with a flex box. So, he's he's flexing that container, centering everything. I think this is a good plan. If you look at the target, everything is centered down the middle. So, I would assume flexbox in this case as well. I'm just going to start by getting the colors in place because I think that's going to help me reason my way around this. So, there's that. That's not right. So, that's going to be the light gray. Maybe light gray. Nope, that's not it either. It's going to be what color is this? Dark purple, gray. Jesus.
Yeah, Jason's figuring out the colors. And this is one of the aspects of the challenge is you have a bunch of colors sitting there. How are you going to know which one's which? How are you going to know which one plugs in where? Um, let me go back to my container. So, we have a container that does contain everything. So, this should be centering my items. Line items, justify content, flex direction. I'm not 100% sure why that is. I'll get to that later. We'll we'll deal with that when the actual problem comes. Let's go on to the text area, man. [music] So, as the challenge master, I did not think setting the ID instead of a class would be what gets them to hang up here. Uh, it would be very unfortunate if they cannot figure that out by the end of this battle.
Okay, I'm screwing something up. Like, what is what is going on with this container? Oh, it's an ID. Oh my god. Oh god. Jason got it. Jason got it. That's embarrassing. Okay, well that's [laughter] they did that on purpose. How dare you? Switching to a different keyboard. forgot that I had this one. What is happening? What is going on right now?
I'm absolutely falling apart. Why? Oh man, why is things move? Oh, I need to change this to 450 as well. Okay, there we go. [music] Uh, that's too big. It's just like not centered. I don't know what is wrong with my centering. This is so weird cuz it looks like it's maybe not centered in the actual thing. Hm. I am really struggling with this for some reason. It is perfectly centered in my container, but it looks like it's not [music] centered in their container. I will deal with centering stuff later. Uh, famous last words, I'm sure. Kyle is cool, level-headed. He's just plugging away.
He hasn't figured out the container yet. But, uh, he's just getting each of these elements styled, and you love to see it. You just forward progress is really the name of the game here in Mad CSS. There we go. Those are perfectly centered. And then we just need space between our elements. I think I just put a gap on my main container. Hopefully, everything has the same spacing, like 10 pixels. [music] Of course, that's not showing up. I feel like I did something wrong with my container. Container. Oh, it's an it's an ID, not a class. There we go. Wow, that solves all of my problems. Who would have guessed? Okay, he found it. He found the container selector with only six minutes left in the game, and that [music] has uh given him a much better chance. He's bumped up to 34%. So, he's just behind Jason, but uh this is going to help him out a whole lot.
Oh, we're getting close, everybody. We're getting so close. Okay, so then I'm going to make this relative. Then I'm going to come down here and get this uh this input footer. Oh boy, I'm about to lose I'm about to lose bad. Um, let's go input footer. And that's going to be position [music] absolute.
It's such a close battle. Oh, and we can see that because Kyle had the strategy of style each element. Don't worry about the overall, he got those pills, those buttons locked in. And uh because Jason doesn't have those yet with only two and a half, 3 minutes left, it's going to be really close unless he gets some styles on those pill buttons.
Okay, it looks like it needs to be maybe 35 pixels. That actually looks pretty good. Let's move it to the correct location. So my input footer is like 15 and 15. There we go. I just need to massively increase my font size. So let's see, maybe 30. Yeah, and Kyle's locking it in. That the percentage of the solution just bumping up. Only a minute and a half left. This is a nailbiter. Jason's doing so great. Only 84%. But I don't know if he can get those button styles in the last minute here. Yeah. So Kyle's trying to get that arrow aligned inside of the button. And as the challenge master, I do believe it's just padding that actually gets us there. Cuz it's just ever so slightly off, but he's at 96.99% with only 30 seconds left.
Let's go with padding block of five. Oh, padding block of six. Jesus. Oh, Jason's locking in that button. He's trying to find the exact location of that button. I love it. Wait, 10 seconds left and he better put his code back because he's just reduced his match percent by to 19%.
I think it's so close. We're We're That, my friends, is the battle. I honestly, as soon as I saw that the timer ended, I was like, "Oh, no. I'm out." I thought for sure cuz I I kept looking over at what you were doing and I was like, "Oh my god, he's one step ahead of me the whole way." It was actually hilarious that you guys couldn't both of you couldn't find ID container. I didn't do that on purpose.
Yeah, [laughter] I just assumed everything was fastening cuz the last time I used an ID in CSS was probably like 2002. I [laughter] Yeah. Yeah. You're a monster, CJ. I got hosed because uh my my IDE didn't pick this up as a CSS file. So I was like, why am I not getting any autocomplete? Like nothing's. So I fixed that about maybe a third of the way through, which you know, clearly wasn't enough. [laughter] Like we're not going to say that was the difference maker here, but that wraps up the first round of the left bracket of Mad CSS. Kyle, Chris, Julia, [laughter] and Scott, you'll be moving on to week three. Shandai, [music] Adam, Jason, and Bri. Sadly, this is where your mad CSS journey ends.
And we're just getting started. Next week, we shift to the right bracket. We've got battles featuring Cassie Williams. Why is it like this? West freaking AI autocomplete added a bunch of garbage I didn't even know I had. And the CSS goat himself, Kevin. I hope Amy's struggling as much. I see her square like jumping up and down in a panic.
The competition gets even more intense. I was so confident going into this. I'm feeling competitive now. And we witnessed one of the biggest upsets of the entire tournament. This is Mesus. That was terrifying. I'm going to be fine.
Quote it with credit and a link. Quoting Syntax