Skip to content

Change the default font size? #8

Answered by tomowang
junghan0611 asked this question in Q&A
Discussion options

You must be logged in to vote

Tailwind CSS use rem. Two options here:

  1. Add custom CSS in assets/css/main.css:
html {
  font-size: 10px;
}
  1. Use tailwind config tailwind.config.js:
const plugin = require('tailwindcss/plugin');

module.exports = {
  // other settings
  plugins: [
    plugin(function({ addBase }) {
     addBase({
        'html': { fontSize: "10px" },
      })
    }),
  ],
}

You need to run npm run dev-tailwind to generate finally CSS file.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by junghan0611
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants