Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Style tag needs to live inside the template. Fixes #361 #362

Merged
merged 1 commit into from
Dec 20, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions vaadin-combo-box-light.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@
<link rel="import" href="vaadin-combo-box-shared-styles.html">

<dom-module id="vaadin-combo-box-light">
<style include="vaadin-combo-box-shared-styles">
:host > #overlay {
display: none;
}
</style>

<template>
<style include="vaadin-combo-box-shared-styles">
:host > #overlay {
display: none;
}
</style>

<content></content>

<vaadin-combo-box-overlay
Expand Down
104 changes: 52 additions & 52 deletions vaadin-combo-box-overlay.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,67 +9,67 @@
<link rel="import" href="vaadin-spinner.html">

<dom-module id="vaadin-combo-box-overlay">
<style>
:host {
position: absolute;
@apply(--shadow-elevation-2dp);
background: #fff;
border-radius: 0 0 2px 2px;
top: 0;
left: 0;

/**
* Keep the vaadin-combo-box-overlay above paper-dialogs.
* iron-overlay-manager.html: Polymer.IronOverlayManagerClass.prototype._applyOverlayZ
*/
z-index: 200;
overflow: hidden;
}
<template>
<style>
:host {
position: absolute;
@apply(--shadow-elevation-2dp);
background: #fff;
border-radius: 0 0 2px 2px;
top: 0;
left: 0;

/**
* Keep the vaadin-combo-box-overlay above paper-dialogs.
* iron-overlay-manager.html: Polymer.IronOverlayManagerClass.prototype._applyOverlayZ
*/
z-index: 200;
overflow: hidden;
}

#scroller {
overflow: auto;
max-height: var(--vaadin-combo-box-overlay-max-height, 65vh);
#scroller {
overflow: auto;
max-height: var(--vaadin-combo-box-overlay-max-height, 65vh);

/* Fixes item background from getting on top of scrollbars on Safari */
transform: translate3d(0,0,0);
/* Fixes item background from getting on top of scrollbars on Safari */
transform: translate3d(0,0,0);

/* Enable momentum scrolling on iOS (iron-list v1.2+ no longer does it for us) */
-webkit-overflow-scrolling: touch;
}
/* Enable momentum scrolling on iOS (iron-list v1.2+ no longer does it for us) */
-webkit-overflow-scrolling: touch;
}

#selector {
--iron-list-items-container: {
border-top: 8px solid transparent;
border-bottom: 8px solid transparent;
};
}
#selector {
--iron-list-items-container: {
border-top: 8px solid transparent;
border-bottom: 8px solid transparent;
};
}

#selector .item {
cursor: pointer;
padding: 13px 16px;
color: var(--primary-text-color);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
#selector .item {
cursor: pointer;
padding: 13px 16px;
color: var(--primary-text-color);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}

:host([opened][loading]) {
/* roughly the size of a list with one item */
display: block !important;
height: 58px;
}
:host([opened][loading]) {
/* roughly the size of a list with one item */
display: block !important;
height: 58px;
}

#selector:not([touch-device]) .item:hover,
#selector .item[focused] {
background: #eee;
}
#selector:not([touch-device]) .item:hover,
#selector .item[focused] {
background: #eee;
}

#selector .item[selected] {
color: var(--primary-color);
}
</style>
#selector .item[selected] {
color: var(--primary-color);
}
</style>

<template>
<vaadin-spinner active="[[loading]]"></vaadin-spinner>
<div id="scroller" scroller="[[_getScroller()]]" on-tap="_stopPropagation" hidden$="[[loading]]">
<iron-list
Expand Down
124 changes: 62 additions & 62 deletions vaadin-combo-box.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,80 +54,80 @@
<link rel="import" href="vaadin-combo-box-icons.html">

<dom-module id="vaadin-combo-box">
<style include="vaadin-combo-box-shared-styles">
:host {
display: block;
padding: 8px 0;
}
<template>
<style include="vaadin-combo-box-shared-styles">
:host {
display: block;
padding: 8px 0;
}

:host > #overlay {
display: none;
}
:host > #overlay {
display: none;
}

paper-input-container {
position: relative;
padding: 0;
}
paper-input-container {
position: relative;
padding: 0;
}

paper-icon-button.clear-button,
paper-icon-button.toggle-button,
:host ::content paper-icon-button.clear-button,
:host ::content paper-icon-button.toggle-button {
position: absolute;
bottom: -4px;
right: -4px;

line-height: 18px !important;
width: 32px;
height: 32px;
padding: 4px;
text-align: center;

color: rgba(0, 0, 0, .38);
cursor: pointer;
margin-top: -1px;
--paper-icon-button-ink-color: rgba(0, 0, 0, .54);
}
paper-icon-button.clear-button,
paper-icon-button.toggle-button,
:host ::content paper-icon-button.clear-button,
:host ::content paper-icon-button.toggle-button {
position: absolute;
bottom: -4px;
right: -4px;

line-height: 18px !important;
width: 32px;
height: 32px;
padding: 4px;
text-align: center;

color: rgba(0, 0, 0, .38);
cursor: pointer;
margin-top: -1px;
--paper-icon-button-ink-color: rgba(0, 0, 0, .54);
}

paper-input-container paper-icon-button.clear-button,
paper-input-container ::content paper-icon-button.clear-button {
right: 28px;
}
paper-input-container paper-icon-button.clear-button,
paper-input-container ::content paper-icon-button.clear-button {
right: 28px;
}

paper-input-container paper-icon-button:hover,
paper-input-container ::content paper-icon-button:hover,
:host([opened]) paper-input-container paper-icon-button,
:host([opened]) paper-input-container ::content paper-icon-button {
color: rgba(0, 0, 0, .54);
}
paper-input-container paper-icon-button:hover,
paper-input-container ::content paper-icon-button:hover,
:host([opened]) paper-input-container paper-icon-button,
:host([opened]) paper-input-container ::content paper-icon-button {
color: rgba(0, 0, 0, .54);
}

:host([opened]) paper-input-container ::content paper-icon-button:hover,
:host([opened]) paper-input-container paper-icon-button:hover {
color: rgba(0, 0, 0, .86);
}
:host([opened]) paper-input-container ::content paper-icon-button:hover,
:host([opened]) paper-input-container paper-icon-button:hover {
color: rgba(0, 0, 0, .86);
}

:host([opened]) paper-input-container {
/* Keep the paper-input-container above the dropdown. */
z-index: 20;
}
:host([opened]) paper-input-container {
/* Keep the paper-input-container above the dropdown. */
z-index: 20;
}

#input::-ms-clear {
display: none;
}
#input::-ms-clear {
display: none;
}

#input {
box-sizing: border-box;
padding-right: 28px;
}
#input {
box-sizing: border-box;
padding-right: 28px;
}

:host([opened][has-value]) #input {
padding-right: 60px;
margin-right: -32px;
}
:host([opened][has-value]) #input {
padding-right: 60px;
margin-right: -32px;
}

</style>
</style>

<template>
<paper-input-container
id="inputContainer"
disabled$="[[disabled]]"
Expand Down