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
A component that inherits styles from a base component doesn't appear to pick up the @host rules defined by its base component(s). The following sample demonstrates the issue:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Subclass styling</title>
<script src="platform/platform.js"></script>
<element name="base-element">
<link rel="components" href="components/g-component.html">
<template>
<style>
@host {
color: red;
}
</style>
<content></content>
</template>
</element>
<element name="sub-element" extends="base-element">
<link rel="components" href="components/g-component.html">
<template>
<style>
@host {
font-weight: bold;
}
</style>
<shadow></shadow>
</template>
</element>
</head>
<body>
<base-element>
I'm red
</base-element>
<sub-element>
I should be red and bold
</sub-element>
</body>
</html>
The instance of the does have the styles within processed such that "@host" is replaced with "sub-element". However, the styles of the base component, are injected as is, without "@host" processing. So the that wants to be both red and bold ends up being just bold.
The text was updated successfully, but these errors were encountered:
A component that inherits styles from a base component doesn't appear to pick up the @host rules defined by its base component(s). The following sample demonstrates the issue:
The instance of the does have the styles within processed such that "@host" is replaced with "sub-element". However, the styles of the base component, are injected as is, without "@host" processing. So the that wants to be both red and bold ends up being just bold.
The text was updated successfully, but these errors were encountered: