Skip to content

Commit 25cdc55

Browse files
committed
PB-480: Update content type styling concepts
Removed angle brackets in heading to fix topic's right-side TOC
1 parent 7184e7c commit 25cdc55

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/how-to/how-to-use-attributes-for-styling.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ To aid in our discussion of these configuration nodes and how to use them, we wi
294294
{: .bs-callout .bs-callout-info }
295295
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`.
296296

297-
### Understanding and using `<style>` nodes
297+
### Understanding and using `style` nodes
298298

299299
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`.
300300

@@ -333,13 +333,13 @@ Each `<style>` node defined for the element's configuration gets added to the DO
333333
</h2>
334334
```
335335

336-
### Using `<attribute>` nodes instead of `<style>` nodes
336+
### Deciding to use `attribute` or `style` configurations
337337

338338
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.
339339

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.
341341

342-
### Understanding the `<css>` node {#understandthecssnode}
342+
### Understanding the `css` node {#understandthecssnode}
343343

344344
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.
345345

0 commit comments

Comments
 (0)