From 6034efb8ced5d35718c3925119c7cb8eb9da808a Mon Sep 17 00:00:00 2001 From: Alex Peters Date: Thu, 29 Jun 2023 15:14:22 +1000 Subject: [PATCH] doc: add extra_styles/config template notes - State that `extra_styles` are not merged in config template usage. - Suggest a workaround. --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index 455c6276..4e5c7818 100644 --- a/README.md +++ b/README.md @@ -565,6 +565,14 @@ An example is better than words: - color: white ``` +##### Usage with [configuration templates](#configuration-templates) + +- `extra_styles` definitions are **not merged**. +- If inheriting from multiple templates with `extra_styles`, only the last one's `extra_styles` will be inherited. +- If a direct `extra_styles` definition is used, **no** `extra_styles` will be inherited. + +If `extra_styles` are essential for the correct operation of a template, consider nesting them within the template's [custom fields](#custom-fields) as an embedded card. + ### Custom Fields Custom fields support, using the `custom_fields` object, enables you to create your own fields on top of the pre-defined ones (name, state, label and icon).