A website for
🫀 Alic3 🕷️
This is a Next.js project bootstrapped with create-next-app
.
Run the development server:
pnpm dev
Or use turbo
(Installed globally)
turbo dev
Open localhost:3000 with your browser to see.
Sometimes you'll run into issues that can be fixed with a simple clearing of the cache
Try running this script and then re-trying what had the issue before losing hope
pnpm clean
Components live under @/components
.
This project uses CSS modules through SASS (with SCSS syntax).
Make sure your component styles follow the naming convention *.module.scss
and import accordingly in your components tsx
file
import styles from '@/components/COMPONENT_NAME.module.scss'
Styles can be applied to an element as shown below
.example {
background: rgba(145, 45, 87, 0.8);
}
import styles from '@/components/Example.module.scss'
const Example = () => (
<div className={styles.example}>
Example: Applying a style to a component 🎨
</div>
)
Nested styles can also be applied to an element as follows
.example {
background: rgba(145, 45, 87, 0.8);
&.active {
background: rgba(145, 45, 87, 1);
}
}
import styles from '@/components/Example.module.scss'
const Example = () => (
<div className={`${styles.example} ${styles.active}`}>
Example: Applying a nested style 🪺
</div>
)
Since Javascript interprets a -
as an operator we have to change our syntax slightly for kebab cased style names
.kebab-case-example {
background: rgba(145, 45, 87, 0.8);
}
import styles from '@/components/KebabCaseExample.module.scss'
const KebabCaseExample = () => (
<div className={styles['kebab-case-example']}>
Example: Applying a Kebab cased style 🍡
</div>
)
Happy hacking 👁️⏝🧿🪡
-alic3