Kevin Powell
Kevin Powell
  • 801
  • 85 294 337
Naming things just got easier thanks to @scope
🎓 Check out CSS Demystified: cssdemystified.com/?
@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.
🔗 Links
✅ Bramus’ great article on scope:
✅ Browser support table: caniuse.com/css-cascade-scope
⌚ 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
Keep up to date with everything I'm up to
✉ www.kevinpowell.co/newsletter
Come hang out with me live every Monday on Twitch!
📺 www.twitch.tv/kevinpowellcss
---
Help support my channel
👨‍🎓 Get a course: www.kevinpowell.co/courses
👕 Buy a shirt: teespring.com/stores/making-the-internet-awesome
💖 Support me on Patreon: www.patreon.com/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 UA-cam 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!
Переглядів: 32 592

Відео

Chatting with Clark Sell on the current state of front-end, CSS, and more
Переглядів 7 тис.20 годин тому
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 Check out the full version on my second channel: ua-cam.com/video/OXaZ-cqmONQ/v-deo.html #css Come hang out with other dev's in my Discord Community 💬 discord.gg/nTYCv...
JavaScript Promises Crash Course
Переглядів 29 тис.День тому
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 ...
We can now transition to and from display: none
Переглядів 71 тис.14 днів тому
Start writing CSS with confidence 👉 cssdemystified.com/? 🔗 Links ✅ Great article from Chrome for Developers blog on this : developer.chrome.com/blog/entry-exit-animations ✅ Open Web Docs: openwebdocs.org/ ⌚ 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...
The different types of JavaScript functions explained
Переглядів 37 тис.21 день тому
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 anothe...
Add an overlay to a background-image with one line of CSS
Переглядів 47 тис.Місяць тому
Looking to take control of your CSS? Check out my course CSS Demystified 👉 cssdemystified.com/? 🔗 Links ✅ Temani’s article on border-image: www.smashingmagazine.com/2024/01/css-border-image-property ✅ CSS Demystified: cssdemystified.com/? ✅ The finished code from this video: codepen.io/kevinpowell/pen/yLWNbdJ ⌚ Timestamps 00:00 - Introduction 00:11 - The long way with a pseudo-element 01:00 - U...
Avoid these 5 beginner CSS mistakes
Переглядів 72 тис.Місяць тому
Check out CSS Demystified 👉 cssdemystified.com/? Here are some common mistakes I see beginners make in their CSS, and a big thank you to Geoff Graham with helping me make this list! My video on the dumb mistakes I keep making: ua-cam.com/video/GWkMYvoCXyQ/v-deo.html ⌚ Timestamps 00:00 - Introduction 00:30 - Nothing wrong with making mistakes 01:05 - Collapsing margins 03:58 - Working with colla...
It's time for a change...
Переглядів 83 тис.Місяць тому
If you’re interested, you can check out Beyond CSS here: 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 Keep up to date with everything I'm up to ✉ www.kevinpowell.co/newsletter Come hang out with me live every Monday on Twitch! 📺 www.twitch.tv/kevinpowellcss Help support my cha...
A flexbox trick to improve text wrapping
Переглядів 177 тис.Місяць тому
Checkout iCodeThis 👉 icodethis.com/?ref=kevin 🔗 Links ✅ My finished version: icodethis.com/modes/design-to-code/52/submissions/291888 ✅ ICodeThis: icodethis.com/?ref=kevin ✅ I have a 4-hour long course that deep dives flexbox: flexboxsimplified.com Disclaimer: Some of the links above might be affiliate links, which means that I'll receive a commission in case you like and decide to purchase the...
JavaScript var, let, and const explained
Переглядів 22 тис.Місяць тому
JavaScript var, let, and const explained
23 CSS features you should know (and be using) by now
Переглядів 64 тис.Місяць тому
23 CSS features you should know (and be using) by now
What would you call this layout?
Переглядів 34 тис.Місяць тому
What would you call this layout?
I never thought of using CSS animations like this before!
Переглядів 70 тис.2 місяці тому
I never thought of using CSS animations like this before!
Write less CSS by taking advantage of inheritence
Переглядів 22 тис.2 місяці тому
Write less CSS by taking advantage of inheritence
Is CSS getting harder to learn?
Переглядів 17 тис.2 місяці тому
Is CSS getting harder to learn?
Fun button effect with HTML, CSS & JS
Переглядів 21 тис.2 місяці тому
Fun button effect with HTML, CSS & JS
How I find and debug issues in my CSS
Переглядів 26 тис.2 місяці тому
How I find and debug issues in my CSS
Write less code with these 5 CSS tips
Переглядів 44 тис.2 місяці тому
Write less code with these 5 CSS tips
These CSS features give us more control on the cascade and specificity
Переглядів 19 тис.2 місяці тому
These CSS features give us more control on the cascade and specificity
Create a diamond grid with CSS (with a bonus animation)
Переглядів 45 тис.2 місяці тому
Create a diamond grid with CSS (with a bonus animation)
Animate nav on scroll - CSS-only & easy to customize
Переглядів 48 тис.2 місяці тому
Animate nav on scroll - CSS-only & easy to customize
Dynamic horizontal scrolling based on the amount of content
Переглядів 30 тис.2 місяці тому
Dynamic horizontal scrolling based on the amount of content
How to take control of Flexbox
Переглядів 112 тис.2 місяці тому
How to take control of Flexbox
Make position absolute work with you, not against you
Переглядів 25 тис.3 місяці тому
Make position absolute work with you, not against you
Create a cool bubble zoom effect with CSS
Переглядів 33 тис.3 місяці тому
Create a cool bubble zoom effect with CSS
This changed how I use media queries
Переглядів 42 тис.3 місяці тому
This changed how I use media queries
Create an animated, circular progress bar
Переглядів 41 тис.3 місяці тому
Create an animated, circular progress bar
Front-end dev takes on a CSS Battle
Переглядів 22 тис.3 місяці тому
Front-end dev takes on a CSS Battle
A simple CSS solution to select ranges of content
Переглядів 33 тис.3 місяці тому
A simple CSS solution to select ranges of content
Can I clone this fun effect from CSS Day using modern CSS?
Переглядів 35 тис.3 місяці тому
Can I clone this fun effect from CSS Day using modern CSS?

КОМЕНТАРІ

  • @youcefriah9492
    @youcefriah9492 7 годин тому

    he kinda on the spectrum

  • @peterszarvas94
    @peterszarvas94 8 годин тому

    inline scoped style is maybe the perfect middle ground

  • @johanalm8105
    @johanalm8105 8 годин тому

    It's great that Firefox exists as an alternative to Chromium and Safari. But it's a bit frustrating to me that they're so much slower at implementing useful features like this.

  • @techmama2079
    @techmama2079 10 годин тому

    may I get the raw file?

  • @anandcherian.585
    @anandcherian.585 11 годин тому

    very useful

  • @rtindevelops7580
    @rtindevelops7580 12 годин тому

    Kevin, you make me fall in love with CSS each time, I visit one of your videos . thank you so much for the value! 🙌

  • @broyea6943
    @broyea6943 12 годин тому

    1:50 Do I still really need to worry about making a website resonsive at this size?

  • @broyea6943
    @broyea6943 12 годин тому

    1:50 Do I still really need to worry about making a website resonsive at this size?

  • @nested9301
    @nested9301 12 годин тому

    the browser support is good for this feature so we can use it now :) great video!

  • @marciobttb
    @marciobttb 13 годин тому

    what about color-mix? color-mix(in hsl , var(--brand-color) 30%, transparent)

  • @invictusathlete1783
    @invictusathlete1783 13 годин тому

    I think media queries are the best choice for typography, but you can also use calc(...vw + ...rem)

  • @Jason-mk3nn
    @Jason-mk3nn 14 годин тому

    Is there any way to control it by number of characters?

  • @JohnH-jt5wq
    @JohnH-jt5wq 14 годин тому

    Watched this a couple week ago, came in handy today! Thanks Kevin!

  • @zvala396
    @zvala396 14 годин тому

    Well... this video title didn't age that well. CSS4: Properties and features introduced in a spec around 2013 - 2018. CSS5: Properties and features introduced in a spec around 2019 - 2024.

  • @irissoncoimbra1366
    @irissoncoimbra1366 14 годин тому

    Great video! Thanks! Greetings from Brazil

  • @stefanovinicios4623
    @stefanovinicios4623 14 годин тому

    Thanks!

  • @TimothyArrowood
    @TimothyArrowood 16 годин тому

    Lofi beats in the background, every coders zen.

  • @nested9301
    @nested9301 16 годин тому

    Did you stop using scss?

  • @helleye311
    @helleye311 17 годин тому

    Just used this, great trick for basically any reversible animation. Thank goodness I saw this video, or I'd have to make a mess of the css to actually make things work otherwise.

  • @Vladhin
    @Vladhin 22 години тому

    I like that attitude

  • @CC-1.
    @CC-1. 23 години тому

    what about making it smaller

  • @NotKyleChicago
    @NotKyleChicago День тому

    Could you have used "gap" instead of the left margin to shift the image?

  • @NotKyleChicago
    @NotKyleChicago День тому

    There is a subtle difference between display:block and display:flex; the text and image aligned differently.

  • @parallaxmedia7549
    @parallaxmedia7549 День тому

    Your videos are so helpful!! Thank you!

  • @Nerwesta
    @Nerwesta День тому

    I was heavily using custom properties ( CSS variables ) to solve your problem i.e different card colours with different text accent cramped on a minimal amount of CSS classes. But it made the whole thing too much tightly coupled together and a chore to debug, I might give Scope a try soon ! 👍

  • @aarongarcia2433
    @aarongarcia2433 День тому

    Is there a way to pull styling into the admin's 'preview'? I couldn't find anything in Decap's docs. Thanks!

  • @marwaneslam9904
    @marwaneslam9904 День тому

    #NorthernGaza_is_dying_of_hunger #NorthernGaza_is_dying_of_hunger #NorthernGaza_is_dying_of_hunger #NorthernGaza_is_dying_of_hunger #NorthernGaza_is_dying_of_hunger

  • @marwaneslam9904
    @marwaneslam9904 День тому

    #NorthernGaza_is_dying_of_hunger

  • @marwaneslam9904
    @marwaneslam9904 День тому

    #شمال_غزه_يعاني_من_الجوع #شمال_غزه_يعاني_من_الجوع #شمال_غزه_يعاني_من_الجوع #شمال_غزه_يعاني_من_الجوع #شمال_غزه_يعاني_من_الجوع #شمال_غزه_يعاني_من_الجوع #شمال_غزه_يعاني_من_الجوع #شمال_غزه_يعاني_من_الجوع #شمال_غزه_يعاني_من_الجوع #شمال_غزه_يعاني_من_الجوع #شمال_غزه_يعاني_من_الجوع #شمال_غزه_يعاني_من_الجوع #شمال_غزه_يعاني_من_الجوع #شمال_غزه_يعاني_من_الجوع #شمال_غزه_يعاني_من_الجوع #شمال_غزه_يعاني_من_الجوع #شمال_غزه_يعاني_من_الجوع #شمال_غزه_يعاني_من_الجوع #شمال_غزه_يعاني_من_الجوع #شمال_غزه_يعاني_من_الجوع #شمال_غزه_يعاني_من_الجوع #شمال_غزه_يعاني_من_الجوع

  • @WHAT-GRINDS-MY-GEARS
    @WHAT-GRINDS-MY-GEARS День тому

    Learning = (mistakes + retest) + Time

  • @CC-1.
    @CC-1. День тому

    I like the first one I hate when you can't scroll down a website, it has happened to me and you need to just precisely move your mouse

  • @Dboss107
    @Dboss107 День тому

    blog.json not working worthless

  • @xilliman
    @xilliman День тому

    Hey Kevin. It seems, that there is no difference with focus-visible and focus on input elements anymore. Buttons still work. Is this intentional and is there a workaround to eg show an outline on inputs only when navigating with a keyboard?

  • @carolusfrits1816
    @carolusfrits1816 День тому

    Making profit is what every investors want, when you're investing and not making good profit only losses it definitely becomes a waste of time and capital for you. Forex Trading has made a Lot of people wealthy and equally destroyed a lot others

    • @chariovaldagijsbert1933
      @chariovaldagijsbert1933 День тому

      Many newcomers harbour dreams of getting rich quickly through trading and are suddenly frustrated when the opposite occurs either because of poor trading skill or relying on luck. Luck can also play a part in winning and losing.

    • @billysteveroland4881
      @billysteveroland4881 День тому

      Investing with an expert is the best strategy for beginners and busy investors, as most failures and losses in investment usually happen when you invest without proper guidance. I'm speaking from experience..

    • @eugeneraymond252
      @eugeneraymond252 День тому

      I rather invest my money on crypto. Bitcoin trading is great unlike the stock market and other financial markets, bitcoin has no centralized location , since it operates 24hrs in different parts of the world...

    • @filippusbartel6447
      @filippusbartel6447 День тому

      The fact that i got to learn and earn from his program is everything to me think about it, it's a win win for both ways...

    • @gervaascaspar2426
      @gervaascaspar2426 День тому

      This is exactly what Big time investors are talking about, not just you. key thing here is to always trades with a good strategy even if the price goes up or down....

  • @josejimenezhernandez6990
    @josejimenezhernandez6990 День тому

    what is the advantage of using scope instead of child combinator?

  • @user-ut6jz2jc2x
    @user-ut6jz2jc2x День тому

    tks

  • @TechTrench1
    @TechTrench1 День тому

    Top

  • @TheQxY
    @TheQxY День тому

    Having the scope work in HTML is awesome! I currently use CSS Scope Inline for this. Locality of behaviour like that is great for server-side rendering!

  • @cloudsofsunset7323
    @cloudsofsunset7323 День тому

    that interests me👀

  • @osterello
    @osterello День тому

    Isn't it like using nesting in SCSS? @scope (.parent) { .child { color: blue; } } .parent { .child { color: blue; } }

  • @gunnercat8045
    @gunnercat8045 День тому

    actually, sometime this problem happen on desktop, for example when you have a horizontal scrollbar, and then you set the height to 100vh, it will have this problem

  • @codewithsehran
    @codewithsehran 2 дні тому

    why i love programming more than study 😢 man___

  • @nysunra
    @nysunra 2 дні тому

    I don't get it 😐

  • @chillbro2275
    @chillbro2275 2 дні тому

    is the at font-face class meant for self-hosting? I ask because when I copy google fonts they don't share an at font-face class.

  • @Aguycalledmax
    @Aguycalledmax 2 дні тому

    I recently implemented @scope on a very large, very poorly written legacy code base with hundreds of styles that are all applied with incredibly high specificity on very generic elements. I created a new component library to integrate into the existing codebase with sane css but I needed to my component css to ignore all existing styles. I wrapped the entire existing css in an @scope rule which means it will only apply up to my ".no-style" class which I then applied to each of the components in my library. It was the best of a very bad situation and i'm very glad it exists. Our site is used in very specific circumstances and we have less than .5% of users on Firefox. I check for cssscoperule support in js and load fallback css in the rare cases that people are on firefox.

  • @pinkpantheonqueerhistory5699

    Oh god daddy yes! Make that code readable! Oh god daddy yes! yes! make it readable daddy! :p Seriously tho I am so using this from now on.

  • @plamen991
    @plamen991 2 дні тому

    Thanks!