• It’s causing quite a bit of a headache in my markup because I need to style the stars but at the same time the ID specificity is overriding my other rules

    • This topic was modified 5 years, 6 months ago by mleecp.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Blaz K.

    (@blazk)

    Hi @mleecp,

    I don’t completely understand – there is only id rmp-stars in the output? What other rules are being overridden?

    Blaz

    • This reply was modified 5 years, 6 months ago by Blaz K..
    Thread Starter mleecp

    (@mleecp)

    In my project I have my own CSS rules for unordered lists, and I want to apply a style that applies to every <ul> except for this plugin’s <ul id="rmp-stars">. Because I have to select it by ID, the specificity is overriding other <ul> in my site. It would be more conventional in my opinion to change it to <ul class="rmp-stars"> instead, unless you have good reason to keep it id?

    For the record I customized the plugin so that there’s multiple instances of it in one page, so there’s actually multiple <ul id="rmp-stars">.

    • This reply was modified 5 years, 6 months ago by mleecp.
    Plugin Support Blaz K.

    (@blazk)

    @mleecp, the frontend will be completely refactored in version 3 because at the moment it’s not very developer-friendly ?? + the use of ids doesn’t allow more instances of rating widget on one page. Nevertheless, I don’t see how the id would interfere with the styling (maybe share on codepen?). Apply styles to ul(s) and then override them with #rmp-stars selector.

    PS: Just noted your comment at the bottom. Yeah, in that case you should get rid of ids as multiple ids per page are a html error.

    In version 3 this will be improved ?? I don’t really want to push out a small update with changes on the frontend because every time I change something on the frontend I get many many support tickets here; many people are using multiple caching systems (page cache, minify, cloudflare etc) and don’t really know how to clear cache ??

    Regards,
    Blaz

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Can you change `ul id=”rmp-stars”` to class instead?’ is closed to new replies.