diff --git a/src/components/calendar/CalendarEventDetails.vue b/src/components/calendar/CalendarEventDetails.vue index dc4bf49..ca1e9ec 100644 --- a/src/components/calendar/CalendarEventDetails.vue +++ b/src/components/calendar/CalendarEventDetails.vue @@ -16,7 +16,26 @@ const dateDifference = computed(() => getRelativeString(defaultDate, props.event + + diff --git a/tailwind.config.js b/tailwind.config.js index 09d66fc..ebda8b9 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -89,5 +89,25 @@ module.exports = { } } }, - plugins: [animate] + plugins: [ + animate, + function ({ addBase, theme }) { + function extractColorVars(colorObj, colorGroup = '') { + return Object.keys(colorObj).reduce((vars, colorKey) => { + const value = colorObj[colorKey] + + const newVars = + typeof value === 'string' + ? { [`--color${colorGroup}-${colorKey}`]: value } + : extractColorVars(value, `-${colorKey}`) + + return { ...vars, ...newVars } + }, {}) + } + + addBase({ + ':root': extractColorVars(theme('colors')) + }) + } + ] }