Last active
          October 5, 2024 22:27 
        
      - 
      
- 
        Save jensgro/7a8f76f8deb6072a7af25a65dc9a0994 to your computer and use it in GitHub Desktop. 
Revisions
- 
        jensgro revised this gist Sep 30, 2024 . 1 changed file with 9 additions and 8 deletions.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,19 +1,19 @@ /* ========= nicht so praktisch ========= */ p { font-size: var(--fs-xs); } @media (min-width: 800px) { p { font-size: var(--fs-sm); } } /* ========= besser!!!! ========= */ p { font-size: var(--fz-para, var(--fs-xs)); } @media (min-width: 800px) { p { --fz-para: var(--fs-sm); } } @@ -29,8 +29,9 @@ p { --_fz-para: var(--fs-xs); font-size: var(--_fz-para); } @media (min-width: 800px) { p { --_fz-para: var(--fs-sm); } } 
- 
        jensgro created this gist Sep 30, 2024 .There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,36 @@ /* ========= nicht so praktisch ========= */ p { font-size: var(--fs-xs); @media (min-width: 800px) { font-size: var(--fs-sm); } } /* ========= besser!!!! ========= */ p { font-size: var(--fz-para, var(--fs-xs)); @media (min-width: 800px) { --fz-para: var(--fs-sm); } } /* ========= oder auch ========= */ :root { --fs-xs: 0.85rem; --fs-md: 1rem; --fz-lg: 1.25rem; } p { --_fz-para: var(--fs-xs); font-size: var(--_fz-para); @media (min-width: 800px) { --_fz-para: var(--fs-sm); } }