It could be done, but I’m still wondering why you would do it?
If you would like to reuse the code I would create a SUB_Nanoflow that is reading the string from the variable you created under the specific button.
Bear in mind that for Mendix to have stable CSS element selectors you need also to do additional things (like setting the Common Class in the Apperance section of the button.
You can’t and I believe it was designed this way on purpose. If this is a row in a list view, you can change an attribute on that object which drives conditional styling.