tailwind.config.js 1.52 KB
Newer Older
Trần Anh Phú's avatar
Trần Anh Phú committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
/** @type {import('tailwindcss').Config} */

/** generates a map of sizes from min to max e.g. {'1px':'1px',..., '60px':'60px'} */
function genPxSizeMap(min, max) {
  const sizes = {};
  for (let size = min; size <= max; size++) {
    const sizeToAdd = `${size}px`;
    sizes[sizeToAdd] = sizeToAdd;
  }
  return sizes;
}
module.exports = {
  prefix: "tw-",
  important: true,
  darkMode: "selector",
  content: ["./src/**/*.{html,ts,scss}"],
  theme: {
    container: {
      center: true,
      screens: {
        sm: "100%",
        md: "100%",
        lg: "100%",
        xl: "100%",
        "2xl": "100%",
      },
    },
    colors: {
      white: "#ffffff",
      black: "#000000",
vtduong0912's avatar
vtduong0912 committed
31 32
      sky: "#a3e4ff",
      link: "#1484b2"
Trần Anh Phú's avatar
Trần Anh Phú committed
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
    },
    fontFamily: {
      "roboto-black": ["Roboto-Black", "sans-serif"],
      "roboto-bold": ["Roboto-Bold", "sans-serif"],
      "roboto-light": ["Roboto-Light", "sans-serif"],
      "roboto-medium": ["Roboto-Medium", "sans-serif"],
      "roboto-regular": ["Roboto-Regular", "sans-serif"],
      "roboto-thin": ["Roboto-Thin", "sans-serif"],
    },
    screens: {
      // default: 0 <-> 479 // portrait mobile // fluid width
      sm: "480px", // landscape mobile // fixed width // same design as portrait mobile
      md: "600px", // tablet // fixed width
      lg: "1014px", // laptop // fixed width
      xl: "1336px", // desktop // fixed width
    },
    extend: {
      fontSize: genPxSizeMap(1, 150),
      spacing: genPxSizeMap(1, 300),
      borderRadius: genPxSizeMap(1, 150),
    },
  },
  plugins: [],
};