Skip to content

Apply CSS Variable to :root #77

@mrleblanc101

Description

@mrleblanc101

All CSS variables should be applied to :root so they can be easily overrided in CSS without requiring to create a custom theme in JS.

Currently:

<script setup lang="ts">
import { Notification, NotificationProgress, Notivue, NotivueSwipe, lightTheme } from 'notivue';

const theme: NotivueTheme = {
    ...lightTheme,
    '--nv-radius': '2rem',
};
</script>

But it would be better like this:

:root {
    --nv-radius: '2rem',
}

Metadata

Metadata

Assignees

Labels

enhancementImprovements to current API

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions