title: Tailwind css predefined fontsize depending on screen
body: <p>I need to change fonsize accourding to screensize with tailwind css. Is there a way to define fontsizes according to screen in tailwind.config and apply them to all text?
  Normally i can create custom fontsize and apply in text element.</p>
  <p>Define custom fontsize in tailwind.config:</p>
  <pre><code>module.exports = {
   content: [&quot;./src/**/*.{js,jsx,ts,tsx}&quot;],
   theme: {
      fontSize: {
        xs: &quot;10px&quot;,
        s: &quot;15px&quot;,
        sm: &quot;17px&quot;,
        &quot;2sm&quot;: &quot;20px&quot;,
        m: &quot;22px&quot;,
        md: &quot;25px&quot;,
        l: &quot;30px&quot;,
        xl: &quot;35px&quot;,
        &quot;2xl&quot;: &quot;40px&quot;,
        &quot;3xl&quot;: &quot;45px&quot;,
        &quot;4xl&quot;: &quot;50px&quot;,
        &quot;5xl&quot;: &quot;55px&quot;,
        &quot;6xl&quot;: &quot;60px&quot;,
        &quot;7xl&quot;: &quot;65px&quot;,
        &quot;8xl&quot;: &quot;70px&quot;,
      },
   }
  }
  </code></pre>
  <p>using it in text element:</p>
  <pre><code>&lt;div className=&quot;text-s md:text-m  xl:text-xl&quot;&gt;Text&lt;/div&gt;
  </code></pre>
  <p>in order to avoid applying resposive text size for every text element i need it change fontsize value automatically. Maybe it will look like so in tailwind.config:</p>
  <pre><code>module.exports = {
    content: [&quot;./src/**/*.{js,jsx,ts,tsx}&quot;],
    theme: {
      fontSize: {
        screen: {
          lg: {
            xs: &quot;10px&quot;,
            s: &quot;15px&quot;,
            sm: &quot;17px&quot;,
            &quot;2sm&quot;: &quot;20px&quot;,
            m: &quot;50px&quot;,
            md: &quot;25px&quot;,
          },
          md: {
            xs: &quot;5px&quot;,
            s: &quot;7px&quot;,
            sm: &quot;10px&quot;,
            &quot;2sm&quot;: &quot;15px&quot;,
            m: &quot;17px&quot;,
            md: &quot;20px&quot;,
          },
        },
      },
    }
  };
  </code></pre>
  <p>or do i have to apply responsize fontsize for every text?</p>