Vertical spacing between multiple calendar events

For discussing the Mozilla Calendar, Sunbird and Lightning projects.
Post Reply
User avatar
Code Name
Posts: 205
Joined: December 23rd, 2019, 1:53 pm
Location: Dallas, TX

Vertical spacing between multiple calendar events

Post by Code Name »

There is a small vertical spacing (of a couple pixels) between calendar events when multiple events are in the same day. Is there a css tweak that changes that vertical spacing?
Politicians and Diapers must be changed often for the exact same reason...
User avatar
WaltS48
Posts: 5141
Joined: May 7th, 2010, 9:38 am
Location: Pennsylvania, USA

Re: Vertical spacing between multiple calendar events

Post by WaltS48 »

They are a bit close in Day and Week views.

Better separation in Multiweek, Month and the Today Pane views
Linux Desktop - AMD Athlon(tm) II X3 455 3.3GHz | 8.0GB RAM | GeForce GT 630
Windows Notebook - AMD A8 7410 2.2GHz | 6.0GB RAM | AMD Radeon R5
User avatar
Code Name
Posts: 205
Joined: December 23rd, 2019, 1:53 pm
Location: Dallas, TX

Re: Vertical spacing between multiple calendar events

Post by Code Name »

WaltS48 wrote:They are a bit close in Day and Week views.

Better separation in Multiweek, Month and the Today Pane views
I agree, the Day and Week views have zero separation whereas the Multiweek and Month view is much better.

I'd like to experiment by decreasing the amount of separation for the Multiweek and Month view by halving the amount...and if possible by making the Day and Week view the same changed amount of spacing.

It's strange that there are no borders around the calendar events in the Day and Week views like the other views have. I'm guessing borders probably can't be added with a css tweak. Dunno...

The Today Pane view (when multiple events are in the current day) display a tighter spacing (probably zero separation), but look pretty good due to the borders. Future day's events are all separated nicely with day of weeks and dates, which I like.
Politicians and Diapers must be changed often for the exact same reason...
User avatar
Code Name
Posts: 205
Joined: December 23rd, 2019, 1:53 pm
Location: Dallas, TX

Re: Vertical spacing between multiple calendar events

Post by Code Name »

I think the coding has 'margin-bottom' in it, but what I've found hasn't been the calendar multiweek and monthly view for events.
Politicians and Diapers must be changed often for the exact same reason...
morat
Posts: 6437
Joined: February 3rd, 2009, 6:29 pm

Re: Vertical spacing between multiple calendar events

Post by morat »

Try something like:

Code: Select all

calendar-month-day-box-item {
  margin: 0px 1px 0px 1px !important;  /* top right bottom left */
  border: 0px solid red !important;    /* width style color */
  padding: 0px 1px 0px 1px !important; /* top right bottom left */
}
CSS Box Model
http://www.w3schools.com/css/css_boxmodel.asp
User avatar
Code Name
Posts: 205
Joined: December 23rd, 2019, 1:53 pm
Location: Dallas, TX

Re: Vertical spacing between multiple calendar events

Post by Code Name »

Morat, you're tops! Thank you!

Changing the bottom padding did the trick.

I think (not sure) the bottom padding default is 4px. I played around with different pixel settings and decided that 2px looks best.

Is there a simple way to determine what the default spacing is other than visually looking and guessing?

PS - In my searching around to find the answer myself I came to the [obvious and incorrect] conclusion that 'margin-bottom' was what I was after...because I did a 'Try it yourself' on the W3 coding resource site, and changing the margin-bottom pixel setting definitely changed the separation spacing. So, I guess it depends...it depends on things that are not at all clear to me...
Politicians and Diapers must be changed often for the exact same reason...
Post Reply