Learn how to power-up your CSS with PostCSS

Поділитися
Вставка
  • Опубліковано 18 гру 2024

КОМЕНТАРІ •

  • @larjasoul
    @larjasoul 2 роки тому +6

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

  • @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.

  • @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.

  • @paulwdoyle
    @paulwdoyle 2 роки тому

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

  • @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 🇧🇩

  • @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)

  • @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!

  • @devchaudhary78
    @devchaudhary78 3 роки тому +1

    Great explanation kevin🙌

  • @mdkawsarislamyeasin4040
    @mdkawsarislamyeasin4040 2 роки тому +1

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

  • @SlayDota9
    @SlayDota9 3 роки тому

    omg the way you smile Kevin is so nice

  • @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😅

  • @naps7039
    @naps7039 3 роки тому +1

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

  • @laceyhunter2209
    @laceyhunter2209 3 роки тому

    Incredible, Kevin.

  • @sevsol88
    @sevsol88 3 роки тому

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

  • @k3tna
    @k3tna 3 роки тому

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

  • @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 - ua-cam.com/video/kNzoswFIU9M/v-deo.html

    • @electricrocodile8533
      @electricrocodile8533 2 роки тому

      Believe*

  • @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!

  • @MrBlaq
    @MrBlaq 3 роки тому

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

  • @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.

  • @Gamerraviofficialaccount
    @Gamerraviofficialaccount 2 роки тому

    I just loved it... Really informative

  • @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 :)

  • @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?
    🙏🏼

  • @jacoblockwood4034
    @jacoblockwood4034 3 роки тому

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

  • @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

  • @EpicphoneGamer
    @EpicphoneGamer 3 роки тому +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 3 роки тому

      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?

  • @valeriousmonk654
    @valeriousmonk654 2 роки тому

    More postCSS plz

  • @michaelfaith
    @michaelfaith 3 роки тому

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

  • @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!

  • @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.

  • @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

  • @8ack2Lobby
    @8ack2Lobby 3 роки тому +2

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

  • @mod_123_
    @mod_123_ 3 роки тому

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

  • @amarg26
    @amarg26 2 роки тому

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

  • @varunjathin
    @varunjathin 3 роки тому +1

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

  • @Jxerot
    @Jxerot 3 роки тому +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?

  • @andriilukianenko8106
    @andriilukianenko8106 2 роки тому

    Awesome!

  • @pooriagholami7086
    @pooriagholami7086 3 роки тому

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

  • @nomad100hd
    @nomad100hd 3 роки тому +1

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

  • @sanmeetsingh4
    @sanmeetsingh4 3 роки тому

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

  • @shortsquake101
    @shortsquake101 3 роки тому

    i love your videos my uncle

  • @moemenchalouati4182
    @moemenchalouati4182 3 роки тому +3

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

  • @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 :).

  • @antifa_communist
    @antifa_communist Рік тому

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

  • @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?

  • @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

  • @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

  • @alexfrozen
    @alexfrozen 2 роки тому

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

  • @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

  • @okopyl
    @okopyl 3 роки тому

    on mac it's control c as well

  • @tamantaman
    @tamantaman 2 роки тому

    Thank you very mucho

  • @_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?

  • @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....

  • @amarg26
    @amarg26 2 роки тому

    PostCSS or Stylelint which to choose what ?

  • @jenstornell
    @jenstornell 3 роки тому

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

  • @elitedire4k
    @elitedire4k 2 роки тому

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

  • @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?

  • @pipegoods
    @pipegoods Рік тому

    Where i can read all features order by stage?

  • @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

  • @KajahaX
    @KajahaX 3 роки тому

    11:50 it’s ctrl + c

  • @JonHogg
    @JonHogg 3 роки тому

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

  • @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).

  • @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

  • @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"
    }

  • @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 :)

  • @AlfredTuinmanOurManInIndia
    @AlfredTuinmanOurManInIndia Рік тому

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

  • @mathiasmatanda8848
    @mathiasmatanda8848 3 роки тому +4

    CSS knows Kevin

  • @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?

  • @deniskotov
    @deniskotov 3 роки тому

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

  • @Quentinrei
    @Quentinrei 6 місяців тому

    Top 🎉🎉🎉

  • @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

  • @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.

  • @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"
      },

  • @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.

  • @Евгений-д9в1э
    @Евгений-д9в1э 2 роки тому

    thx for Ukraine ! This video is very helpful!

  • @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.

  • @DeltaNrOne
    @DeltaNrOne 3 роки тому

    I have one word “wow”

  • @valeriousmonk654
    @valeriousmonk654 2 роки тому

    using bem in postcss needs a lot of configurations :(

  • @b391i
    @b391i 3 роки тому

    This Is Joe Say Hi Joe 🤣

  • @abhijitbarman4401
    @abhijitbarman4401 3 роки тому

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

  • @adarshchakraborty
    @adarshchakraborty 3 роки тому +2

    Sass better?

  • @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 :)

  • @izexi
    @izexi 3 роки тому +3

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

  • @arar445
    @arar445 3 роки тому

    first to comment yaaaaaayy =D

  • @The-Dev-Ninja
    @The-Dev-Ninja 3 роки тому

    👍

  • @tumon001
    @tumon001 3 роки тому

    Looks hard

  • @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.

  • @learnfronteasy9642
    @learnfronteasy9642 2 роки тому +1

    i'm teaching Tailwind css in persian language

  • @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.

  • @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)

  • @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.

  • @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 UA-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

  • @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...