Cloud CSS not applied in component
I have the following form component:
<template> <div> <form> <input placeholder="Recipe Name"> <textarea placeholder="Recipe Description..." rows="10"></textarea> </form> </div> </template> <script> export default { name: 'AddRecipeForm' } </script> <style scoped> form { display: flex; flex-direction: column; } </style> <style> uses the scoped attribute.
When applied, CSS does not load . When the scoped is removed, the application does .
However, I want to keep it local to the component.
Why is CSS not applied when the scoped attribute is scoped ?
+23
2 answers
It looks like this was resolved by completely reloading the page. Hot reloading should take care of CSS.
However, for future viewers this is usually asked when CSS with a scope is not applied to a child component. This can be solved using deep selectors . (for example: Using .selector >>> .desired-selector {} )
+26