我想将一个<paper-input disabled ...
元素格式化为 NOT disabled
(即,没有使文本变亮)。
下面在我的代码中(以及在这个 jsBin 中)我展示了我到目前为止所尝试的内容。
我怎样才能做到这一点?(请提供一个工作演示。理想情况下,主题 jsBin 的克隆。)
http://jsbin.com/giguwoyoha/1/edit?html,输出<!doctype html>
<head>
<meta charset="utf-8">
<base href="https://polygit.org/components/">
<script src="webcomponentsjs/webcomponents-lite.min.js"></script>
<link href="polymer/polymer.html" rel="import">
<link href="paper-input/paper-input.html" rel="import">
</head>
<body>
<dom-module id="x-element">
<template>
<style>
/* Here is what I have tried so far */
paper-input[disabled] {
--paper-input: {
color: black;
}
}
paper-input {
--paper-input-disabled: {
color: black;
}
}
paper-input {
--paper-input-container-disabled: {
color: black;
}
}
paper-input[disabled] {
color: black;
}
*[disabled] {
color: black;
}
</style>
<paper-input value="This is enabled text. I want to format the below to look like this."></paper-input>
<paper-input value="This is disabled text. I want to format this to look like the above."
disabled></paper-input>
</template>
<script>
(function(){
Polymer({
is: "x-element",
properties: {},
});
})();
</script>
</dom-module>
<x-element></x-element>
</body>