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
<dom-module id="my-plugin">
<script>
Gerrit.install(plugin => {
'use strict';
<template>
<script>
Gerrit.install(plugin => {
'use strict';
// Your code here.
});
</script>
// Your code here.
});
</script>
</template>
</dom-module>
```

View File

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

View File

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

View File

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