• Resolved swinggraphics

    (@swinggraphics)


    We don’t want to highlight every category with a color. Transparent for border and background doesn’t work, because that can override categories with colors. Some categories need to just not have any special styling applied.

Viewing 15 replies - 1 through 15 (of 22 total)
  • Plugin Author Andy Fragen

    (@afragen)

    Have you tried checking the “Hide” checkbox that’s in front of each category on the settings page?

    Thread Starter swinggraphics

    (@swinggraphics)

    That would hide the category from the legend. We want it clickable, just not with any special coloring.

    Plugin Author Andy Fragen

    (@afragen)

    Check the Show hidden categories in legend checkbox.

    Thread Starter swinggraphics

    (@swinggraphics)

    That is very confusing. It also has the effect of sorting “hidden” categories to the end of the legend. There really just needs to be a way to say “Do not add styles for this category.” Being able to actually hide a category from the legend would be helpful, too, so I’m not suggesting removing the Hide option. I think the default should be that no styling is added for any category unless you enable it. In lieu of that, being able to request no styles one-by-one is important.

    Specific example: We have Age Group and Event Type as parent categories. We like hiding those labels from the legend. Under Age Group are Adults, Teens, and Kids. Under Event Type are Book Group, Educational, and Meeting. We want each age group to have a color, but not add colors for event types. An Adult/Educational event should have an orange border—the color set for Adult—but Educational’s settings override the color, and there is no way to disable Educational’s styles.

    Thread Starter swinggraphics

    (@swinggraphics)

    Maybe instead of “No style” the plugin could just allow empty color (“None”) setting for each border, background, and text? This would have the added benefit of allowing users to do a combo when an event is in multiple categories. (e.g., age group categories have a border and no background while event type categories have a background color and no border)

    Plugin Author Andy Fragen

    (@afragen)

    The “Hide” and “Show hidden categories in legend” are the available options to accomplish those tasks. Hiding is really hiding from the category coloring.

    CSS does not operate to allow for 2 or more different categories to have cumulative coloring. That is because the selectors are are the same and the last selector in the stylesheet will determine the styling.

    You have to select carefully the category color options as an event with multiple colored categories will not behave as you expect.

    There is no way to accomplish exactly what you want. If you don’t want a category colored then select “Hide”.

    If you want the legend to display differently you can create a template override. Please refer to the wiki for information. https://github.com/afragen/the-events-calendar-category-colors/wiki/Setting-up-template-overrides

    In order to achieve what you describe you can assign as many categories to a single event as you wish but only one category can be colorized. That means you may have to assign an event as follows: Adult, Educational, Adult-Educational. Where the first 2 categories are hidden and the last is colorized per your convention. This way the event will be found in the appropriate searches and still be colored correctly.

    Thread Starter swinggraphics

    (@swinggraphics)

    CSS does not operate to allow for 2 or more different categories to have cumulative coloring

    Sure it does.

    .tribe-events-category-1 { border-color: orange; }
    .tribe-events-category-3 { background-color: pink; }

    My Cool Event that is in both Category 1 and Category 3 would have an orange border courtesy of Category 1, and a pink background courtesy of Category 3. Meanwhile, Category 2 could have absolutely no styles applied by TECCC and still appear in its proper place in the legend. The current issue is that TECCC requires every option to be set for every category.

    Plugin Author Andy Fragen

    (@afragen)

    I mis-spoke. When the HTML is created by The Events Calendar for an event with 2 categories it looks like the following.

    <div class="tribe-events-category-1 tribe-events-category-3">My Event</div>

    Yes, this is greatly simplified but you can see that the same element has 2 classes and the CSS created has both border and background defined. Therefore the last defined styling will have priority.

    Plugin Author Andy Fragen

    (@afragen)

    You have a interesting thought about not applying CSS if the the style is transparent. Perhaps I can figure out a way to not set it at all.

    Plugin Author Andy Fragen

    (@afragen)

    @swinggraphics try installing this branch and see if that works for you.

    https://github.com/afragen/the-events-calendar-category-colors/tree/null-transparent

    It will cause the title to look differently aligned when compared to categories that have a set border color.

    • This reply was modified 7 years, 1 month ago by Andy Fragen.
    Thread Starter swinggraphics

    (@swinggraphics)

    Yes! That does allow for the border to be set by one category and the background set by another. Looks great, thanks!

    Can text color get the same options as the other color settings? We don’t use “black” on our site, so I had to add rules with higher specificity to get the (our) default back. And that means we can’t specify “white” on events with dark backgrounds in TECCC.

    Cheers.

    Plugin Author Andy Fragen

    (@afragen)

    Not sure I understand. You can set text color for categories and even add your own colors. Please refer to the wiki for that.

    Can you explain it further?

    Thread Starter swinggraphics

    (@swinggraphics)

    The options for Text are just “Black, Gray, White”. I do not want any color to be applied to text via TECCC. Given the recent changes to the effect of “Transparent” (a better label would be “No setting”), if Text Color had the same color options as border and background, that would be taken care of.

    Plugin Author Andy Fragen

    (@afragen)

    Thread Starter swinggraphics

    (@swinggraphics)

    I don’t want to add more colors, I want the plugin not to override them. The common thread here is opting in to settings via the plugin, rather than working to undo unwanted effects. I guess I could add an invalid color name so the rule doesn’t have an effect, but there shouldn’t be a rule there in the first place.

Viewing 15 replies - 1 through 15 (of 22 total)
  • The topic ‘“No style” option needed’ is closed to new replies.