Less css - Id with variable, google plus, cover all

892

In CSS3 you can achieve this with substring matching attribute selectors. You could write something like this:

[id^="___plus_"]{ ... }

if you want to select all elements with an id that starts with ___plus_. However, this may have some problems in some older browsers.

Share:
892

Related videos on Youtube

Philip
Author by

Philip

Updated on November 24, 2022

Comments

  • Philip
    Philip over 1 year

    I want to be able to style google plus share button. The problem is that I dynamically add and removes it on a single page. Every time I add it, the api adds +1 to the id of the button. Like:

    #___plus_0
    #___plus_1
    #___plus_2
        ...
    #___plus_10
    

    I use less css, is it possible to cover all these id´s with one command? I have tried with:

    #___plus_*
    

    But that doesn't work.

    I could do it like,

    #___plus_0, #___plus_1, #___plus_2, #___plus_1, #___plus_4,...,#___plus_20
    

    But that seems a little hacky and it would break if the user for some reason decides to remove and re add the share button 20 times.

    If this isn't possible, is it possible to tell google what Id it should set on the element?

    • atenz
      atenz almost 12 years
      Try removing it completely and then do a fresh install . If not try flash-aid.
  • atenz
    atenz almost 12 years
    Sorry to say but there is no APT version , its a source(.tar.gz) file which needs to be compiled .
  • RAMESH
    RAMESH almost 12 years
    apt:adobe-flashplugin?channel=$distro-partner paste this above line in to browser address bar then click enter
  • atenz
    atenz almost 12 years
    Then you need to place this URL get.adobe.com/flashplayer/otherversions instead the above in answer. I will edit it :)
  • atenz
    atenz almost 12 years
    You can also add that in above answer as Alternative option :)