7 Practical CSS Typography Tips & Tricks

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

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

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

    ⚠ I realized that I made a mistake in the fluid typography part. Using clamp() with viewport units is not enough, as this implementation can disable browser zoom for certain screen sizes, which is an accessibility problem.
    To work around the problem, you should use viewport units with (+ 1rem):
    font-size: clamp(1rem, 4vw + 1rem, 5rem);

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

    size for ::marker and paddings best use relevant unit, for example if you use EM , you need worry size for marker if need changed font-size UL > LI or BODY, and same for padding.

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

      Thanks for your comment, Антон! Indeed, relative units like REM and EM can help a lot with responsive typograhpy. 🙂

  • @MaxMov-sp8hr
    @MaxMov-sp8hr 10 หลายเดือนก่อน +1

    There are not many subscribers on this channel. But the number of useful comments divided by the number of views gives us an excellent coefficient. Without water and extra sighs! )))

    • @CSSWeekly
      @CSSWeekly  10 หลายเดือนก่อน

      Thank you so much, Max! This means a lot! 🙏
      And I really do have the best viewers and subscribers! 😍

  • @jelilabudu
    @jelilabudu 3 หลายเดือนก่อน +1

    Zoran, something that I learned awhile ago when learning UI/UX is choosing a line height for the heading. 1.1 (110%) seems to be the go-to value, as it scales well while the font size changes.
    Do you agree or there's a better approach to it?

    • @CSSWeekly
      @CSSWeekly  3 หลายเดือนก่อน

      Thanks for your question, Jelil. 🙏
      It depends. Generally speaking, the bigger the font, the smaller the line height you need. I would use 1.1 for a title/headline, but for paragraphs, something like 1.4 or 1.5 is usually better and more readable.

    • @jelilabudu
      @jelilabudu 3 หลายเดือนก่อน +1

      @@CSSWeekly thanks a lot. 🙏
      Knowledge of these little concepts go a long way to improve our design and development skills.

    • @CSSWeekly
      @CSSWeekly  3 หลายเดือนก่อน

      You're very welcome! Indeed they do! 🙂

  • @jelilabudu
    @jelilabudu 3 หลายเดือนก่อน +1

    Zoran, great content from you ❤. I'm your new subscriber.
    One more thing I want to know from you is how are you able to highlight and zoom in to the code section you are typing? Its looks interesting, and I'd like to learn it.

    • @CSSWeekly
      @CSSWeekly  3 หลายเดือนก่อน +1

      Thanks so much, Jelil, and welcome to the CSS Weekly family! 🙂
      I'm using Screenflow to record and edit my videos, so this effect is achieved by adding a Callout action and then Zoom Up along with starting and ending transitions. I got quite a few comments that it's distracting and unnecessary, so I use it a lot less these days. 🙂

    • @jelilabudu
      @jelilabudu 3 หลายเดือนก่อน +1

      @@CSSWeekly that's okay. If the majority of your audience want you to present in a certain way, you just go by it, so far as it doesn't make your work more difficult.

    • @CSSWeekly
      @CSSWeekly  3 หลายเดือนก่อน

      Thanks! I really appreciate and take into consideration any feedback I get. 🙏

  • @JohnnyB.Good10
    @JohnnyB.Good10 ปีที่แล้ว +1

    hey Zoran, how did you get the specific star symbol at 11:10 ?, I try the Windows emoji search but it give me only emojis at the search results, but not symbols(like the star you choose).
    by the way, I took the State of CSS 2023 survey and CSS Weekly is mention there 💪.
    Thanks for the great content.

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

      Thanks for the comment and for watching! 🙏
      This is a native MacOS emoji picker, and it seems that there are also Unicode characters present in the search results. I'd guess that there is some Unicode character picker app on Windows as well, or you can find them online, like here perhaps: symbl.cc/en/collections/star-symbols/
      I've seen CSS Weekly in the State of CSS; it's an incredible privilege to be present there. Thanks for sharing this! 😊

    • @JohnnyB.Good10
      @JohnnyB.Good10 ปีที่แล้ว

      @@CSSWeekly Thanks for the answer ⭐

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

      You’re very welcome! ⭐

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

    Useful advice, but I don't think your advice about a responsive font is right. We do not use vw units for fonts. Kevin Powell explained it quite well in his video th-cam.com/video/veEqYQlfNx8/w-d-xo.html right here: th-cam.com/video/veEqYQlfNx8/w-d-xo.html Many developers make a mistake by spreading advice like this. CSS has its rules and it's up to us to apply them properly, for example because of accessibility.

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

      But, that is why he used clamp, watch the video again ;)

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

      Thanks so much for constructive feedback, Artur! 🙏
      I've tried it out, and zoom seems to be working fine in my demo. And even in the video you've mentioned, Kevin suggested to use clamp() with viewport width units.
      Is there something else I'm missing here? 😕

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

      For some reason yor second reply disappeared. 😞
      But I see it now, Artur. Thanks so much for taking the time to explain it. "+ 1rem" seems like a reasonable solution to the problem. 🙏

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

    Your CSS typography tips and tricks are game-changers! 🎉 As a web design enthusiast, I found your explanations super clear and easy to follow. These techniques will definitely help me take my projects to the next level. Thanks for sharing your expertise and making CSS more approachable! Keep up the fantastic work! 😄🙌

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

      Thank you so much! This really means a lot! 🙏

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

    Here from the rendezvous with cassidoo newsletter!

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

      Welcome, Galdin! Thanks for watching and for your comment! 🙏
      I'm subscribed to cssidoo newsletter, but I still haven't read the latest issue-I'll check it out right away! 🙂

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

    I really like how browsers start improving typography now, like text-wrap: balance, or the ability to tune hyphenation!
    A quick tip for sizing inside typography, e. g. letter-spacing, text-decoration size/spacing and marker size and padding: I'd suggest using units like em or ch for that, so that they're automatically tied to the rendered font-size. This e. g. removes the need for adding another clamp for the marker font-size in your example.
    And for having the list-items aligned with the text, there's also list-style-position: outside, so no need for negative margins.

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

      Thanks so much for the feedback, Veit! These are all great tips! 👏🙏
      I still have a lot to learn about typography. 🙂

  • @dynamic-homepages
    @dynamic-homepages ปีที่แล้ว

    I'm really happy to stumble over this video =) Gave me already 4 things that I will change in my future styling. Thanks a lot.

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

      I'm thrilled to hear this, Timo! 🙂
      Thank you so much for watching and sharing this! 🙏

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

    Another great tutorial :) Thanks

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

      Thank you so, so much! I appreciate the kind words! 🙏

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

    great, big thanks

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

      Thank you so much, Huynh! I'm thrilled to hear that you think it's great! 🙂

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

      @@CSSWeekly hi, glad know you, hope see your next video with other content.

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

      Most certainly, Huynh! I'm publishing new content every week! 😉

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

      @@CSSWeekly wow, i'm glad when hear from you, respect you. Thanks again.

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

      Thank you for watching, Huynh! 🙏