Debugging CSS, no extensions required - Using your devtools

  Рет қаралды 50,855

Kevin Powell

Kevin Powell

Күн бұрын

Whenever I use different DevTool features in my videos, I get a lot of questions about them in the comments, so today we’re looking at how we can simplify debugging your CSS by using different DevTools features.
🔗 Links
✅ More on DevTools on MDN: developer.mozilla.org/en-US/d...
⌚ Timestamps
00:00 - Introduction
00:36 - Opening your devtools
00:58 - Responsive mode
02:07 - The power of the Styles tab
04:44 - Working with hover and other pseudo-classes
06:02 - Playing around with the CSS
06:56 - Adding your own classes to the Styles tab
07:57 - Grid and Flex inspectors
10:26 - Firefox gives you extra context
#css
--
Come hang out with other dev's in my Discord Community
💬 / discord
Keep up to date with everything I'm up to
✉ www.kevinpowell.co/newsletter
Come hang out with me live every Monday on Twitch!
📺 / kevinpowellcss
---
Help support my channel
👨‍🎓 Get a course: www.kevinpowell.co/courses
👕 Buy a shirt: teespring.com/stores/making-t...
💖 Support me on Patreon: / kevinpowell
---
My editor: VS Code - code.visualstudio.com/
---
I'm on some other places on the internet too!
If you'd like a behind the scenes and previews of what's coming up on my KZbin channel, make sure to follow me on Instagram and Twitter.
Twitter: / kevinjpowell
Codepen: codepen.io/kevinpowell/
Github: github.com/kevin-powell
---
And whatever you do, don't forget to keep on making your corner of the internet just a little bit more awesome!

Пікірлер: 90
@djshiva
@djshiva Жыл бұрын
You are truly a treasure to the web dev community! I am learning CSS and this just blew my mind!
@GoodheadOffical
@GoodheadOffical Жыл бұрын
I was literally thinking about the same topic today 😅 i didn’t realize till now how much more Firefox can give when it comes debugging, thanks a lot!
@HariHaran-ef7pr
@HariHaran-ef7pr Жыл бұрын
I am also discussed with my team and here is the video about css overview 😬
@the-real-tridder
@the-real-tridder Жыл бұрын
I came here for the learning, realised I already learneded all this stuff by myself, stayed because its awesome information, and commenting for the algorithms! Every web dev or aspiring web dev needs to know how easy it is to debug their css. Thanks again for making such useful content!
@drochleprechaun
@drochleprechaun Жыл бұрын
I use all of these tools every day, but I learned a bunch of little tricks I've somehow overlooked over the years. Very informative, thanks for the great tips!
@JosephCodette
@JosephCodette Жыл бұрын
You can also adjust values in devtools by using arrow keys . So for example a style has px values you can click on it and increase or decrease . Handy when you want to see real-time what a value will do
@yandev6956
@yandev6956 Жыл бұрын
Even better is using scroll wheels instead of arrow keys. It can help a lot to quickly style something.
@robin.journal
@robin.journal Жыл бұрын
Thank you for another helpful video sir! I appreciate your efforts to bring us quality tutorials 😊
@zorokutend
@zorokutend Жыл бұрын
In the dev tool, you can enable some features for better debugging CSS in the settings ( the gear icon on the top right of the dev tool). For example, in the preferences, scroll down a little bit to the section Elements, you can enable the "Show rulers on hover" feature to line up your elements without extension. Or, you can add some presets to your preferred responsive devices when debugging in responsive mode.
@Marty72
@Marty72 Жыл бұрын
Worth sticking around for the Firefox tips at the end.
@clevermissfox
@clevermissfox 5 ай бұрын
Chrome now has the greyed out align-self [this element is not a grid or flex child]. Just happened to see that exactly this morning when I thought I had grid on its parent. Very helpful. I ❤ dev tools! The animation tab is extremely extremely useful. As is the ability to mess with your timing functions! I had no clue there is a clip-path tool too? What else don’t I know that I don’t know??!
@JoshLearningFrontend
@JoshLearningFrontend Жыл бұрын
If someone say CSS is frustrated i recommend your channel
@francescovetere
@francescovetere Жыл бұрын
Thanks Kevin! Your content Is always top notch, you are my main reference and inspiration! :)
@matthewreid1580
@matthewreid1580 Жыл бұрын
So much cool stuff! Thank you! I knew about the style tab years ago. I worked at a daily newspapersnd would "change" the home page on my machine and call my co-workers over in a panic just to see their reactions.
@XiagraBalls
@XiagraBalls Жыл бұрын
That FF tip at the end will be super useful; everything else I knew already.
@thkorkem
@thkorkem Жыл бұрын
Firefox devtools seems amazing, thanks a lot!
@frankroos1167
@frankroos1167 Жыл бұрын
A few more useful details I didn't know yet. Thank you master Kevin.
@waspishbobfish
@waspishbobfish Жыл бұрын
Love your videos. Coding my first project right now in vscode and struggling with things not working when i think they should. I've been using chrome and am immediately switching to firefox!!
@pixiedev
@pixiedev Жыл бұрын
RESPECT, A helpful video, it saves alot of time while working with css. 😊
@NemilSheriff
@NemilSheriff Жыл бұрын
Thank you so much for sharing this!!
@bobobo1673
@bobobo1673 Жыл бұрын
Great video Kevin! You are helping me a lot to learn, thank you! I'm glad I found the grid and Flex stuff because I'm stuck doing a sticky scroll of a grid column and I can't find anything about it. Let's see if this helps me. Greetings
@AvalonRishiFamily
@AvalonRishiFamily Жыл бұрын
Oh, wow, I didn't know these things even exist. Thank you for so many treasures in just one video! God bless you
@brandon_wallace
@brandon_wallace Жыл бұрын
Great video. Thanks for this.
@Boganbrump
@Boganbrump Жыл бұрын
Hey Kevin! Hope you find this. I did the free scrimba course you did for HTML and CSS. I then used what I learnt in my university assessment and got a High Distinction. Been a fan for a while 😃
@ZeeJohansen
@ZeeJohansen Жыл бұрын
Didn't know about the breakpoint visualisation option or the information box in Firefox. But I usually spend maybe 60 - 80 % in the DEV tool than in my editor when styling. Right now I'm even testing prototypes for my works live Shopify page, where I edit the HTML and enter my CSS to see how it integrates with Shopify's div and CSS hell 🤣🥰
@abusid966
@abusid966 Жыл бұрын
Great inform for all developers
@AdamFiregate
@AdamFiregate Жыл бұрын
Thanks for the Firefox tip, Kevin.
@liselle8932
@liselle8932 Жыл бұрын
This is fabulous, thanks!
@luketurner314
@luketurner314 Жыл бұрын
I don't remember if Kevin demoed it in another video already but... when editing a numerical value in the dev tools you can scroll the mouse wheel to increment and decrement. If you hold shift and scroll, it increases/decreases by 10's; alt and scroll for 0.1's
@gmos.99
@gmos.99 Жыл бұрын
I mentioned on discord but I'll mention it here again, I was just watching this video and just by looking at your screen at 4:37 made me realize what was wrong with the responsive part of a project I was working on for a week! Thank you so much for that!!!
@ezekielswanson7813
@ezekielswanson7813 Жыл бұрын
Your videos are amazing!
@EddieBeaumontThomas
@EddieBeaumontThomas Жыл бұрын
I use both Chrome and Firefox's dev tools. I particularly like that Firefox shows JS event handlers; very helpful..
@serveshchaturvedi2034
@serveshchaturvedi2034 Жыл бұрын
Hi Kevin. Thanks for this awesome video. Would be helpful if u made a similar one for the css animations using dev tools
@sovereignlivingsoul
@sovereignlivingsoul Жыл бұрын
thanks kev, i do use the dev tools everytime i am coding for some reason or another, but this video was great for reminding me to maybe us them before i have an issue and for testing, one thing i hate s making a change or two and after deciding it wasn't what i wanted, i wlil undo everything and for some reason things are out of whack, that's when the dev tools can be very handing if i can't find the error in the code myself, if you are using chatGPT, you need dev tools, don't know about anyone out there, but i don't think chatGPT could code a button without an error.
@verawat
@verawat Жыл бұрын
Thanks Kevin. I love you every day.
@hassaneoutouaya
@hassaneoutouaya Жыл бұрын
Thank you so much!
@Andreterragt
@Andreterragt Жыл бұрын
Oh man. CSS is so incredibly frustrating and annoying for beginners. It seems like you are setting 15 different parameters to "center" and is still not centered. Debugging videos are greatly appreciated. I'm stuck with debugging all the time.
@jenasusil6
@jenasusil6 Жыл бұрын
Thanks Kevin for your valuable content. by the way which font are you using ? it looks awasome.
@steveportas7961
@steveportas7961 Жыл бұрын
I would also be intrested in seeing you set up.
@15-gimenajohnbriann.40
@15-gimenajohnbriann.40 Жыл бұрын
I did not think of using browser as a debugger, thank you it really help me so much
@mrpicbuddy5723
@mrpicbuddy5723 Жыл бұрын
it work on my pc thx bro vеry much
@victorlosadahernandez7125
@victorlosadahernandez7125 Жыл бұрын
You should do a video about the new dev feature, CSS Overview!
@sarpfeykunsener4070
@sarpfeykunsener4070 Жыл бұрын
thank you bro thank you
@davidjohnsonny
@davidjohnsonny Жыл бұрын
OMG great shirt!
@maerosss
@maerosss Жыл бұрын
The way I style nowadays is basically create html, load it in browser and then just style all of it right in browser. When I'm done, I just paste it all into css ;-)
@nikhiltyagi6619
@nikhiltyagi6619 Жыл бұрын
Thanks a ton!! You're awesome as always. Can you do a short video on how to make a basic html css javascript website GDPR compliant? I made a website for a client in UK and have Google analytics tracking turned on. How do I apply a cookie consent system on the website?
@KalpeshPanchal
@KalpeshPanchal Жыл бұрын
Thanks Kevin for sharing this with everyone. All good except that you used few bad practices while presenting debugging.
@Davyhatesu
@Davyhatesu Жыл бұрын
KEVIN IS THE FRONTEND G O A T!!!!
@ayaanshaikh6374
@ayaanshaikh6374 9 ай бұрын
11:53 this is also added in Chrome, and it helps a lot
Жыл бұрын
The subtitles finally got it right "front end friends". I think this is the first time lol
@BjarneOldrup
@BjarneOldrup Жыл бұрын
I already have fallen deeply in love with Kev.... CSS! ... CSS is mostly very lovable. Specificity does get on my nerves sometimes, though. Any idea if it is possible to calculate the specificity of a selector in any of the dev tools?
@mohsinkhan-wv4fu
@mohsinkhan-wv4fu Жыл бұрын
i am always use that for debugging css
@cerstar5725
@cerstar5725 Жыл бұрын
I didn't think I knew all of this already, Great video like always
@Eternal_Rise
@Eternal_Rise Жыл бұрын
Could you also make a video about animations tab?
@pedzsan
@pedzsan Жыл бұрын
I clicked on this video but it was not what I was looking for. So… perhaps this is a suggestion for a future video. Today, I had page that I was working on. I’m very novice at CSS. And there was a “thing” (turns out it was padding) that was causing an icon to be moved over to the right. Where is it? Who is doing that? It took me “a long time” (seemed like) to figure out where that padding was coming from. And while it all seems “Dah!” obvious after you figure it out… it isn’t obvious before you figure it out. So… the suggestion for a video would be how do you figure out why your CSS isn’t doing what you expect it to do? What I ended up doing is getting into dev tools and turning things off until it finally jumped back left … but there’s gotta be a better way… I would hope.
@landa9620
@landa9620 Жыл бұрын
ty master
@-_._._-
@-_._._- Жыл бұрын
5:14 I find that there are some pseudo classes (like :hover and such) that exist now, that aren't listed on the dev tools and as a result, it's impossible to get them to stay displayed so I can style them. I can't recall the ones I've seen before off the top of my head, but I've run into them while working on a MediaWiki dark mode project. If memory serves, one of them was a pseudo-class related to checkboxes. I was trying to restyle the various checkboxes. Some of the checkbox had some weird styling in some of their new-ish pseudo-classes that I found hard to locate in the dev tools
@KevinPowell
@KevinPowell Жыл бұрын
For some, like say @media for dark mode or light mode, or high-contrast, you can use your dev tools to emulate one or the other, which would activate the media query and you'd see it in the dev tools then.
@-_._._-
@-_._._- Жыл бұрын
@@KevinPowell my dark mode skin (TF2CutContentWiki/TCRFDark repo on GH) was for The Cutting Room Floor Wiki (video game cut content wiki) and it was a "Bespoke" creation where I didn't take what I'd call "shortcuts" like inverting the colors on everything. I literally went through every page I could think of and recolored elements by hand. As for the unlisted pseudoclasses, I think the pseudoclasses I had trouble with were related to checkboxes. There's some new-ish pseudoclasses for inputs that aren't listed alongside hover, active, visited, etc in the dev tools. Makes it hard to single those pseudoclasses out like you can with hover/active/visited.
@-_._._-
@-_._._- Жыл бұрын
@@KevinPowell aha, I remember which pseudoclass it was now. ":checked" was one I had trouble restyling. There's a whole slew of pseudoclasses that aren't represented on the dev tools window. Is there any way to modify that list and add new pseudoclasses to be able to force-display?
@LzysGraphics
@LzysGraphics Жыл бұрын
@@-_._._- we’re you not able to click the checkbox? If it was inaccessible you could also have tried to manually check it either by adding ‘checked’ in the HTML tag or in JavaScript
@shivamrathore8291
@shivamrathore8291 Жыл бұрын
Hey, thanks for the video. (apart from video's topic) I am in a little bit of confusion in CSS CONFUSION : can we edit/modify the input box blinking cursor I want to change the input box cursor blinking animation style from blink to expand (like VS code) is this possible? if yes then please make a video or at least tell me how can I achieve this??, if not then why??
@kiravolvo
@kiravolvo Жыл бұрын
hi kevin. thank you very much for the video. quick question. how do you make devtools tab zoom in with 1 click? i can only find how to increase font size. thank you
@KevinPowell
@KevinPowell Жыл бұрын
Click inside the dev tools, and then ctrl + or ctrl - zooms in and out (guessing it's cmd on a mac)
@kiravolvo
@kiravolvo Жыл бұрын
@@KevinPowell thank you.
@DNAwastaken
@DNAwastaken Жыл бұрын
For some reason, Cmd+Shift+I doesn’t work on my Mac. Instead, I use Cmd+Option+C. It’s also a plus because the keys are so close together, and you don’t have to reach all over the keyboard to open “inspect element”
@dmoralesz
@dmoralesz Жыл бұрын
try option + cmd + i
@jesutobitobi7588
@jesutobitobi7588 11 ай бұрын
Hello Kevin, thanks for this video... I would to know if you know of any open source projects front end devs can contribute to
@lookupverazhou8599
@lookupverazhou8599 Жыл бұрын
Thumbs up.
@noclistify
@noclistify Жыл бұрын
Watching Kevin for years now but I finally realized it's "Hello my front end friends", not "Hello my friend and friends"
@PedroPisandelli
@PedroPisandelli Жыл бұрын
Good old days of Firebug... the web development was never the same after it.
@keremardicli4013
@keremardicli4013 Жыл бұрын
How can we see @print? I have dynamic page where print co tent changes based on selection, I wanted to see @print query results but could not find a way.
@KevinPowell
@KevinPowell Жыл бұрын
Open the dev tools, then use `ctrl + shift + p` to open the command pallet, and type in "print" there, and it should show you an "emulate print" or something like that, that you can then enable. (would be cmd instead of ctrl on a mac)
@Sashad2003
@Sashad2003 Жыл бұрын
I'm your first 🥇 viewer today 😉👍
@prasannakumar-kf2pl
@prasannakumar-kf2pl Жыл бұрын
Hey Kevin, myself prasanna from India 🇮🇳 and i am a junior front end developer I have an doubt on Impleting fonts in our web pages. How I actually do is by using font face with font extensions like TTf, otf, woff, woff2 font files Is it right way to do? Or is there any something more effective than this way
@lenninpalacios
@lenninpalacios Жыл бұрын
I dont know if can compete with our 1px solid red.
@badcatdesign
@badcatdesign Жыл бұрын
@7:46 Edge DevTools extension for VS Code has this cool thing where you can link the CSS changes back to the source and actually save them. kzbin.info/www/bejne/foPTeJKCgd1jnKs it's pretty slick.
@krishmehta7903
@krishmehta7903 Жыл бұрын
if we dont know color code of the certain part of website , chrome devtools color picker , we can find any color code of the website ( without any extension download )
@gg-gn3re
@gg-gn3re Жыл бұрын
firefox has this too, several years before chrome added it. And it's on by default. ff's dev tools are generally far better than chrome except in some niche cases
@krishmehta7903
@krishmehta7903 Жыл бұрын
@@gg-gn3re yeah man
@VinaySingh-jm8iw
@VinaySingh-jm8iw Жыл бұрын
Can you debug the video title?
@KevinPowell
@KevinPowell Жыл бұрын
haha, surprised you're the first to mention that! Thanks, fixing it now!
@lucaslindgren3237
@lucaslindgren3237 Жыл бұрын
I'm so early!
@RhayvenBlood
@RhayvenBlood Жыл бұрын
Urgh. I dont think FireFox has quick grid/flex controls like chrome does lol. Would save me a lot of time X_X
@JamesBlackburn
@JamesBlackburn Жыл бұрын
@Kevin Powell, ( kzbin.info/www/bejne/pJXIdJ-krq2GpZo ) the three dots are called an ellipsis.
@PaulMcCannWebBuilder
@PaulMcCannWebBuilder Жыл бұрын
Also known in the UI design world as a 'kebab icon'.
@JamesBlackburn
@JamesBlackburn Жыл бұрын
@@PaulMcCannWebBuilder Haha. True! Hamburger and Kebab... mmmmm... food! 🤤
@mirzaumair8411
@mirzaumair8411 Жыл бұрын
I am😁 the first
@GoodheadOffical
@GoodheadOffical Жыл бұрын
3rd
The problem with mobile-first CSS
13:53
Kevin Powell
Рет қаралды 122 М.
100+ Computer Science Concepts Explained
13:08
Fireship
Рет қаралды 2,3 МЛН
ХОТЯ БЫ КИНОДА 2 - официальный фильм
1:35:34
ХОТЯ БЫ В КИНО
Рет қаралды 2,6 МЛН
The Worlds Most Powerfull Batteries !
00:48
Woody & Kleiny
Рет қаралды 22 МЛН
1 класс vs 11 класс (неаккуратность)
01:00
БЕРТ
Рет қаралды 4,9 МЛН
The problems with viewport units
13:23
Kevin Powell
Рет қаралды 352 М.
How I find and debug issues in my CSS
23:29
Kevin Powell
Рет қаралды 25 М.
20 Must have Obsidian Plugins
9:24
Paul Dickson
Рет қаралды 2,6 М.
Login Form | HTML CSS
1:00
Learning Axis
Рет қаралды 445 М.
Write less CSS by taking advantage of inheritence
15:52
Kevin Powell
Рет қаралды 21 М.
The new CSS pseudo-classes explained - :is() :where() :has()
13:50
Kevin Powell
Рет қаралды 129 М.
21+ Browser Dev Tools & Tips You Need To Know
9:26
Fireship
Рет қаралды 298 М.
Top 10 CSS One Liners That Will Blow Your Mind
13:34
developedbyed
Рет қаралды 893 М.
The 6 most important CSS concepts for beginners
28:58
Kevin Powell
Рет қаралды 149 М.
Chrome DevTools Complete Course - Learn to debug your frontend code
1:53:49
ХОТЯ БЫ КИНОДА 2 - официальный фильм
1:35:34
ХОТЯ БЫ В КИНО
Рет қаралды 2,6 МЛН