You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's impossible to style elements that are created within the ng-semantic elements when CSS encapsulation is enabled. This makes it impossible to fine tune styling of specific generated elements.
For example, the generated divs within an <sm-progress></sm-progress> element. This element generates multiple divs such as the "bar" and progress text. None of this can be styled from the component that includes this ng-semantic element because the generated elements (such as "bar" and progress text) do not include the components CSS isolation attribute (such as "_ngcontent-pgr-32").
I'm not sure if this is even possible, but it only makes sense to allow CSS to fine tune the content that is generated by these ng-semantic elements.
The text was updated successfully, but these errors were encountered:
I have a same issue. My current solution is to put ":host >>> " before each selector in your CSS file, which would be applied to elements inside ng-semantic component. Then the styles could be passed down the child tree.
check out here for Angular2's component style.
@YeomansIII, another simple way to solve the problem.
In your component using <sm-*> component, add one more metadata setting encapsulation: ViewEncapsulation.None in @component decorator as the following:
It's impossible to style elements that are created within the ng-semantic elements when CSS encapsulation is enabled. This makes it impossible to fine tune styling of specific generated elements.
For example, the generated divs within an
<sm-progress></sm-progress>
element. This element generates multiple divs such as the "bar" and progress text. None of this can be styled from the component that includes this ng-semantic element because the generated elements (such as "bar" and progress text) do not include the components CSS isolation attribute (such as "_ngcontent-pgr-32").I'm not sure if this is even possible, but it only makes sense to allow CSS to fine tune the content that is generated by these ng-semantic elements.
The text was updated successfully, but these errors were encountered: