You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/how-to/how-to-use-attributes-for-styling.md
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -294,7 +294,7 @@ To aid in our discussion of these configuration nodes and how to use them, we wi
294
294
{: .bs-callout .bs-callout-info }
295
295
The `<tag>` and `<html>` nodes are beyond the scope of this topic, but like the other nodes, they also map to fields in a form. In this case, the `<tag>` node maps to the Heading's `heading_type` field and the `<html>` node maps to the `heading_text` field from the `pagebuilder_heading_form.xml`.
296
296
297
-
### Understanding and using `<style>` nodes
297
+
### Understanding and using `style` nodes
298
298
299
299
By configuring `<elements>` with `<style>` nodes, you can provide end users with a form field that changes a _specific_ CSS property, such as we did with `opacity`.
300
300
@@ -333,13 +333,13 @@ Each `<style>` node defined for the element's configuration gets added to the DO
333
333
</h2>
334
334
```
335
335
336
-
### Using `<attribute>` nodes instead of `<style>` nodes
336
+
### Deciding to use `attribute` or `style` configurations
337
337
338
338
As mentioned, adding an `<attribute>` node to an `element` configuration gives you a way to provide end users with a form field that can use _CSS classes_, allowing you to change _several_ CSS properties at once. This can be more powerful that using `<style>` configurations that can only change single CSS properties. But depending on your use case, you may not need to use `<attribute>` configurations.
339
339
340
-
Using `<attribute>` or `<style>` configurations is transparent to end users. They're simply interacting with field options to change content styling. But for you, the developer, the choice really depends on how much you need to change the element. If the user option needs to change the element significantly, you may want to use an `<attribute>` so you can apply CSS classes to the element. And if the user option is focused on making a simple property change to the element, you can use a `<style>` configuration.
340
+
Using `<attribute>` or `<style>` configurations is transparent to end users. But for you, the developer, the choice really depends on how much you need to change the element. If the user option needs to change the element significantly, you may want to use an `<attribute>` so you can apply CSS classes to the element. And if the user option is focused on making a simple property change to the element, you can use a `<style>` configuration.
341
341
342
-
### Understanding the `<css>` node {#understandthecssnode}
342
+
### Understanding the `css` node {#understandthecssnode}
343
343
344
344
The `<css>` config node is a bit different from the `<attribute>` and `<style>` nodes. The `<css>` node wasn't designed to be added to an element more than once like the other two nodes. Instead, it was designed to capture multiple CSS classes from a single form field and render those classes to the DOM within the `class` attribute. For this reason, it is currently not possible to add CSS classes to an element's `class` attribute from other form fields.
0 commit comments