콘텐츠로 건너뛰기
  • 카테고리
  • 최근
  • 태그
  • 인기
  • 사용자
  • 그룹
스킨
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • 기본 (Cosmo)
  • 스킨 없음
축소

책공장

  1. 홈
  2. AI와 함께
  3. 폰트제작
  4. 반응형 폰트를 위한 공식
AI시대 출판사, 창작자는 무엇을 해야할지 홍보는 어떻게 하는건지 네이버, 카카오톡, 구글 계정으로 로그인 가능

반응형 폰트를 위한 공식

예약됨 고정됨 잠김 이동됨 폰트제작
1 게시물 1 작성자 348 조회수
  • 오래된 순
  • 최신 순
  • 가장 많은 투표
답글
  • 토픽으로 답글
로그인 후 답글 작성
이 토픽은 삭제되었습니다. 토픽 관리 권한이 있는 사용자만 볼 수 있습니다.
  • adminA 오프라인
    adminA 오프라인
    admin
    에 작성함 마지막 수정자:
    #1

    https://jameshfisher.com/2024/03/12/a-formula-for-responsive-font-size/

    This CSS is now part of most websites I make:

    :root {
    font-size: calc(1rem + 0.25vw);
    }
    This rule is an alternative to @media rules like this from nytimes.com:

    p { font-size: 1.125rem; }
    @media (min-width: 740px) {
    p { font-size: 1.25rem; }
    }
    This pattern is the norm: a small font size, a large font size, and a breakpoint. Here’s a sample of common sites:

    Small font-size Large font-size Breakpoint
    Medium.com 1.125rem 1.25rem 728px
    Substack.com 1.125rem 1.25rem 768px
    Nytimes.com 1.125rem 1.25rem 740px
    But breakpoints are mathematically ugly! Instead of defining font-size piecewise, can’t we use one linear function? Here’s the line I believe they’re trying to approximate:

    With modern CSS, we can just write that function! It’s calc(1.0625rem + 0.2604vw). I round this to 1rem + 0.25vw.

    Sharp-eyed readers might wonder: doesn’t my CSS have circular reasoning? If rem is defined as “Font size of the root element”, how can we use 1rem in the definition of font-size on the root element?! It turns out it’s a special case:

    When specified in the font-size property of the root element, or in a document with no root element, 1rem is equal to the initial value of the font-size property.

    1 답글 마지막 답글
    0
    • 에 adminA admin님이 에서 이 토픽을 이동함
    • 에 adminA admin님이 에서 이 토픽을 이동함
    • 에 adminA admin님이 자유게시판에서 이 토픽을 이동함
    • 에 adminA admin님이 만화에서 이 토픽을 이동함
    답글
    • 토픽으로 답글
    로그인 후 답글 작성
    • 오래된 순
    • 최신 순
    • 가장 많은 투표


    0

    온라인

    136

    사용자

    28.9k

    토픽

    35.3k

    게시물
    Powered by Argo9 | a1bbs |naver | Contributors
    • 로그인

    • 계정이 없으신가요? 등록

    • 검색하려면 로그인하거나 등록하세요.
    • 첫 게시물
      마지막 게시물
    0
    • 카테고리
    • 최근
    • 태그
    • 인기
    • 사용자
    • 그룹