Chapter-10 Jo Dikhta hai vo bikta hai
\1) Various ways to write css?
const Button = styled.button`
font-size: 1rem;
margin: 1rem;
padding: 1rem 1rem;
@media (min-width: 768px) {
padding: 2rem 2rem;
}
border-radius: 0.25rem;
border: 2px solid blue;
background-color: blue;
color: white;
`;
const TestComponent = () => (
<>
Hello world!
</>
);
ul className="flex p-4 space-x-3 ml-[1000px]">
Home
\2) How do we Configure Tailwind?
2) Configure – {
“Plugins”:
{“tailwindcss”: {}
}
}
3) Configure your terminal path - /** @type {import('tailwindcss').Config} */
module.exports = {
content: ["./src/**/*.{html,js,ts,jsx,tsx}"],
theme: {
extend: {},
},
plugins: [],
};
3) In tailwind CSS What does all the keys means (content, theme, extend, plugins)?
\4) Why do we have .postcssrc file?
Our Browser will not know any tailwind CSS so what happens our Parcel will call postcssrc which will convert our tailwind into a CSS. Basically we can say it is interpreted tailwind to CSS.