Is it feasible in CSS alone to conceal certain text within a string? I am aware of attribute selectors such as:
[att^=val] - the "begins with" selector
For example, given this:
<div class="some_random_text">
This is a default text
</div>
I want to hide only a specific substring - in this case "default". I know how to achieve this with JavaScript, but I am exploring if there is a CSS-only solution.
Although manipulating the DOM via CSS seems unlikely, which would be essential for something like:
this is a <span class="hideThis">default</span> text
why would you need this and where does it occur?
For instance in a CMS (in my case OXID). You can assign a title to a particular payment method. We have
- paypal
- paypal (provider1)
- paypal (another person)
I only want PayPal to be visible on the frontend. The other PayPal payment types should remain as they are. Renaming them all to PayPal will just cause confusion.
There is the content
property. Can it be managed somehow using that?
Once again, no JavaScript involved :-)