Skip to content
Browse files

Web UI: Update styleguide to discourage grit includes


Bug: None
Change-Id: I6b666f7531c1a68a2a7ab3ba13b11f8b061ef0b3
Commit-Queue: Rebekah Potter <>
Reviewed-by: Demetrios Papadopoulos <>
Cr-Commit-Position: refs/heads/master@{#722195}
  • Loading branch information
rbpotter Commit Bot
rbpotter authored and Commit Bot committed Dec 5, 2019
1 parent ebd856e commit 6068a2839c9ce8b052e84a6e27bb634a7aef0dd8
Showing with 4 additions and 9 deletions.
  1. +4 −9 styleguide/web/
@@ -460,15 +460,10 @@ function isWindows() {

`<include src="[path]">` reads the file at `path` and replaces the `<include>`
tag with the file contents of `[path]`.

Don't use `</include>` to close these tags; they're not needed nor supported.

<div class="note">
Using <code>&lt;include&gt;</code> simply pastes the entire contents of a file,
which can lead to duplication. If you simply want to ensure some code is loaded
(and usually you do), you should use HTML Imports instead.
tag with the file contents of `[path]`. Don't use `<include>` in new JS code;
[it is being removed.](
Instead, use JS imports in new pages and pages that use JS modules. Use HTML
imports in existing pages that are still using HTML imports/Polymer 2.

Grit can read and inline resources when enabled via `flattenhtml="true"`.

0 comments on commit 6068a28

Please sign in to comment.
You can’t perform that action at this time.