CSS function? To style several dif elements

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?

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