# CSS function? To style several dif elements

**URL:** https://meta.discourse.org/t/css-function-to-style-several-dif-elements/323779
**Category:** Development
**Created:** [August 28, 2024, 2:28pm UTC](https://meta.discourse.org/t/css-function-to-style-several-dif-elements/323779 "2024-08-28T14:28:22Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Heliosurge](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/heliosurge/32/571810_2.png) [@Heliosurge](https://meta.discourse.org/u/Heliosurge)
#### Post date: [August 28, 2024, 2:28pm UTC](https://meta.discourse.org/t/css-function-to-style-several-dif-elements/323779/1 "2024-08-28T14:28:22Z")

</div>

I am looking to see if there is a way to create a function with a set of styling that can be used in over and over again within a theme component.

In this case a generic bbcode wrap.

Is there a way to use &[data] that does not need to be called by the bbcode wrap?

```plaintext
[Wrap="foo" X="bar"]

```

I am looking to use something like that but without needing to call the styling set with x=bar.

I am looking to have Foo, foo1, foo2 all have a common set of styling then have unique extra styling.
