No video

And they say CSS isn't a programming language! CSS-only games are amazing

  Рет қаралды 110,290

Kevin Powell

Kevin Powell

Күн бұрын

Пікірлер: 159
@raellawrence7116
@raellawrence7116 7 ай бұрын
An insight into how you might handle a mouse click event in pure CSS. Imagine a hidden checkbox that has a ':checked' pseudo selector. You can trigger animations and show/hide other elements based on whether it's clicked. So it's very hacky but also very clever. Taking something like this to the extent of complexity seen here is insanely impressive.
@EvilTim1911
@EvilTim1911 6 ай бұрын
Yeah and also focus and focus-within are a way to have a sort of "state" using only CSS
@c-eagle
@c-eagle 7 ай бұрын
Next step: hack NASA with CSS only. :D
@dand4485
@dand4485 7 ай бұрын
Is that so you can get on the rocket going around the moon...? Then again if you can hack it... Would you feel save you won't be going up in a large Roman Candle only to go POOF!
@c-eagle
@c-eagle 7 ай бұрын
@@dand4485 On the bright side: you could style the moon any way you want! background-color: pink!
@dand4485
@dand4485 7 ай бұрын
@@c-eagle Why pink? Why not do a gradient rainbow? That way we can remember God's promise not not flood the earth with water... Scary thing though, He mentions next time will be with fire...
@PickleNugget-tk6bw
@PickleNugget-tk6bw 6 ай бұрын
Do you know what code is?
@dand4485
@dand4485 6 ай бұрын
@@PickleNugget-tk6bw sorry i don't know what code is, i know asm, C, C++, C#, VB, Cobol (love them 77 and 88 level variables), java/typeshit, and a few more some i've written, but i don't know what code is.
@carstenaltena
@carstenaltena 6 ай бұрын
7:35 The "body { background: black; } is probably the only line of CSS I understand
@ScrollingWithUs
@ScrollingWithUs 6 ай бұрын
What does it do even ?
@mythicvibesmusic
@mythicvibesmusic 6 ай бұрын
@@ScrollingWithUs lol
@TrostCodes
@TrostCodes 7 ай бұрын
You know I LOVE this kind of stuff. I love the wild stuff people can do with checkboxes. Jamie Coulter makes my favorite in this genre!
@commanderkruge
@commanderkruge 7 ай бұрын
The Duck and the Dog are possibly simply in the same div. And that is moved to the left and right with the duck's movement. That way the dog can't be anywhere but right where the duck was. ^^ (my guess.)
@QwDragon
@QwDragon 7 ай бұрын
Same thoughts.
@Jesus0190
@Jesus0190 6 ай бұрын
It seems the JavaScript is just in the HTML part...
@ssava_ema
@ssava_ema 6 ай бұрын
it is not anywhere go visit the code pens for the different games @@Jesus0190
@jlmx
@jlmx 7 ай бұрын
Well, great. I feel incredibly inept now. Great stuff as always! Was great getting to know you a bit at THAT Conference! Keep up the good work as always!
@ScriptRaccoon
@ScriptRaccoon 7 ай бұрын
The trick with rock paper scissors with CSS only is that actually YOU decide what the opponent chooses. The labels for the corresponding states are exactly where you click for your choice and are animating their z-indices but look exactly the same, which is why you don't see the animation. I made a video on my channel explaining this in detail (in German).
@millos0116
@millos0116 7 ай бұрын
Yo this is crazy, making this in css is true art...
@deathmarti
@deathmarti 7 ай бұрын
the maze is the only one that I know precisely how to make, just 6 layers from z index 0 to 5: 0: background with no interaction bound to it 1: walls that onhover causes to remove display none from layer 4 2: win box with onhover to remove onhover on layer 3 3: win layer with onhover to keep layer 3 shown 4: lose layer with onhover to keep layer 4 shown 5: start box for removing onhover for layers 1234
@chrisakaschulbus4903
@chrisakaschulbus4903 6 ай бұрын
But that does not explain how he is kept from consuming the child.
@gregmurdoch3264
@gregmurdoch3264 6 ай бұрын
Those who say it's not a programming language don't understand it. People say HTML isn't a programming language, so why can HTML + CSS, two non programming languages, write websites that are interactive? Great content as usual.
@kantottero3831
@kantottero3831 6 ай бұрын
Sass is a stylesheet language that's compiled to CSS. It allows you to use variables, nested rules, mixins, functions, and more, all with a fully CSS-compatible syntax. Sass helps keep large stylesheets well-organized and makes it easy to share design within and across projects.
@youtube-user73424
@youtube-user73424 6 ай бұрын
So it's created in SASS , which is easier to do, amd the output is CSS? Could that also be done with other languages like python or whatever?
@raggebatman
@raggebatman 6 ай бұрын
​@@youtube-user73424 You could create a Python module to interface with a CSS stylesheet I guess; that's possible using most programming languages, although it's a little silly
@westbrook0853
@westbrook0853 6 ай бұрын
Chat GPT 🤣
@youtube-user73424
@youtube-user73424 6 ай бұрын
@@westbrook0853 good idea! 😀
@youtube-user73424
@youtube-user73424 6 ай бұрын
@@westbrook0853 or Bard might be better
@majkipl9684
@majkipl9684 7 ай бұрын
and I thought my tic-tac-toe in pure css was amazing
@melonenlord2723
@melonenlord2723 6 ай бұрын
And then there is me, who can't center text in the middle of a div.
@nomadshiba
@nomadshiba 6 ай бұрын
never gone this far into css, but im guessing that they are using number input for counting? idk i might be wrong. they might just calculate the count based on some how "counting" the checked checkboxes. maybe they use the css counter? like numbers? but based on checked checkboxes.
@martink.7497
@martink.7497 6 ай бұрын
Of course, we love the CSS, one of the C family programming languages: C, C++, C#, CSS (C Sharp Sharp).
@alexjones420
@alexjones420 7 ай бұрын
The dog knows where the duck is because it knows where it's not.
@mityukov
@mityukov 7 ай бұрын
I remember how some frameworks like React or Vue (even better example, imo) were a shift from "imperative" to "declarative" paradigm. CSS is full-on declarative thing, if to think about it, so why not 😅
@PeterSedesse
@PeterSedesse 6 ай бұрын
This reminds me of when people leveled characters in WOW without using armor. Just doing it the hard way to see if it could be done.
@Coding4Success
@Coding4Success 6 ай бұрын
What an awesome video! I might have to leave my current computer science teacher's class and join Kevin's instead!! 😜😁
@clevermissfox
@clevermissfox 7 ай бұрын
I’m such a css nerd but have no clue how some of these are made. Or when people draw with like one div? Love css and love this channel bc KPow loves css like I do. I nerd out
@tomaskot9278
@tomaskot9278 6 ай бұрын
I still remember when people started making games in browsers using JavaScript. Now people are starting to make games in browsers without JavaScript :)
@vilijanac
@vilijanac 7 ай бұрын
CSS depends on the browser and is not well documented. No, it isn't a programming language. How will as programer know know when to use style or container query on page elements that are part on DOM HTML structure? You teached us about this too.
@ScriptRaccoon
@ScriptRaccoon 6 ай бұрын
"is not well documented" is not true. You can read the CSS spec which is very detailed.
@uzuigwedanielugochukwu6844
@uzuigwedanielugochukwu6844 6 ай бұрын
These css games are mind blowing 😯😯
@jhasani79
@jhasani79 7 ай бұрын
This is mind-blowing. I did not think any of these things was possible!
@SquareballoonCoUk
@SquareballoonCoUk 6 ай бұрын
This is crazy. Must have taken ages for some of them.
@Default64Bit
@Default64Bit 6 ай бұрын
The maze one I'm 100% sure is just :hover if you hover over pink elements the lose animation triggers and if you hover over the green box the win animation
@creativeprogrammer2848
@creativeprogrammer2848 6 ай бұрын
Actually there is html pre-processes like .pug support inbuilt javascript so you need to check html.pug file which you clearly see javascript used in .pug file. There is some event can not build with javascript.😂
@yyydollars8456
@yyydollars8456 4 ай бұрын
The duck game had JavaScript embedded in the html, you can see the const sprites statement in the video
@Electroboy300
@Electroboy300 6 ай бұрын
amazing projects
@DiamondWolfX
@DiamondWolfX 6 ай бұрын
Is CSS Turing complete? Can it run doom?
@bdnugget
@bdnugget 6 ай бұрын
"A pure CSS horror" Yeah
@mintx1720
@mintx1720 6 ай бұрын
Cascading Server Sheet!
@elimcfly350
@elimcfly350 6 ай бұрын
Man, I made a Connect Four project a few years back and it took me forever to even get the method that checked for a win to work correctly. Then someone does it with just CSS and it looks and plays better than mine lol There's always someone better out there.
@aladdinalmasabli4382
@aladdinalmasabli4382 6 ай бұрын
6:26 js in HTML?
@danielzaiser
@danielzaiser 6 ай бұрын
for "the caretaker" you said you are interested in knowing how it works, but don't go to the inspect elements :D
@wolandsmachine
@wolandsmachine 6 ай бұрын
I'm convinced that you can make anything in any language if you know it inside and out and are willing to spend countless hours on it.
@watchmytvjctechnology8448
@watchmytvjctechnology8448 6 ай бұрын
I don't know if I'm the only guy notice that, how is it possible to handle collision detection for the space invader and which css property that can check if two stuffs matched like in the puzzle game. I don't know anything about codepen, but i still believe the javascript is inside the html, maybe I'm wrong.
@jlambert12013
@jlambert12013 5 ай бұрын
I saw recently where someone created a Single Page Application (SPA) using only css for routing. What are your thoughts or how might you implement this? 🤔
@toddcamnitz6164
@toddcamnitz6164 6 ай бұрын
I think it’d be nice to see your deep exploration of The Caretaker as a seed for explaining advanced css concepts
@scottfrost317
@scottfrost317 6 ай бұрын
Hey Kevin. I’ve checked out your content from time to time, I didn’t realize you were in NS. I’m in Moncton. I frequent NS often. I’ll have to buy you a pint for some tips I’ve learned from you.
@rafalpotasz
@rafalpotasz 6 ай бұрын
This is either a tough problem to solve or an exercise in mental health. Or both. Either way, impressive as heck.
@nomadshiba
@nomadshiba 6 ай бұрын
12:20 maybe they use animation to "randomize" ? like animation is keep cycling thorough the checkboxes or radio buttons and you click on the current one, so its kinda random 13:11 i wanna try making this. tbh i just realized that i can make most of these, not even need that much css or html
@inkco420
@inkco420 6 ай бұрын
I mean- you can code entire movie in assembly- but its not the right choice :D kudos to these guys and gals that made this interesting games tho :)
@hothgangster5
@hothgangster5 6 ай бұрын
But can it run doom?
@dvorszkydavid9140
@dvorszkydavid9140 6 ай бұрын
No-no. I don't play no maze game in the browser. Learned my lesson 15 years ago 😅
@freewheelburning8834
@freewheelburning8834 6 ай бұрын
I'm guessing it knows if its in the right spot because it has the entire image from the URL
@studdiougrym5633
@studdiougrym5633 6 ай бұрын
They are using frameworks to inject JS in HTML bro
@hamza_hasnat_hbk
@hamza_hasnat_hbk 6 ай бұрын
Kevin can you create a playlist about Website features with CSS only which are usually controlled by JavaScript.
@ZeldaScott25
@ZeldaScott25 6 ай бұрын
Invader Game! I remember my childhood :D
@joebazooks
@joebazooks 7 ай бұрын
temani afif is a css wizard
@supercompooper
@supercompooper 6 ай бұрын
CSS supply chain management is just the best
@euphoniumist
@euphoniumist 6 ай бұрын
Are you saying duck hunt was just CSS??
@kaponyamartin572
@kaponyamartin572 6 ай бұрын
Next should be centering a div
@silentshadow867
@silentshadow867 6 ай бұрын
I feel like this is along the same lines as people who make games in Excel.
@UweMadej
@UweMadej 7 ай бұрын
Really Amazing 🤩
@England91
@England91 6 ай бұрын
Lighthouse 1 is using wave collapsing formula
@thebizounator
@thebizounator 5 ай бұрын
Now we need DOOM in CSS only!
@dand4485
@dand4485 7 ай бұрын
How to know if the object/shape is in the right square, might be easy, each tile or image essentially has the necessary info for position where it should end up. I'm thinking a 25 element array, the grid is then displayed as row column grid 5x5. That is the easy part, but after that i would be completely lost if this is CSS only as what i'm thinking would need would require updating the element, while i might be able to see and think how some of this stuff works works, honestly amazed as what people are able to pull off, might be proof there are aliens with super human brains far past a moron like me :) Best i can think of might be a css pattern that check the expected array slot and the given slot info on the element. I'd be curious for any tile is it in either the right slot or the same position on the screen, if one could drag the tile and place it anywhere on the screen before it is placed in the correct slot then i'm really at a loss, but then again i'm only a mere mortal 😊 Truly is amazing what some people create...
@robertlisaru
@robertlisaru 6 ай бұрын
CSS is a programming language as much as a car is a kitchen appliance. You can sometimes cook eggs on the engine cover, but is not what was designed for.
@lilbahr
@lilbahr 6 ай бұрын
Is it CSS-only or html + css. Can I do it with body tag only or use any random collection of html as base?
@noel.friedrich
@noel.friedrich 6 ай бұрын
No its specific html
@janoschii
@janoschii 6 ай бұрын
How it's done is the most interesting thing! Come on!
@HikaruAkitsuki
@HikaruAkitsuki 6 ай бұрын
Is that SASS is powered by JavaScript?
@youtube-user73424
@youtube-user73424 6 ай бұрын
Can these games have been generated with other programming languages and outputted in CSS?
@rodrigovianna470
@rodrigovianna470 6 ай бұрын
i do not understand, if it has html is not css only, am i wrong?
@awekeningbro1207
@awekeningbro1207 6 ай бұрын
Yes you are. By CSS only, they mean without js, because usually it's JavaScript that's responsible for all sorts of interactivity on a web page, not CSS. Html is just the bare metal.
@andynn6691
@andynn6691 6 ай бұрын
Only CSS... and HTML. Clever stuff :D
@CristianKirk
@CristianKirk 6 ай бұрын
You should create something super simple and make a tutorial so maybe we can start understanding a little bit about how these are made cause I don't have a clue.
@RaghavanRave-eq2lu
@RaghavanRave-eq2lu 6 ай бұрын
For people who thinks this is 100% HTML and CSS. Actually some of the games have utilized JS which are hidden under script tag. So yeah this is not 100% no JS games
@deatho0ne587
@deatho0ne587 7 ай бұрын
It is very intresting, but some of them are using const from JS. Now it could just be setting up 100's to 1000's of divs. Also to be fair most might not use any CSS at all. If HTMX was normal HTML, then these would be a heck of a lot easier and would need almost no CSS.
@ScriptRaccoon
@ScriptRaccoon 6 ай бұрын
Nope. What you saw is Pug syntax. It compiles down to HTML. Pug extends HTML by some nice features. Writing it directly with HTML is possible but more cumbersome. It's analogous to Sass. Compiles down to CSS which is harder to write directly (in these examples).
@deatho0ne587
@deatho0ne587 6 ай бұрын
Looked at it seems sort of like PHP or Smarty, since you can code it up. As I said though, it was mostly for not having to write 100s of div's by hand which I 100% understand.
@kpm25
@kpm25 6 ай бұрын
I guess that is the fun challenge.. to make the game with no JS. Cool
@ninjacodertech
@ninjacodertech 6 ай бұрын
kevin gaming be like
@stio_studio
@stio_studio 6 ай бұрын
Now I want to make a css game engine
@raphaelmorgan2307
@raphaelmorgan2307 6 ай бұрын
6:55 what's that I see in the HTML? looks like JavaScript... not dismissing all of these, but I wouldn't say the Duck Hunt one is CSS-only
@ScriptRaccoon
@ScriptRaccoon 6 ай бұрын
It's Pug syntax. It compiles down to HTML. Pug extends HTML by some nice features. Writing it directly with HTML is possible but more cumbersome. It's analogous to Sass.
@EmanuelLopesS2
@EmanuelLopesS2 6 ай бұрын
I invoke the GUY to do DOOM on css only
@HoSza1
@HoSza1 6 ай бұрын
Is it Turing complete or not? You've got your answer there. End of story.
@RandomGeometryDashStuff
@RandomGeometryDashStuff 6 ай бұрын
01:48 how to follow mouse in css?
@stupid4President
@stupid4President 6 ай бұрын
It is impressive but "CSS-only"? I don't think that is 100% true...
@vladyslavstadnyk2762
@vladyslavstadnyk2762 6 ай бұрын
I believe it's not even close
@peterhorvath6859
@peterhorvath6859 6 ай бұрын
Impressive! Try to format a plain numeric cell value with a thousand separator in css! Not possible!
@vladyslavstadnyk2762
@vladyslavstadnyk2762 6 ай бұрын
But.. it's not lure css, is it?
@QwDragon
@QwDragon 7 ай бұрын
Cool games, but some of them seem to be simple to make: Duck - animate two divs in two directions and it's done. Carnival - very simple. The last maze can be done with a single clip-path.
@RobertMcGovernTarasis
@RobertMcGovernTarasis 7 ай бұрын
Those are … 😮🤯 absolutely and definitely a programming language
@Defini3
@Defini3 6 ай бұрын
This man is slowly turning css into a programming language 😂
@InnerEagle
@InnerEagle 6 ай бұрын
I've seen people making games with Excel why would CSS not be able to make games?
@molotovtiel
@molotovtiel 6 ай бұрын
Wow. Just wow.
@s3rverlord
@s3rverlord 6 ай бұрын
I’ll be impressed when someone makes doom with CSS.
@niraj.chaurasiya
@niraj.chaurasiya 7 ай бұрын
Here we go again!!
@awekeningbro1207
@awekeningbro1207 6 ай бұрын
I wonder what does on inside the brain of a backend developer when they watch such video
@hamza_hasnat_hbk
@hamza_hasnat_hbk 6 ай бұрын
CSS is really amazing
@mohammadyahyaq
@mohammadyahyaq 6 ай бұрын
This tells you how insane people could be 🙂
@mannixmd
@mannixmd 7 ай бұрын
My brain would melt when trying to attempt any of these lol
@pje_
@pje_ 6 ай бұрын
next step: remake Minecraft 1:1 with CSS
@_GhostMiner
@_GhostMiner 5 ай бұрын
Next video: They said HTML is not a programming language
@juliohintze595
@juliohintze595 7 ай бұрын
Meanwhile, I'm trying to center a div.
@UmidBek005
@UmidBek005 6 ай бұрын
What the hell ain't no way 😮
@rayyanabdulwajid7681
@rayyanabdulwajid7681 7 ай бұрын
Next up: Make your own chat gpt with html and bootstrap 😂
@MattSeremet
@MattSeremet 6 ай бұрын
6:15 "How do you do that?" then immediately minimizes the code panel. We're a source viewing people, sir.
@ilyriadjaajdairyli6352
@ilyriadjaajdairyli6352 6 ай бұрын
كأنك تحفر خندقا بملعقة قهوة!
@zachariusd6473
@zachariusd6473 6 ай бұрын
Damn you frontend devs
@Only_Some
@Only_Some 6 ай бұрын
i guess to them people numbers has nothing to do with math and a sphere is flat
@chrisray9653
@chrisray9653 6 ай бұрын
Declarative programming
@lewisone
@lewisone 7 ай бұрын
Inspirational, epic, and mind blowing. I'm going outside to play with rocks now.
Avoid These 5 Awful CSS Mistakes
20:42
Kevin Powell
Рет қаралды 192 М.
The background values no one knows about
15:28
Kevin Powell
Рет қаралды 41 М.
Before VS during the CONCERT 🔥 "Aliby" | Andra Gogan
00:13
Andra Gogan
Рет қаралды 10 МЛН
هذه الحلوى قد تقتلني 😱🍬
00:22
Cool Tool SHORTS Arabic
Рет қаралды 59 МЛН
OMG what happened??😳 filaretiki family✨ #social
01:00
Filaretiki
Рет қаралды 13 МЛН
艾莎撒娇得到王子的原谅#艾莎
00:24
在逃的公主
Рет қаралды 54 МЛН
ASMR Programming - Coding Pacman - No Talking
1:21:19
Servet Gulnaroglu
Рет қаралды 2,6 МЛН
Using currentColor with color-mix is amazing
12:46
Kevin Powell
Рет қаралды 49 М.
Why Is CSS So Weird?
15:07
Mozilla Developer
Рет қаралды 58 М.
23 CSS features you should know (and be using) by now
31:31
Kevin Powell
Рет қаралды 72 М.
2 better alternatives to overflow: hidden
11:04
Kevin Powell
Рет қаралды 156 М.
Browser Games Written in PURE CSS
14:25
Mental Outlaw
Рет қаралды 18 М.
A look at the CUBE CSS methodology in action
47:09
Kevin Powell
Рет қаралды 103 М.
Under the radar CSS features for your CSS reset
11:41
Kevin Powell
Рет қаралды 47 М.
You Don't Need JavaScript For This - CSS ONLY Infinite Scroll
23:35
Slaying The Dragon
Рет қаралды 100 М.
I Challenged An Expert Designer To A CSS Battle
42:30
Web Dev Simplified
Рет қаралды 71 М.
Before VS during the CONCERT 🔥 "Aliby" | Andra Gogan
00:13
Andra Gogan
Рет қаралды 10 МЛН