• Resolved graftedin

    (@graftedin)


    Can I make a request for more css hooks.

    For example if I want to hook the number for all days in the calendar I can’t do ‘.eme-calendar-table td.eventful a’ because that will also hook the event’s a and it won’t hook the eventless days because there isn’t an a tag. So the day number needs a class like calendar-day-number. Every day td needs calendar-day.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter graftedin

    (@graftedin)

    Oh. And wrap the eventless day number in span or something with a class so I can hook just the number and not the td.

    Thread Starter graftedin

    (@graftedin)

    Oh and eventless-pre and eventless-post are nice but about about a single class for both pre and post. eventless-pre-post maybe.

    Plugin Author Franky

    (@liedekef)

    First question: use “.eme-calendar-table td”, that’ll hook in to all td’s.
    Second: unless you want to change the css per day, eventless/full (and eventless-pre/post and eventful-pre/post) are already there to use.
    Concerning the third question: it is very easy in css to define 1 style for 2 classes, so I will not start using eventless-pre-post.

    Thread Starter graftedin

    (@graftedin)

    That doesn’t work because it’ll hook the header row too.

    Thread Starter graftedin

    (@graftedin)

    2nd. I want to make the day number span the entire width of the td with a different background….so it looks like a header bar above each td. If its in a span I can do that. If someone wants the default layout you have the span won’t get in the way.

    3rd. The problem is then I have to figure all of the possible classes to define for both. If you have 1 global class and then a class for pre and post then I have more flexibility.

    I’m not asking for much I don’t think. I’m just looking for more ways to hook this and customize.

    Plugin Author Franky

    (@liedekef)

    Ok, for your first question: you can use “.eme-calendar-table td.eventful” and/or .eme-calendar-table td.eventless” for the current month, and -pre/-post for the previous/next months.
    For the current month you also have day-names as classes for the td if you have an event in them.
    For the a-link of the day, you can use a filter (old-school) eme_calday_url_class_filter (see the doc) to add a class to that.
    But I do understand you want to be able to target the day numbers, so I added a span around the numbers with 2 classes: span-eme-calday and span-eme-calday-<NUMBER> . That will be in the next version.

    Concerning adding more generic classes: since css allows you to combine what you need in 1 line, that’s redundant so I won’t add those. I need to keep some simplicity in the code.
    Also: take a look at the div-type calendar, maybe that suits your class-needs better too (lots of people don’t like tables …).

    Thread Starter graftedin

    (@graftedin)

    I figured out everything I needed. My request was that you add more css hooks. I’m sorry that was too complicated to ask for .

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Need more css hooks’ is closed to new replies.