I wasn't able to achieve that using only css. Not saying there isn't a wat. I just don't know it.
I was able to achieve your desired result, but that required DOM structure change. In other words, you would need to create a custom sub-class (js side) for your forms, and all other controls that you wish to apply this, that's a lot of work.
Basically, you would need to inject a <mark> element surrounding the label text..
This is the entire tree elements for a single cWebForm object:
Code:
<div class="WebCon_Inner WebCon_LeftLabel">
<label for="_df_3" class="WebCon_Float" style="text-align: right;">Order Number:</label>
<div style="user-select: text;">
<div class="WebFrm_Wrapper WebFrm_HasPrompt">
<span class="WebFrm_Prompt"></span>
<div class="WebFrm_PromptSpacer">
<input type="text" name="oOrderHeaderOrder_Number" value="" id="_df_3" inputmode="numeric" placeholder="" autocomplete="off" title="Order Number - New orders are assigned numbers automatically" maxlength="1048576" class="dfData_BCD" style="user-select: text;">
</div>
</div>
</div>
</div>
You would have to change the html dom for the label like this:
Code:
<div class="WebCon_Inner WebCon_LeftLabel">
<label for="_df_3" class="WebCon_Float" style="text-align: right;"><mark style="background-color: #FFFF00">Order Number:</mark></label>
<div style="user-select: text;">
<div class="WebFrm_Wrapper WebFrm_HasPrompt">
<span class="WebFrm_Prompt"></span>
<div class="WebFrm_PromptSpacer">
<input type="text" name="oOrderHeaderOrder_Number" value="" id="_df_3" inputmode="numeric" placeholder="" autocomplete="off" title="Order Number - New orders are assigned numbers automatically" maxlength="1048576" class="dfData_BCD" style="user-select: text;">
</div>
</div>
</div>
</div>
Result:
Maybe others may have a better/easier solution for you..
Good luck !