• golusinghcpr

    (@golusinghcpr)


    My theme uses ~300 CSS selectors, and every selector may have different styles,size or weight. So I have to create 300 control & add each css selector in it. Is it the right way? I don’t think so. But unfortunately there is no other way to create 300 controls with a single click.

    I use a very popular theme but unfortunately this theme let me choose from hundreds of Google or Typekit fonts except the one which I want to use. That is why I choose this plugin but It sucks.

Viewing 1 replies (of 1 total)
  • The crucial fact about CSS to observe here is the difference between the “id” property of an HTML element and the “class” property.

    If CSS had only “id”, which is required to be unique for every element, your problem would be relatively intractable.

    But CSS has “class”, which is specifically for the purpose of assigning the same class to any number of different elements which one wishes to style similarly, or any other purpose where numerous elements need to be referred to in one easy selector.

    So if you have been wracking your brain with very complex selectors trying to make this work, consider simply going into the theme, or making a child theme, in which you first assign the custom class names you wish, to identify groups of elements that you wish to style similarly. And then the rest of the work in setting up a more minimal and manageable number of Easy Google Fonts controls will be simple.

Viewing 1 replies (of 1 total)
  • The topic ‘Not Helpful if you have lots of CSS Selectors’ is closed to new replies.