I'm using StencilJs. The problem is I can't use global styles inside shadow=true
components.
In this section of Docs it explicitly says we can use it for adding font-face and css-reset. But I'm not able to use this feature. it only applies to components with shadow=false
Here is my global.style.scss
body{
background-color: red;
}
button{
cursor: pointer;
border: none;
box-shadow: none;
outline: none;
&:hover, &:focus{
outline: none;
box-shadow: none;
}
}
in stencil.config.ts I have
export const config: Config = {
namespace: 'areas-power',
globalStyle: 'src/assets/styles/global.style.scss',
outputTargets: [
{
type: 'dist',
esmLoaderPath: '../loader',
},
{
type: 'dist-custom-elements',
},
{
type: 'docs-readme',
},
{
type: 'www',
serviceWorker: null, // disable service workers
},
],
plugins: [
sass()
]
};
I also added its link to index.html file. style only apply to body
tag. it doesn't apply on buttons inside other components. How I can add shared css-reset and font-face to all components in Stencil?