Move <style> inside <template> in all plugin files

This is a required step for Polymer 2 compatibility:
https://polymer-library.polymer-project.org/2.0/docs/upgrade#remove-deprecated-patterns-in-dom-module

Bug: Issue 11107
Change-Id: I3fd017326d412817f6650dcffe53f2b022a66e64
This commit is contained in:
Ben Rohlfs
2019-07-02 21:37:09 +02:00
parent d33b21ca57
commit 1fa5fdbacc
4 changed files with 43 additions and 35 deletions

View File

@@ -30,13 +30,15 @@ Here's a recommended starter `myplugin.html`:
``` html ``` html
<dom-module id="my-plugin"> <dom-module id="my-plugin">
<script> <template>
Gerrit.install(plugin => { <script>
'use strict'; Gerrit.install(plugin => {
'use strict';
// Your code here. // Your code here.
}); });
</script> </script>
</template>
</dom-module> </dom-module>
``` ```

View File

@@ -23,13 +23,15 @@ Plugins should provide Style Module, for example:
``` html ``` html
<dom-module id="some-style"> <dom-module id="some-style">
<style> <template>
:root { <style>
--css-mixin-name: { :root {
property: value; --css-mixin-name: {
property: value;
}
} }
} </style>
</style> </template>
</dom-module> </dom-module>
``` ```

View File

@@ -7,20 +7,22 @@
</dom-module> </dom-module>
<dom-module id="my-plugin-style"> <dom-module id="my-plugin-style">
<style> <template>
html { <style>
--change-metadata-assignee: { html {
display: none; --change-metadata-assignee: {
display: none;
}
--change-metadata-label-status: {
display: none;
}
--change-metadata-strategy: {
display: none;
}
--change-metadata-topic: {
display: none;
}
} }
--change-metadata-label-status: { </style>
display: none; </template>
}
--change-metadata-strategy: {
display: none;
}
--change-metadata-topic: {
display: none;
}
}
</style>
</dom-module> </dom-module>

View File

@@ -7,12 +7,14 @@
</dom-module> </dom-module>
<dom-module id="myplugin-app-theme"> <dom-module id="myplugin-app-theme">
<style> <template>
html { <style>
--primary-text-color: #F00BAA; html {
--header-background-color: #F01BAA; --primary-text-color: #F00BAA;
--header-title-content: "MyGerrit"; --header-background-color: #F01BAA;
--footer-background-color: #F02BAA; --header-title-content: "MyGerrit";
} --footer-background-color: #F02BAA;
</style> }
</style>
</template>
</dom-module> </dom-module>