1 reply [Last post]
Quisquose
Quisquose's picture
Offline
newbie
Last seen: 2 years 44 weeks ago
Joined: 2017-01-31
Posts: 1
Points: 2

I am using the following CSS (within the Stylish Add-on for Firefox) to hide scrollbars in a particular webpage pop-up window.

.composer[_ngcontent-egj-8] .composer__content[_ngcontent-egj-8] .composer__content__categories[_ngcontent-egj-8] {overflow:hidden;}

It works fine, but the problem is that every time the page is refreshed the 3 letters after ngcontent keep changing, so the rule no longer applies unless I update the letters to whatever the web page is currently using.

How could I recreate the rule shown above, but with a wildcard for each of the 3 instances of "egj" so that the scrollbar remains hidden even when those letters change?

I tried using an attribute selector, but I couldn't work out how to structure it for the code above (because the entire line is needed in order for it to work).

Tony
Tony's picture
Offline
Moderator
Brisbane
Last seen: 4 days 6 hours ago
Brisbane
Timezone: GMT+10
Joined: 2003-03-12
Posts: 5342
Points: 2963

Hi Quisquose, Try attribute

Hi Quisquose,
Try attribute selectors
https://csscreator.com/content/attribute-selector-starts
something like:

[class^="composer[_ngcontent-"],
[class^="composer__content[_ngcontent-"] ,
[class^="composer__content__categories[_ngcontent-"] {overflow:hidden;}