Skip to content

Instantly share code, notes, and snippets.

@janstuemmel
Last active October 26, 2023 15:26
Show Gist options
  • Save janstuemmel/ee079d918dcaf9b95f50c1534d2ed30f to your computer and use it in GitHub Desktop.
Save janstuemmel/ee079d918dcaf9b95f50c1534d2ed30f to your computer and use it in GitHub Desktop.
HTML boilerplate (with tailwind)

HTML with tailwind css

npm i -D tailwindcss normalize.css postcss autoprefixer
npx tailwindcss -i ./main.css -o ./dist/output.css --watch
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>title</title>
<link rel="stylesheet" href="/main.css" type="text/css">
</head>
<body>
<div id="root"></div>
<script src="/main.js" type="text/javascript"></script>
</body>
</html>
@import "normalize.css";
@tailwind base;
@tailwind components;
@tailwind utilities;
/* or without tailwind */
body {
margin: 0;
font-family: Arial, Helvetica, sans-serif
}
ol, ul {
list-style: none;
}
*, *::after, *::before {
box-sizing: border-box;
}
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
'./index.html',
'./src/**/*.{html,jsx,tsx}',
],
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment