Our phones assume that websites are NOT responsive, so if you don't tell them that you did all the hard work and set up some media queries, it'll just ignore all that and simply scale your website down to fit.
Using the meta viewport tag, we can tell our devices that we did use media queries and prevent that from happening.
--
Come hang out with other dev's in my Discord Community π¬ discord.gg/nTYCvrK
Our phones assume that websites are NOT responsive, so if you don't tell them that you did all the hard work and set up some media queries, it'll just ignore all that and simply scale your website down to fit.
Using the meta viewport tag, we can tell our devices that we did use media queries and prevent that from happening.
--
Come hang out with other dev's in my Discord Community π¬ discord.gg/nTYCvrK
And whatever you do, don't forget to keep on making your corner of the internet just a little bit more awesome!This new CSS property just solved animating to height autoKevin Powell2024-10-16 | βοΈ Sign up for my newsletter for regular CSS tips & tricks: kevinpowell.co/newsletter
β Timestamps 00:00 - Introduction 00:30 - what Iβm starting with 01:00 - adding a transition to the height 01:50 - making sure it works in both directions 02:39 - staying up to date with CSS 03:00 - put interpolate-size on your body 03:30 - works with more than only auto
#css
--
Come hang out with other dev's in my Discord Community π¬ discord.gg/nTYCvrK
And whatever you do, don't forget to keep on making your corner of the internet just a little bit more awesome!Please, donβt use viewport units for font sizesKevin Powell2024-10-11 | Start writing CSS with confidence with my course CSS Demystified: cssdemystified.com
When people find out about viewport units, one of the first things they often do with them is create fluid type, but there are some problems that can cause. In this video, I look at why we shouldnβt use viewport units for our font sizes, how we can use clamp(), and how using a tool like Utopia makes figuring it all out a lot easier.
π Links β Utopia: https://utopia.fyi
β Timestamps 00:00 - Introduction 00:21 - Why you shouldnβt use viewport units for font-size 02:00 - Using clamp() 04:00 - Using viewport units is hard to get right 04:50 - Utopiaβs type size calculator 08:00 - Writing CSS with confidence 08:48 - A bit more on Utopia
#css
--
Come hang out with other dev's in my Discord Community π¬ discord.gg/nTYCvrK
And whatever you do, don't forget to keep on making your corner of the internet just a little bit more awesome!CSS Typography Crash CourseKevin Powell2024-10-02 | I've been joined by Roel Nieskens for a deep dive into Typography, exploring the awesome things we can do with variable fonts, and a bunch of useful Open Type features that we have at our disposal, that a lot of people aren't even are aware we have control over with CSS!
π Links β Roel's website: https://pixelambacht.nl/ β Follow Roel on Mastodon: https://front-end.social/@pixelambacht@typo.social β Wakamaifondeu: wakamaifondue.com β V Fonts: v-fonts.com β Atlas of Type: https://type-atlas.xyz/ β Typearture: typearture.com
And whatever you do, don't forget to keep on making your corner of the internet just a little bit more awesome!Creating a CSS BoilerplateKevin Powell2024-10-01 | Looking to step up your CSS? I have free and premium courses: kevinpowell.co/courses
Come hang out with other dev's in my Discord Community π¬ discord.gg/nTYCvrK
And whatever you do, don't forget to keep on making your corner of the internet just a little bit more awesome!Style queries are better than I thought they would beKevin Powell2024-09-30 | This is part of my final project in BeyondCSS, learn more here: https://beyondcss.dev
β Timestamps 00:00 - Introduction 00:50 - What Iβm starting with 01:55 - Using a locally scoped custom property to help fix this issue 03:30 - A second problem with a similar solution 05:40 - Style queries limitation (for now)
And whatever you do, don't forget to keep on making your corner of the internet just a little bit more awesome!Remove useless keyframes from your CSS animationsKevin Powell2024-09-26 | CSS animations are fun, but sometimes if we have more keyframes than we need, it can make them hard to wrangle...
#css #animation #cssanimationDynamic numbering with CSS countersKevin Powell2024-09-25 | Looking to step up your CSS? kevinpowell.co/courses
CSS Counters are one of those things a lot of people aren't aware of, and most people who do know about them don't realize all the things you can do with them!
β Timestamps 00:00 - Introduction 0:36 - The HTML 01:22 - Creating a counter with CSS 02:00 - Showing our counter 03:30 - How to increment the counter 04:40 - Numbering options 06:30 - Changing how the counter increments 07:10 - Be careful with the content property 08:10 - Resetting counters and a few other things
#css
--
Come hang out with other dev's in my Discord Community π¬ discord.gg/nTYCvrK
And whatever you do, don't forget to keep on making your corner of the internet just a little bit more awesome!Improve your forms with this underused HTML elementKevin Powell2024-09-19 | HTML has so many underused features, and datalists are definitely one of them!
#CSS #frontend #htmlI gave three AI models a CSS quizKevin Powell2024-09-18 | Clearly AI has a ways to go with CSS. If you're looking to improve, I have both free and premium courses: kevinpowell.co/courses
And whatever you do, don't forget to keep on making your corner of the internet just a little bit more awesome!Dynamically number elements with a few lines of CSSKevin Powell2024-09-13 | Ever needed to number things and turned to JavaScript to do it? CSS counters can do it, and they have a lot of pretty cool built in functionality!Create a blog with a headless CMS // Full 3-hour course // Astro + Wix StudioKevin Powell2024-09-11 | Check out Wix Studio π wix.com/studio/cms
β Timestamps 00:00 - Introduction 00:39 - Getting the assets and a quick look at the design 02:47 - Getting started with Astro 05:08 - Exploring what Astro starts us with and adding the assets 07:52 - Creating a template layout 12:44 - Creating and importing our CSS file 14:12 - Thinking about how we'll organize our page 19:17 - General styling with CSS 32:20 - Creating the header 37:40 - Scroped styling in Astro 40:05 - The visually-hidden class 41:03 - Styling the navigation (more on this later) 42:18 - The featured article 45:23 - Heading levels and their impact 47:30 - Read more buttons are bad 48:57 - Using grid instead of a .container or .wrapper 52:54 - Improving the styling of the featured article 57:15 - Styling the button 1:00:45 - Adding spacing 1:03:19 - Creating the three columns 1:08:18 - Passing a class into a component 1:12:01 - Improving the breakpoints 1:14:49 - Adding the three articles on the bottom 1:22:16 - Using a counter for the numbers 1:26:51 - Spacing things out 1:31:58 - Styling the inverted section 1:41:36 - Styling heading links 1:45:41 - Skip to main 1:49:53 - Creating the mobile version of the navigation 2:06:26 - Getting started with Wix Studio for the headless CMS 2:07:25 - Adding a content collection to the CMS 2:11:05 - Connecting Wix Studio's headless CMS to our Astro project 2:14:33 - Getting our articles from Wix Studio 2:17:07 - What we get from our fetchArticles() function 2:20:49 - Adding an option for how many articles to fetch 2:22:12 - Adding a featured article filter 2:24:33 - Pulling the featured article into our site 2:28:00 - Generating pages for each article 2:36:30 - Creating a list of articles 2:40:16 - Limiting the amount of lines of text with CSS 2:42:33 - Bringing in content for the bottom articles
#css
--
Come hang out with other dev's in my Discord Community π¬ discord.gg/nTYCvrK
And whatever you do, don't forget to keep on making your corner of the internet just a little bit more awesome!npm for absolute beginnersKevin Powell2024-09-10 | If you've ever seen an `npm install` or `npm create` as part of a tutorial and had no idea what it was talking about, then you're in the right place!
β Timestamps 00:00 - Introduction 00:24 - How to install npm 01:27 - The basics of navigating the command line 04:15 - Using npm 06:57 - npm install 09:44 - Adding new packages 10:17 - dependencies vs. devDependencies 15:53 - Flags 11:39 - How to know when to use --save-dev 12:14 - npm and version control 13:43 - Running scripts 14:21 - npm vs npx
#css
--
Come hang out with other dev's in my Discord Community π¬ discord.gg/nTYCvrK
And whatever you do, don't forget to keep on making your corner of the internet just a little bit more awesome!The easy way to understand flexbox alignmentKevin Powell2024-09-06 | Looking to get a very deep understanding of flexbox? Check out Flexbox Simplified: flexboxsimplified.com
It's easy to mix up justify-content and align-items, and also, why don't we have a justify-self? In this video I take a look at some tricks to remembering the difference between the two of them, and better understanding why they work a little differently from one another.
β Timestamps 00:00 - Introduction 00:25 - Using your devtools to play with different options 02:30 - The main and cross-axis 03:13 - The main axis has to focus on groups of content and the cross axis on individual items 06:45 - Changing the flex-direction 08:20 - align-content and flex-wrap 12:10 - You can use margins when you want justify-self
#css
--
Come hang out with other dev's in my Discord Community π¬ discord.gg/nTYCvrK
π Links I thought Bramus did a series on view transitions, but it's on scroll-driven animations! youtube.com/playlist?list=PLNYkxOF6rcICM3ttukz9x5LCNOHfWBVnn& Steph's article on registered custom properties: https://moderncss.dev/providing-type-definitions-for-css-with-at-property/
And whatever you do, don't forget to keep on making your corner of the internet just a little bit more awesome!Turning off inheritance on custom props is more useful than Id thoughtKevin Powell2024-08-28 | I didn't really get why you'd want to turn off inheritance of custom properties at first, but now I get it!
π Links β ModernCSS article on registering custom props that I mentioned: https://moderncss.dev/providing-type-definitions-for-css-with-at-property/
#css
--
Come hang out with other dev's in my Discord Community π¬ discord.gg/nTYCvrK
And whatever you do, don't forget to keep on making your corner of the internet just a little bit more awesome!Flex: 1 probably doesnt work the way you think it doesKevin Powell2024-08-23 | Using flex: 1 is super common for equal columns, but there's a gotch'a with it that a lot of people aren't aware of.
And whatever you do, don't forget to keep on making your corner of the internet just a little bit more awesome!Announcing something new!Kevin Powell2024-08-19 | youtube.com/@KevinPowell/join or if you'd prefer: patreon.com/kevinpowellVery small CSS tweaks for better formsKevin Powell2024-08-16 | I talked about this in a Short, but wasn't able to get the last half in because Shorts are too short, so here's the extended cut, where I look at how we can replicate the :user-valid using :not(:placeholder-shown) π
And whatever you do, don't forget to keep on making your corner of the internet just a little bit more awesome!A simple update for better form UXKevin Powell2024-08-15 | The only issue here is browser support, which is good, but not great yet. You can use input:not(:placeholder-shown):valid for excellent browser support, and a very similar result though!The problem with Frontend MentorKevin Powell2024-08-14 | β Sign up for my newsletter: kevinpowell.co/newsletter
Sites like Frontend Mentor and iCodeThis are fantastic for giving us projects to work on, but the problem is, a lot of people work on them! In this one, I talk about some things you can do with those projects to help.
And whatever you do, don't forget to keep on making your corner of the internet just a little bit more awesome!An easy fix for an annoying CSS transition issueKevin Powell2024-08-08 | If you transition the scale of an element, it can appear behind other elements of the page, but there is a really simple fix!No, Flexbox isnt good enoughKevin Powell2024-08-07 | I *love* flexbox. It's a fantastic tool. But there is a reason we have two layout tools, and it's because it can't do everything, and some solutions with it are overly complicated. We have grid for a reason, and it's not as complicated as it might seem at first.
And whatever you do, don't forget to keep on making your corner of the internet just a little bit more awesome!Improve your CSS animations with individual transformsKevin Powell2024-08-01 | Combining the transform property with it's different value functions, along with the individual transform properties makes animations and transitions a lot easier3 underused CSS Grid featuresKevin Powell2024-07-31 | Looking to step up your CSS? I have both free and premium courses π kevinpowell.co/courses
Grid is awesome, and there are some neat tricks that you can do with it that I donβt see enough people taking advantage of, like overlapping named grid lines, using position absolute with grid, and animating template-rows and template-columns.
π Links β Use animated grid rows to animate from height 0 to height auto: youtu.be/B_n4YONte5A
β Timestamps 00:00 - Introduction 00:45 - How to overlap grid areas using named grid lines 04:50 - 3 bonus tips 07:00 - Using position absolute with grid 10:25 - Animating grid-template-rows and columns
#css
--
Come hang out with other dev's in my Discord Community π¬ discord.gg/nTYCvrK
And whatever you do, don't forget to keep on making your corner of the internet just a little bit more awesome!A background-image trick most people dont know aboutKevin Powell2024-07-25 | background-attachment fixed is for more than just fake parallax effects!Taking on HTML & CSS challengesKevin Powell2024-07-24 | Looking to step up your CSS? I have free and paid courses: Looking to step up your CSS? I have free and premium courses: kevinpowell.co/courses?utm_campaign=general&utm_source=youtube&utm_medium=livechallenges
Taking on some iCodeThis challenges. You can join iCodeThis here: icodethis.com/?ref=kevin This is an affiliate link, which means that I'll receive a commission if you sign up for a paid plan. This comes at no extra cost for you, and helps support my channel π
Come hang out with other dev's in my Discord Community π¬ discord.gg/nTYCvrK
And whatever you do, don't forget to keep on making your corner of the internet just a little bit more awesome!Quick trick to boost specificityKevin Powell2024-07-18 | This might not be the best idea, but it can get you out of a jam every now and then π Design to Code // HTML & CSS from scratch // Frontend Mentor FormKevin Powell2024-07-17 | Looking to step up your CSS? I have free and premium courses: kevinpowell.co/courses?utm_campaign=general&utm_source=youtube&utm_medium=femform
β Timestamps 00:00 - Introduction 00:34 - What we are starting with 01:05 - Writing the HTML 08:28 - CSS Reset + custom properties 14:40 - @font-face 18:30 - General styling 25:40 - Styling the list 31:00 - CSS organization 32:20 - Styling the form 44:30 - Making a gradient shadow 51:13 - The error state with CSS-only 1:03:00 - Changing the picture source for large screens 1:04:40 - Updating the layout for large screens
#css
--
Come hang out with other dev's in my Discord Community π¬ discord.gg/nTYCvrK
And whatever you do, don't forget to keep on making your corner of the internet just a little bit more awesome!One-liner to fix shadows, borders, and gradients that break multiple linesKevin Powell2024-07-11 | box-decoration-break: clone helps improve effects that we have one inline elements that break across multiple lines - You will need to use the -webkit- prefix for Chrome and Safari still!Stop the Flexbox for 1D, Grid for 2D layout nonsenseKevin Powell2024-07-10 | Flexbox is great at some 2D layouts, and Grid can be a better choice for 1D layouts as well, so let's stop that being how we decide which one we're going to use, because often it leads us down the wrong path.
β Timestamps 00:00 - Introduction 00:25 - Why Grid might be better for 1D some layouts 04:35 - Why Flexbox might be better for some 2D layouts 06:45 - Grid gives you more control on sizing, flexbox is better for letting the children have control
#css
--
Come hang out with other dev's in my Discord Community π¬ discord.gg/nTYCvrK
And whatever you do, don't forget to keep on making your corner of the internet just a little bit more awesome!Use this instead of white-space: nowrapKevin Powell2024-07-04 | white-space: nowrap can come in handy at times, but it introduces the possibility of overflows, but using min-width: fit-content solves the same problem, but will allow text to wrap if there is no more space available.Relative colors make so many things easier!Kevin Powell2024-07-03 | Looking to step up your CSS Game? I have free and premium courses π kevinpowell.co/courses?utm_campaign=general&utm_source=youtube&utm_medium=relativecolors
β Timestamps 00:00 - Introduction 00:39 - the basics and syntax of relative colors 02:33 - How to manipulate the color values 06:25 - Browser support 07:05 - Practical use cases
#css
--
Come hang out with other dev's in my Discord Community π¬ discord.gg/nTYCvrK
And whatever you do, don't forget to keep on making your corner of the internet just a little bit more awesome!One small tweak to instantly improve your gradientsKevin Powell2024-06-27 | CSS uses srgb for color interpolation by default, but CSS now allows us to define what space we want, helping improve the look of our gradients.Smart design patterns with container queriesKevin Powell2024-06-26 | Container queries are more than just a media query that looks at the parent, it also is aware of the font-size of the parent, which opens up some interesting possibilities that media queries simply donβt do.
β Timestamps 00:00 - Introduction 00:12 - The classic example of container queries: the card 00:45 - Container queries can do more! 01:33 - The basics of container queries 03:20 - Units matter more with container queries 06:28 - Because units matter, we can make βsmartβ layouts 14:30 - Little bonus with :has()
#css
--
Come hang out with other dev's in my Discord Community π¬ discord.gg/nTYCvrK
@scope is here, and it's pretty awesome! This video is a bit of crash course into it, looking at why it can come in handy, where it fits into the cascade, some of the potential issues you can run into when using it, and more.
β Timestamps 00:00 - Introduction 00:43 - Why you might want scope in the first place 03:40 - Avoiding this issue using @scope 06:50 - Why this solves the problem - scope proximity 09:05 - Specificity still matters 10:28 - CSS Demystified 11:08 - Stop running into specificity issues thanks to scope 13:30 - Stop the scope at a specific element or elements 16:25 - You can have selector lists if you need to target several elements 17:16 - The difference between & and :scope 20:52 - Things will still inherit! 22:24 - Using inline style blocks 24:45 - Browser support
#css
--
Come hang out with other dev's in my Discord Community π¬ discord.gg/nTYCvrK
And whatever you do, don't forget to keep on making your corner of the internet just a little bit more awesome!CSS animations just got a lot more powerfulKevin Powell2024-06-19 | Scroll-based animations with CSS are incredibly powerful AND super easy to use, can't ask for much more than that!Chatting with Clark Sell on the current state of front-end, CSS, and moreKevin Powell2024-06-18 | Clark Sell is the man behind @ThatConference - I'll be speaking there this summer and hosting a mini-meetup! Get more information and your tickets here: thatconference.com/wi and you can use kevinpowell24 at checkout for 10% off
And whatever you do, don't forget to keep on making your corner of the internet just a little bit more awesome!Easily reduce the opacity of a custom property color with relative colorsKevin Powell2024-06-13 | Relative colors are here now, and they incredibly powerful.
#css #frontend #developmentJavaScript Promises Crash CourseKevin Powell2024-06-12 | Links to all the code and more of Chris' great content: gomakethings.com/kevinpowell
β Timestamps 00:00 - Introduction 01:40 - Creating a promise 03:50 - Errors and catch 05:20 - Chaining multiple methods 07:42 - Using finally 08:54 - Practical examples 14:05 - async and await 16:45 - gotchas with async and await 22:00 - Which approach should you use?
#css
--
Come hang out with other dev's in my Discord Community π¬ discord.gg/nTYCvrK
β Timestamps 00:00 - Introduction 00:40 - Using keyframes to animate the display property 04:45 - What you might try to get transition to work 05:58 - What is a discrete animation 08:13 - Open Web Docs 09:00 - Using transitions to go to and from display: none 10:55 - CSS Demystified 11:30 - Using @starting-style 12:30 - Easily have different transitions in each direction 13:52 - Browser support and progressive enhancements 16:12 - Make sure you include overlay for popups and dialogs 17:25 - The problem with peudo-elements, including ::backdrop
#css
--
Come hang out with other dev's in my Discord Community π¬ discord.gg/nTYCvrK
And whatever you do, don't forget to keep on making your corner of the internet just a little bit more awesome!A great way to keep up with front-end developmentKevin Powell2024-06-04 | Check out daily dev to keep up with CSS, and all topics front-end related! https://daily.dev/kevin-powellThe different types of JavaScript functions explainedKevin Powell2024-05-29 | Learn more JS from Chris and get the source code from this video π gomakethings.com/kevin-powell
In JavaScript, we have several different ways to create a function, with function declarations, function expressions, and arrow functions. To help make sense of it all, Chris Ferdinani joined me to take a look at the different ways we can do it, and break down when you would use one type over another.
β Timestamps 00:00 - Introduction 00:58 - Function declaration 01:33 - Function expression 02:05 - The difference between function declarations and expressions 06:00 - Organizing our code 07:59 - Arrow functions 09:35 - How the different types of functions handle "this" 13:10 - Creating more terse code with arrow functions 13:55 - Which one to use, and when?
#css
--
Come hang out with other dev's in my Discord Community π¬ discord.gg/nTYCvrK
And whatever you do, don't forget to keep on making your corner of the internet just a little bit more awesome!Transitioning to and from display none is easy now!Kevin Powell2024-05-23 | We used to have to come up with workarounds for animating and transitioning to and from display: none, but it's really easy to do now!
β Timestamps 00:00 - Introduction 00:11 - The long way with a pseudo-element 01:00 - Using a border-image instead 03:10 - CSS Demystified 03:42 - The fill keyword 04:20 - Making the gradient transparent 04:50 - Removing the extra space around the image 05:09 - Using the border-image shorthand to make it one line of CSS
#css
--
Come hang out with other dev's in my Discord Community π¬ discord.gg/nTYCvrK
And whatever you do, don't forget to keep on making your corner of the internet just a little bit more awesome!Fix ugly text wrapping with this simple CSS trickKevin Powell2024-05-15 | Wrapping text in buttons can look ugly, but if we use text-wrap: nowrap, we run into the possibility of introducing overflows, but luckily there is a better solution!Its time for a change...Kevin Powell2024-05-14 | If youβre interested, you can check out Beyond CSS here: https://www.beyondcss.dev/ or the full catelogue of my courses here: kevinpowell.co/courses
#css
--
Come hang out with other dev's in my Discord Community π¬ discord.gg/nTYCvrK