Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/visual-studio-2012/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Polymer 1.x:禁用样式的纸张输入_Polymer_Polymer 1.0_Paper Elements_Jsbin_Polymer 1.x - Fatal编程技术网

Polymer 1.x:禁用样式的纸张输入

Polymer 1.x:禁用样式的纸张输入,polymer,polymer-1.0,paper-elements,jsbin,polymer-1.x,Polymer,Polymer 1.0,Paper Elements,Jsbin,Polymer 1.x,我想格式化一个下面是一个如何正确应用mixin的示例 <style> :host { --paper-input-container-disabled: { color: pink; background: red; border: 5px dashed orange; }; } paper-input { @apply(--paper-input-container-disa

我想格式化一个
下面是一个如何正确应用mixin的示例

<style>
    :host {
      --paper-input-container-disabled: {
        color: pink;
        background: red;
        border: 5px dashed orange;
      };
    }
    paper-input {
      @apply(--paper-input-container-disabled);
    }
</style>

:主持人{
--纸张输入容器已禁用:{
颜色:粉红色;
背景:红色;
边框:5px橙色虚线;
};
}
纸张输入{
@应用(--纸张输入容器已禁用);
}

以下是一个示例,介绍如何正确应用混合

<style>
    :host {
      --paper-input-container-disabled: {
        color: pink;
        background: red;
        border: 5px dashed orange;
      };
    }
    paper-input {
      @apply(--paper-input-container-disabled);
    }
</style>

:主持人{
--纸张输入容器已禁用:{
颜色:粉红色;
背景:红色;
边框:5px橙色虚线;
};
}
纸张输入{
@应用(--纸张输入容器已禁用);
}

:主机纸张输入[禁用]{
--纸张输入容器输入颜色:红色;
--纸张输入容器已禁用:{
不透明度:1;
}
}


:主机纸张输入[禁用]{
--纸张输入容器输入颜色:红色;
--纸张输入容器已禁用:{
不透明度:1;
}
}

为了方便未来用户

以下是完整的代码:

http://jsbin.com/mexirubida/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>
<!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>
  :host paper-input[disabled] {
    --paper-input-container-input-color: red;
    --paper-input-container-disabled: {
      opacity: 1;
    }
  }
</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>

为了方便将来的用户

以下是完整的代码:

http://jsbin.com/mexirubida/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>
<!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>
  :host paper-input[disabled] {
    --paper-input-container-input-color: red;
    --paper-input-container-disabled: {
      opacity: 1;
    }
  }
</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>
. 除了我需要的以外,它似乎什么都有。。。文本颜色+1.因为它很有用。。除了我需要的以外,它似乎什么都有。。。文本颜色+1因为它很有用。