You can integrate CSS in Marko.js components by including a <style> tag directly within the component or by importing a separate CSS file. Here's an example:
Inline CSS:
<template>
<style>
.example {
color: blue;
}
</style>
<div class="example">This text is blue.</div>
</template>
External CSS:
- Create a CSS file (e.g., styles.css):
.example {
color: blue;
}
- Import the CSS file in the component:
<template>
<import styles from './styles.css' />
<div class="example">This text is blue.</div>
</template>