From 7682212641f47b690ab1f9ad5b6ca3e00dfb4cbc Mon Sep 17 00:00:00 2001 From: Ira Date: Mon, 5 Jul 2021 19:02:34 +0300 Subject: [PATCH] update Styleguide --- src/styleguide/html/data-attribute/data-attribute.mdx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/styleguide/html/data-attribute/data-attribute.mdx b/src/styleguide/html/data-attribute/data-attribute.mdx index f115735a..7ffde121 100644 --- a/src/styleguide/html/data-attribute/data-attribute.mdx +++ b/src/styleguide/html/data-attribute/data-attribute.mdx @@ -1,6 +1,8 @@ # Styleguide for data-attributes -Data-attributes allow us to store extra information on standard, semantic HTML elements. The data attribute can also be used for styling. You can access them from CSS to add styles to the tag that have specific data-attribute. +Data-attributes allow us to store extra information on standard, semantic HTML elements. +The data attribute can also be used for styling. +You can access them from CSS to add styles to the tag that have specific data-attribute. It's simpler and cleaner to write data attributes as data-name, where a name is a concrete name of a data attribute. @@ -18,7 +20,8 @@ Good code example:
``` -If you have several values of component states that you need to pass to a data attribute, you can write it this way: +If you have several values of component states that you need to pass to a data attribute, make data attribute more unique with adding a name to data attribute. +You can do it in this way: ```html data-name="value" @@ -27,7 +30,7 @@ data-name="value" For example: ```html -
horizontal block
+
horizontal block
-
vertical block
+
vertical block
```