Create A CSS File
Create a plain CSS file and write any code you need; it will apply for specific page in website.
/fragment/css/specific/test.css
div{color: red}
copy
Configuring CSS Specific Fragment
In the ref object, add a css property.
Inside it, create a specific object whose keys are absolute paths of the pages that need
styling and whose values are arrays of absolute paths to the CSS fragments that should be injected
onceโon reload, route change, or a cleanup() call.
export const ref = {
css: {
specific: {
"/index.html": ["/fragment/css/specific/test.css"]
}
}
}
copy
๐ Note
Always use absolute path