Learn how to power-up your CSS with PostCSS

แชร์
ฝัง
  • เผยแพร่เมื่อ 11 พ.ย. 2024

ความคิดเห็น • 132

  • @sumitkkundu
    @sumitkkundu 3 ปีที่แล้ว +4

    Thank you Kevin. I was actually looking for a tutorial on PostCSS initial setup process. This video will help me a lot. Please make more videos on PostCSS features and benefits. Thank you once again.

  • @mdkawsarislamyeasin4040
    @mdkawsarislamyeasin4040 2 ปีที่แล้ว +5

    Please create more PostCSS video tutorials!
    Please show us more plugging and advanced use of postcss!
    Thank you for this video also!
    love from Bangladesh 🇧🇩

  • @larjasoul
    @larjasoul 2 ปีที่แล้ว +6

    Your channel is an absolute gold mine. Thank you so much for creating the content you do.

  • @mdkawsarislamyeasin4040
    @mdkawsarislamyeasin4040 2 ปีที่แล้ว +1

    Need more videos like this!
    Plz sir, create a full playlist for postcss .
    And show other plugging that how works !

  • @yangenmanuel2659
    @yangenmanuel2659 3 ปีที่แล้ว +57

    If anyone tell me that this man created CSS I'll belive it

    • @KevinPowell
      @KevinPowell  3 ปีที่แล้ว +5

      Haha, no, just been writing it for *a long* time 😅

    • @TheZebrAlpha
      @TheZebrAlpha 3 ปีที่แล้ว

      I thought that was @Wes Bos's dad?

    • @varunc1231
      @varunc1231 3 ปีที่แล้ว +1

      one of the people who has worked on css - th-cam.com/video/kNzoswFIU9M/w-d-xo.html

    • @electricrocodile8533
      @electricrocodile8533 2 ปีที่แล้ว

      Believe*

  • @matiasribero9721
    @matiasribero9721 3 ปีที่แล้ว +19

    Would love a short to see the steps compressed in less than a minute!

    • @maximcoppieters
      @maximcoppieters 3 ปีที่แล้ว +2

      PostCSS in 100 seconds
      -fireship
      (soon maybe)

    • @matiasribero9721
      @matiasribero9721 3 ปีที่แล้ว

      @@maximcoppieters He did it already lmao

    • @maximcoppieters
      @maximcoppieters 3 ปีที่แล้ว

      @@matiasribero9721 Oh, of course he did :] (just found it)

  • @paulwdoyle
    @paulwdoyle 2 ปีที่แล้ว

    WOW! ... You've just changed my life!!!... Thank you so much, your videos are a wonderful resource.

  • @siddiqahmed3274
    @siddiqahmed3274 3 ปีที่แล้ว +1

    Css supercharged 🔥♥️
    Thanks KING♥️
    I would also love to see some more videos or maybe a sort of big project of jamstack using its all important features. I don't know much about it except for your video😅

  • @Nounearthlyglow
    @Nounearthlyglow 3 ปีที่แล้ว

    Always great to find a fresh video by a reliable creator ESPECIALLY when you only find out about a subject/concept just a day prior to the video being released! Thank you. I still have more to learn, but this is a great start.

  • @sevsol88
    @sevsol88 3 ปีที่แล้ว

    Perfect Timing for me yesterday I started looking into postCSS tutorials and who better than Kevin

  • @cindykee3719
    @cindykee3719 3 ปีที่แล้ว

    Thank you SO MUCH for doing this video! I have been wanting to know how to use PostCSS for a little while now and how I have the step-by-step instructions right here to use in my next project! This is great!

  • @AdamFiregate
    @AdamFiregate 3 ปีที่แล้ว +9

    Excellent, Kevin! 🙏Could you do a series on PostCSS? 😇 Thanks.

    • @KevinPowell
      @KevinPowell  3 ปีที่แล้ว +3

      Any specific things you'd like to see?

    • @israelssantanna
      @israelssantanna 3 ปีที่แล้ว +7

      I don't know about him, but I would like to see everything! Hahaha
      But seriously, a postcss beginner series (installation/configuration/{most used,basic} plugins) would be wonderful!

    • @AdamFiregate
      @AdamFiregate 3 ปีที่แล้ว +3

      I usually use PostCSS with SCSS, cssnano, and Autoprefixer. I don't have much knowledge beyond these. Any other things can be interesting, plugins, etc. Thanks!

  • @SlayDota9
    @SlayDota9 3 ปีที่แล้ว

    omg the way you smile Kevin is so nice

  • @pyprem
    @pyprem 3 ปีที่แล้ว

    Awesome video! Just a small note: you actually don't need to do npm init if you just want to fetch some libraries. You can just npm install in an empty folder.

  • @doyouwatchanime58
    @doyouwatchanime58 3 ปีที่แล้ว

    whoa i just started learning css and it looks cool aldready and that writing css in diffrent kind of folders and just made choose from previous ones and make new css in one touch

  • @devchaudhary78
    @devchaudhary78 3 ปีที่แล้ว +1

    Great explanation kevin🙌

  • @k3tna
    @k3tna 3 ปีที่แล้ว

    Amazing. Thanks, it couldn't have been better explained.

  • @naps7039
    @naps7039 3 ปีที่แล้ว +1

    I learned a lot from your videos fam, thank you and keep up the great work

  • @adamsDevArt
    @adamsDevArt 3 ปีที่แล้ว

    Thank you Kevin,
    I always enjoy your videos!
    All this video I thought why not do it all with sass,
    am i missing something?
    🙏🏼

  • @e11world
    @e11world 2 ปีที่แล้ว

    This is very interesting. I always use SCSS so this feels like a good maybe for just .css files but still great to know. Thanks Kevin!

    • @devbash
      @devbash 2 ปีที่แล้ว

      You can use both!

  • @Gamerraviofficialaccount
    @Gamerraviofficialaccount 2 ปีที่แล้ว

    I just loved it... Really informative

  • @MrBlaq
    @MrBlaq 3 ปีที่แล้ว

    Awesome. Thank you! Would you be able to post the occasional postcss vid highlighting what plugins you use in your workflow?

  • @EpicphoneGamer
    @EpicphoneGamer 2 ปีที่แล้ว +4

    Thank you for the tutorial! As a newbie to all of this, this feels waaay more complicated than SASS. When should I prefer postCSS over SASS?

    • @EpicphoneGamer
      @EpicphoneGamer 2 ปีที่แล้ว

      Oh and another question: Do I need PostCSS when using the React framework? Is it compatible, an useful addition or are a lot of postCSS features obsolete because of built-in features in React?

  • @8ack2Lobby
    @8ack2Lobby 3 ปีที่แล้ว +2

    My VS Code kept showing syntax errors until I installed the extension "PostCSS Language Support".

  • @valeriousmonk654
    @valeriousmonk654 2 ปีที่แล้ว

    More postCSS plz

  • @laceyhunter2209
    @laceyhunter2209 3 ปีที่แล้ว

    Incredible, Kevin.

  • @moemenchalouati4182
    @moemenchalouati4182 3 ปีที่แล้ว +3

    I've literally been stuck all day trying to figure out how to use postcss with parcel man

  • @michaelfaith
    @michaelfaith 3 ปีที่แล้ว

    Great video. And i also love Sass! Would love some dedicated Sass content. 🙌

  • @jacoblockwood4034
    @jacoblockwood4034 3 ปีที่แล้ว

    11:45 If you are on a mac it is control + C

  • @Jxerot
    @Jxerot 2 ปีที่แล้ว +2

    Why use PostCSS if less / sass / scss can do exactly the same? Got my phpstorm + less compiler + autoprefix + minify for years now :-) Same same but different? Why should I use postCSS instead of my setup?

  • @alexfrozen
    @alexfrozen 2 ปีที่แล้ว

    You can use Ctrl+L instead of "clear" in terminal)

  • @splendourb1477
    @splendourb1477 ปีที่แล้ว

    Hi! Please I need your. My output file returns '@import 'files'' instead of the content of the files. How do I fix it?

  • @varunjathin
    @varunjathin 3 ปีที่แล้ว +1

    Can you please do a video on removing unused css from the project? Thank you

  • @palamz7027
    @palamz7027 3 ปีที่แล้ว +2

    Love you videos! For how long have you been coding?

    • @KevinPowell
      @KevinPowell  3 ปีที่แล้ว +6

      Started as a hobby in 1997 or 1998... did it on and off for, and started to take it seriously in... 2006 or 2007 maybe, and started teaching it in 2014 :)

  • @nomad100hd
    @nomad100hd 3 ปีที่แล้ว +1

    It's still control+c on Mac and Linux.

  • @josvelema2362
    @josvelema2362 3 ปีที่แล้ว +3

    Cool stuff! If you have the patience for the setting it up you get a clean and organised workflow , can't wait for your SASS course ;) . Also like that you can use future-CSS , what got me thinking ; can it do subgrid?

    • @nextentrepreneur9288
      @nextentrepreneur9288 3 ปีที่แล้ว +2

      When referring to "writing future css", it means writing css syntax that might be natively adopted by browsers which then gets compiled down to current css.
      This means that it's all current css at the end and features that are not yet supported by css can't be used as far as I know (unless you mess with the browsers' flags)
      _Syntactic sugar_ might be the perfect expression to describe this "future css" imo

  • @med219
    @med219 3 ปีที่แล้ว

    Very well to improve organisation in a big project with many developers. But in a little project its useless and a waste of time. Why turn simple thing that work well to something more confusing…good vidz

  • @amarg26
    @amarg26 2 ปีที่แล้ว

    PostCSS or Stylelint which to choose what ?

  • @sanmeetsingh4
    @sanmeetsingh4 3 ปีที่แล้ว

    CSS == KEVIN
    CSS evaluates
    Awesomly true 😊 [ Kevin and me are besties]

  • @francesca5295
    @francesca5295 ปีที่แล้ว

    i'm not sure why but when i try to run the postcss:watch I get the folder I get the file.css buy inside it's the same as the import it just shows the @import.... anyone can help?

  • @pooriagholami7086
    @pooriagholami7086 3 ปีที่แล้ว

    thnak you for your useful channel, but why we should use post-css when we can use sass(scss) instead!

  • @antifa_communist
    @antifa_communist ปีที่แล้ว

    Do you have to use require and module.exports or can you use ES modules?

  • @lucienchu9649
    @lucienchu9649 3 ปีที่แล้ว

    Morning Kevin, finally sth I can help, in VS code, to split a tab on right hand side, the short cut is ctrl + \, hope this could help :).

  • @amarg26
    @amarg26 2 ปีที่แล้ว

    Also can you able to make another tutorial on postcss-uncss on a mid size project?

  • @mod_123_
    @mod_123_ 3 ปีที่แล้ว

    Any tips for cross browser css other than autoprefixing? Still new to it

  • @pipegoods
    @pipegoods ปีที่แล้ว

    Where i can read all features order by stage?

  • @mathiasmatanda8848
    @mathiasmatanda8848 3 ปีที่แล้ว +4

    CSS knows Kevin

  • @dieweltentdecker5878
    @dieweltentdecker5878 3 ปีที่แล้ว +1

    Finally. Do you recommend using parcel or gulp (or how it is called)?

    • @KevinPowell
      @KevinPowell  3 ปีที่แล้ว +1

      Both are great. Depends on your needs. Vite is pretty great as well, which uses Rollup.

  • @programming3043
    @programming3043 2 ปีที่แล้ว

    Can we use sass along with postcss, idk why I would do that. PostCSS is similar to tailwind, I guess tailwind uses postCSS under the hood

  • @jenstornell
    @jenstornell 3 ปีที่แล้ว

    It's CTRL + C on both Mac and PC to terminate the terminal. 😊

  • @_anjianto
    @_anjianto 3 ปีที่แล้ว

    Do you have a video for handling blue and purple color sir? I always get stuck with this colors, on Chrome and Firefox this color like difference. If i use purple on chrome, firefox will output as blue and when i use blue on chrome, firefox will output as purple. Which one is correct?

  • @tamantaman
    @tamantaman 2 ปีที่แล้ว

    Thank you very mucho

  • @andriilukianenko8106
    @andriilukianenko8106 2 ปีที่แล้ว

    Awesome!

  • @okopyl
    @okopyl 3 ปีที่แล้ว

    on mac it's control c as well

  • @shaijuelayidath
    @shaijuelayidath ปีที่แล้ว

    Hello Sir, I would like to use PostCSS to generate minified files from all the CSS files in a directory. Can you advice how can i achive it. I was trying the follwing NPM scripts and failed. Thanks in Advance!
    "scripts": {
    "postcss": "assets/css/*.css > assets/css/*.min.css"
    }

  • @shortsquake101
    @shortsquake101 3 ปีที่แล้ว

    i love your videos my uncle

  • @JonRonnenberg
    @JonRonnenberg 2 ปีที่แล้ว

    It's interesting that you put components before utilities. I use BEM and always put utilities before my blocks/components, since I want a component to always "win" over utilities. But maybe I have been doing it wrong all this time. What is your rational for putting utilities at the end?

  • @AlfredTuinmanOurManInIndia
    @AlfredTuinmanOurManInIndia ปีที่แล้ว

    Postcss does not seem to be able to cope with ES6 so one would need to use Rollup (or similar)

  • @JonHogg
    @JonHogg 3 ปีที่แล้ว

    I was lost at open up Terminal. Where is that?!

  • @carstenruppert8443
    @carstenruppert8443 3 ปีที่แล้ว

    Great work but can i use global variables from Color.css in navbar.css as in @use like sass ?

  • @zagbaleeric3706
    @zagbaleeric3706 3 ปีที่แล้ว

    I love your videos thanks a lot of....

  • @elitedire4k
    @elitedire4k 2 ปีที่แล้ว

    Can this work with .scss files or no. Also is this what you use for all your projects?

  • @Nitrxgen
    @Nitrxgen 3 ปีที่แล้ว

    This is the tiniest contribution ever I know but since you make a point about saving keystrokes, cls is shorter than clear

    • @IainSimmons
      @IainSimmons 3 ปีที่แล้ว

      Or Command + K on Mac when the terminal is focused, or add a keybinding for Windows:
      {
      "key": "ctrl+k",
      "command": "workbench.action.terminal.clear",
      "when": "terminalFocus"
      },

  • @J90JAM
    @J90JAM 2 ปีที่แล้ว

    Native CSS nesting isn't supported yet or does it not matter because it gets converted?

    • @KevinPowell
      @KevinPowell  2 ปีที่แล้ว

      It gets converted to what the browser can understand :)

  • @deniskotov
    @deniskotov 3 ปีที่แล้ว

    I still don't understand why I need postcss... Is it helpful when you work on big projects?

  • @herrlindner
    @herrlindner 3 ปีที่แล้ว +1

    Wondering if there's any advantage over SCSS? 🤔

    • @IainSimmons
      @IainSimmons 3 ปีที่แล้ว

      I have a feeling it is faster, but also I guess you are learning to write real CSS, even if it's features that aren't yet available in most/some browsers.

    • @herrlindner
      @herrlindner 3 ปีที่แล้ว +1

      @@IainSimmons Wait, what isn't real about SCSS? :o :D

    • @IainSimmons
      @IainSimmons 3 ปีที่แล้ว

      @@herrlindner haha yeah maybe poor choice of words. But it's similar to how some JS frameworks add a lot of stuff over the top of (abstracting) plain, vanilla JS. People learn those patterns, sometimes without learning the underlying native patterns/APIs.
      Example in this video was trying to nest selectors in the SCSS way, instead of with the ampersand which will eventually make it to the CSS core.
      Also, we should probably be learning CSS properties instead of Sass variables and native CSS functions like calc where possible. I know there are other differences, but I expect at one point you'll be able to do pretty much everything in native CSS and won't really need SCSS, similar to how we don't really need jQuery anymore since you can do it all with equivalent vanilla JS patterns.

    • @herrlindner
      @herrlindner 3 ปีที่แล้ว +1

      @@IainSimmons thanks for your time and explanation buddy

  • @jerodwilhoit3582
    @jerodwilhoit3582 3 ปีที่แล้ว

    Love the video and can't wait for the Sass course. Quick question, do you link the public/style.css in your html or the src/style.css?

    • @IainSimmons
      @IainSimmons 3 ปีที่แล้ว

      public, that's the whole point, that you get a single, minified, compiled and browser supported version of your CSS

    • @ArchaicCreationsbp
      @ArchaicCreationsbp 2 ปีที่แล้ว

      @@IainSimmons so just to clarify, "source" is the one we use to build our website and "public" is for the one that people view on their browsers right?

    • @IainSimmons
      @IainSimmons 2 ปีที่แล้ว

      @@ArchaicCreationsbp yup

  • @shayanfaghihi
    @shayanfaghihi 2 ปีที่แล้ว

    I know that there is the @import ability in SCSS, but you've mentioned that we shouldn't use that in CSS. Could you please make it more clear why?

    • @danielherrman9228
      @danielherrman9228 2 ปีที่แล้ว

      As far what I understood... It is not relevant anymore. You should learn how to use @use and @forward instead... as @import will not be supported since october 2022. Can't get my head around... Does not make much sense to me as it worked very well and was very easy to use + DRY principal :) With this update it is way more time consuming (Iguess).

  • @lewis4929
    @lewis4929 2 ปีที่แล้ว

    theres a big issues with this method in that postcss-import cannot handle root css variables and if you're importing all your stylesheets into a single css file, the styling rules get duplicated twice. from what i can see, its unsolvable.

  • @DeltaNrOne
    @DeltaNrOne 3 ปีที่แล้ว

    I have one word “wow”

  • @Евгений-д9в1э
    @Евгений-д9в1э 2 ปีที่แล้ว

    thx for Ukraine ! This video is very helpful!

  • @mohamedyamani8502
    @mohamedyamani8502 3 ปีที่แล้ว

    Great video. Just one question, I've worked with PostCSS before but I just installed postcss-cli without postcss, is that okay?

    • @IainSimmons
      @IainSimmons 3 ปีที่แล้ว

      It probably installs postcss as one of its own dependencies

    • @mohamedyamani8502
      @mohamedyamani8502 3 ปีที่แล้ว

      @@IainSimmons so it suffices to install only postcss-cli + its plugins, correct?

    • @IainSimmons
      @IainSimmons 3 ปีที่แล้ว

      @@mohamedyamani8502 yes, either would work, but I think it makes sense to include postcss and be explicit about it

  • @DanielRios549
    @DanielRios549 2 ปีที่แล้ว

    I still prefer SASS, but this @custom-media is fantastic, even with SASS I will change the mixins I use for breakpoinst to custom media queries, it is better to use them in the other files, no need to import the file with the mixins and it is not an @include, but a @media.

  • @jellycoding
    @jellycoding 3 ปีที่แล้ว

    But you still want to run your _Live Server_ at the same time? And I guess it works great?

    • @KevinPowell
      @KevinPowell  3 ปีที่แล้ว

      No reason live server wouldn't work. If you're using npm scripts or other build tools you could use it with browser sync as well

  • @KajahaX
    @KajahaX 3 ปีที่แล้ว

    11:50 it’s ctrl + c

  • @adarshchakraborty
    @adarshchakraborty 3 ปีที่แล้ว +2

    Sass better?

  • @kabahblog
    @kabahblog 3 ปีที่แล้ว

    It is better parcel or postcs ?

    • @KevinPowell
      @KevinPowell  3 ปีที่แล้ว +1

      You can use Parcel along with PostCSS. Here I was using the PostCSS CLI to keep things simple, but you could use it with something like parcel to also have other stuff in your build process as well.

  • @valeriousmonk654
    @valeriousmonk654 2 ปีที่แล้ว

    using bem in postcss needs a lot of configurations :(

  • @izexi
    @izexi 3 ปีที่แล้ว +3

    y dont just use SASS? omg. Lot of steps to make it work...

  • @abhijitbarman4401
    @abhijitbarman4401 3 ปีที่แล้ว

    Some days ago I was thinking why Kevin yet not made video on PostCSS

  • @john-xb6xj
    @john-xb6xj 3 ปีที่แล้ว +1

    I wonder if I got SASS tutorial in this channel

    • @KevinPowell
      @KevinPowell  3 ปีที่แล้ว +2

      I have a bunch! Just search for Kevin Powell Sass and they should show up :)

  • @The-Dev-Ninja
    @The-Dev-Ninja 3 ปีที่แล้ว

    👍

  • @b391i
    @b391i 3 ปีที่แล้ว

    This Is Joe Say Hi Joe 🤣

  • @learnfronteasy9642
    @learnfronteasy9642 2 ปีที่แล้ว +1

    i'm teaching Tailwind css in persian language

  • @tumon001
    @tumon001 3 ปีที่แล้ว

    Looks hard

  • @Quentinrei
    @Quentinrei 4 หลายเดือนก่อน

    Top 🎉🎉🎉

  • @darthtorus9341
    @darthtorus9341 3 ปีที่แล้ว

    Just an FYI: you don't need to put semicolons at the end of every line in JS any longer. Obviously for consistency, keep doing it, but for future JS files, you don't need them.

  • @arar445
    @arar445 3 ปีที่แล้ว

    first to comment yaaaaaayy =D

  • @Stoney_Eagle
    @Stoney_Eagle 3 ปีที่แล้ว +1

    There is sooo much in this rabbithole, imagine having to import 100+ files manually 🤣
    Nope just configure it to find all the files for you with a regular expression no biggie 😉
    If you leave the background purple, I'll leave a like haha.

  • @pbznt
    @pbznt 3 ปีที่แล้ว

    Dear Kevin, I love your channel, I sent you an email about something that you might want to try to reproduce and try to fix! Please take a look at your spam folder, object is about 'Canadian company'. Well, thank you for all those free videos on TH-cam. You help many people and your channel is great!

  • @ts8960
    @ts8960 3 ปีที่แล้ว

    all that time it took to set it up , its supposed to make our lives easier not harder

  • @alimantado373
    @alimantado373 3 ปีที่แล้ว

    Give an example of what your trying to achieve first! love your site but Id like to see what your talking about before Scripting.

  • @itsplus5396
    @itsplus5396 3 ปีที่แล้ว +1

    Dude it's already up there for ages an it's called scss.....

    • @KevinPowell
      @KevinPowell  3 ปีที่แล้ว

      I have a lot of videos on SCSS too. PostCSS can do a lot that it can't (and Sass can do some things PostCSS can't do as well)

  • @modelshipwrights
    @modelshipwrights 3 ปีที่แล้ว +1

    I'm afraid you lost me with the installation nightmare.

    • @IainSimmons
      @IainSimmons 3 ปีที่แล้ว

      If you think installing a few plugins and adding one additional line for each in a config file is a nightmare, you might be in the wrong business...