bendavis78 / paper-time-picker

Material design time picker component for polymer
http://bendavis78.github.io/paper-time-picker/
MIT License
89 stars 63 forks source link

paper-time-picker-dialog-style.html syntax error #65

Open dsyrstad opened 6 years ago

dsyrstad commented 6 years ago

paper-time-picker-dialog-style.html has an unclosed <custom-style> tag. This causes Chrome to report:

Could not find style data in module named paper-time-picker-dialog-style

It is also missing an import of custom-style.html.

The corrected file would look more like this (like paper-date-picker-dialog-style.html):

<link rel="import" href="../polymer/lib/elements/custom-style.html">

<custom-style>
  <style is="custom-style">
    /* mixin definitions */
    html {
      --paper-time-picker-dialog: {
        margin: 0;
        max-height: 520px !important;
      };
      --paper-time-picker-dialog-picker: {
        margin-top: 0 !important;
        padding: 0;
      };
      --paper-time-picker-dialog-calendar: {
        padding-bottom: 0;
      };
      --paper-time-picker-dialog-heading: {
        margin-bottom: -56px;
      };
    }
  </style>
</custom-style>

<dom-module id="paper-time-picker-dialog-style">
  <template>
    <style>
      /* Application of mixins to local .paper-time-picker-dialog elements */
      .paper-time-picker-dialog {
        @apply --paper-time-picker-dialog;
      }
      .paper-time-picker-dialog > paper-time-picker {
        --paper-calendar: {
          @apply --paper-time-picker-dialog-calendar;
        };
        @apply --paper-time-picker-dialog-picker;
      }
      .paper-time-picker-dialog > paper-time-picker:not([narrow]) {
        --paper-time-picker-heading: {
          @apply --paper-time-picker-dialog-heading;
        };
      }
    </style>
  </template>
</dom-module>

However, this still doesn't fix the Chrome warning for me. Nevertheless, the styles appear to be applied properly to the paper-time-picker when used in a dialog.

I'm using Polymer 2.x and paper-time-picker 1.2.0.