Skip to content

Commit

Permalink
fix: alignment
Browse files Browse the repository at this point in the history
Signed-off-by: Grigory Vodyanov <scratchx@gmx.com>
  • Loading branch information
GVodyanov committed Jan 30, 2025
1 parent 84269ca commit 679c25d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
5 changes: 5 additions & 0 deletions css/fullcalendar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@
// ### FullCalendar Event adjustments
.fc-event {
padding-left: 3px;
border-width: 2px;

&.fc-event-nc-task-completed,
&.fc-event-nc-tentative,
Expand Down Expand Up @@ -202,6 +203,10 @@
max-width: 25vw;
}

svg {
margin-right: 2px;
}

@media only screen and (max-width: 767px) {
.fc-list-event-location,
.fc-list-event-description {
Expand Down
11 changes: 5 additions & 6 deletions src/fullcalendar/rendering/eventDidMount.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,15 +101,14 @@ export default function({ event, el }) {
const dotElement = el.querySelector('.fc-daygrid-event-dot')

if (dotElement) {
dotElement.style.borderWidth = '0.1px'
dotElement.style.borderWidth = '2px'
dotElement.style.background = 'transparent'
dotElement.style.minWidth = '10px'
dotElement.style.minHeight = '10px'
}

titleElement.style.color = 'var(--color-main-text)'
el.style.background = 'transparent'
el.style.borderWidth = '2px'
el.title = t('calendar', 'All participants declined')

if (el.classList.contains('fc-event-nc-needs-action')) {
Expand All @@ -130,8 +129,8 @@ export default function({ event, el }) {

const svgElement = titleElement.querySelector('svg')
svgElement.style.fill = el.style.borderColor
svgElement.style.width = '1.2em'
svgElement.style.paddingBottom = '0.2em'
svgElement.style.width = '1em'
svgElement.style.marginBottom = '0.2em'
svgElement.style.verticalAlign = 'middle'
}

Expand All @@ -144,9 +143,9 @@ export default function({ event, el }) {
let backgroundStyling = `repeating-linear-gradient(45deg, ${bgStripeColor}, ${bgStripeColor} 1px, ${bgColor} 1px, ${bgColor} 10px)`

if (dotElement) {
dotElement.style.borderWidth = '2px'
backgroundStyling = `repeating-linear-gradient(45deg, ${bgColor}, ${bgColor} 1px, transparent 1px, transparent 3.5px)`

dotElement.style.borderWidth = '0.1px'
dotElement.style.background = backgroundStyling
dotElement.style.minWidth = '10px'
dotElement.style.minHeight = '10px'
Expand Down

0 comments on commit 679c25d

Please sign in to comment.