Designing with Tailwind CSS: Locking an Image to a Fixed Aspect Ratio

Поделиться
HTML-код
  • Опубликовано: 10 ноя 2024

Комментарии • 22

  • @aeadedoyin
    @aeadedoyin 5 лет назад +10

    Wow, I never knew about the padding percentage/width relationship.
    Nice 🚀

  • @jamesthebald
    @jamesthebald 3 года назад +1

    Thanks for taking the time to create such great tools, and for putting them out there for free.

  • @saadmalaeb8372
    @saadmalaeb8372 4 года назад +1

    Tailwind aside, just learned one of the best css tricks. Thank you!

  • @viraltech1387
    @viraltech1387 5 лет назад

    By far the best trick for handling that image in cards. I just used it in my project and boom, everything looks aligned :D

  • @rinorsadiku5802
    @rinorsadiku5802 3 года назад

    You saved me with this one. Please keep these helpful tutorials coming ❤️

  • @LuyenDao-yv9xd
    @LuyenDao-yv9xd Год назад

    I'm still not 100% how this works, but damn it's like magic and wish I had know this many many years ago!

  • @samuelnmeje
    @samuelnmeje 4 года назад

    tailwind is just amazing. you are super amazing.

  • @rahmatalrafi8349
    @rahmatalrafi8349 2 года назад

    You really saved me with this tutorial.

  • @timothymeade-on-twitter
    @timothymeade-on-twitter 2 года назад

    Excellent video +1 for how you are doing the screen splitting!

  • @candideditor
    @candideditor 11 месяцев назад

    I wish this was now supported by padding classes by now. but still good. thanks

  • @porte0
    @porte0 3 года назад +1

    @Adam Wathan Can you share the app that you use for screen splitting?

  • @olawaleajakaye5062
    @olawaleajakaye5062 2 года назад

    you are doing well

  • @RuelAlmonia
    @RuelAlmonia Год назад

    what extension or tool is that on your right side where you click the sm, md and lg?

  • @FrancoisBeyers
    @FrancoisBeyers 4 года назад

    This is awesome! Where can I get those percentages that you copied into the config file? Thanks 🙏🏼

    • @stubborncode5932
      @stubborncode5932 4 года назад +1

      If you run npx tailwindcss init --full tailwindcss-full-config.js, you get a configuration file that includes all of Tailwind's default configuration, where --full is the flag to scaffold the full configuration and tailwindcss-full-config.js is a name of your choice. There you can see all the values that Tailwind is using. You can find the specific ones under spacing.

  • @helloraj19862003
    @helloraj19862003 3 года назад

    Thankyou !!! It helped.

  • @heyyy4987
    @heyyy4987 5 лет назад

    very nice.

  • @anbuselvanrocky
    @anbuselvanrocky 4 года назад

    Since you have mentioned that the spacing utilities by percentage are builtin. So without adding that percentage values in tailwind.config.js it should work, right?
    In my case, its not working. I even tried to add those values as you did. its not working? Any idea? w-1/2 working but pb-1/2 or mb-1/2 like codes are not working?

    • @wendersonfernandes530
      @wendersonfernandes530 3 года назад

      Percentage are not builtin. You need to add it to the extend option in tailwind.config.js file

    • @juanmazzu
      @juanmazzu 3 года назад

      i have the same problem, did you solve it?

    • @wendersonfernandes530
      @wendersonfernandes530 3 года назад +2

      @@juanmazzu take a look at the course repository, here is the tailwind.config.js for this video : github.com/tailwindlabs/designing-with-tailwindcss/blob/master/02-designing-an-image-card/06-locking-images-to-a-fixed-aspect-ratio/tailwind.config.js

  • @ronaldaug8504
    @ronaldaug8504 2 года назад +1

    5:02 😮😲😯