호스트 컨텍스트와 요소 사용자 상태를 결합 할 수 있는지 알고 싶습니다. 예를 들어 는 :호스트 컨텍스트와 사용자 상태
<polymer-element name="my-element">
<template>
<style>
:host(:hover) {
background-color: blue; // For all other situations
}
:host-context(my-app) {
// TODO: Apply darkblue ONLY when my-element is hosted within my-app
// and the user state of my-element is hover.
background-color: darkblue;
}
</style>
Hello
</template>
<script src="my-element.js"></script>
</polymer-element>
나는 호스트 컨텍스트 조합을 많이 시도 : 마우스를하지만 그들 중 누구도 제대로 작동하지 않습니다.
미리 도움 주셔서 감사합니다.
감사 브라이언, 나는 결국 그것을 가능하게 사양에 뭔가를 놓친 기대하고 있지만, 템플릿의 루트 요소가 트릭을처럼 래퍼를 사용했다. – Xlikinho