-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #109 from PolymerLabs/remove-custom-style
Use new <custom-style> in webcomponents
- Loading branch information
Showing
10 changed files
with
60 additions
and
104 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<link rel="import" href="polymer-legacy.html"> | ||
<!-- BREAKME(sorvell): remove when custom-style is moved to webcomponentsjs --> | ||
<link rel="import" href="src/legacy/custom-style.html"> | ||
<!-- template elements --> | ||
<link rel="import" href="src/templatizer/dom-bind.html"> | ||
<link rel="import" href="src/templatizer/dom-repeat.html"> | ||
<link rel="import" href="src/templatizer/dom-if.html"> | ||
<!-- custom-style --> | ||
<link rel="import" href="src/styling/custom-style.html"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<!doctype html> | ||
<!-- | ||
@license | ||
Copyright (c) 2016 The Polymer Project Authors. All rights reserved. | ||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt | ||
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt | ||
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt | ||
Code distributed by Google as part of the polymer project is also | ||
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt | ||
--> | ||
<link rel="import" href="style-gather.html"> | ||
<script> | ||
(function() { | ||
'use strict'; | ||
var ce = window.customElements; | ||
var tag = 'custom-style'; | ||
var attr = 'include'; | ||
|
||
ce.whenDefined(tag).then(function() { | ||
var CustomStyle = ce.get(tag); | ||
CustomStyle.processHook = function(style) { | ||
var include = style.getAttribute(attr); | ||
if (!include) { | ||
return; | ||
} | ||
style.removeAttribute(attr); | ||
style.textContent = Polymer.StyleGather.cssFromModules(include) + style.textContent; | ||
}; | ||
}); | ||
})(); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters