Questa pagina è generata dai pacchetti Magma, documentati solo in inglese.
<mds-pref-theme name="default" scheme="all"> <mds-pref-theme-item name="default" label="Predefinito" scheme="all"></mds-pref-theme-item> <mds-pref-theme-item name="cool" label="Freddo" scheme="all"></mds-pref-theme-item> <mds-pref-theme-item name="warm" label="Caldo" scheme="all"></mds-pref-theme-item></mds-pref-theme><mds-pref-theme name="default" scheme="all"> <!-- renders "Default", "Cool", "Warm" without explicit label props --> <mds-pref-theme-item name="default" scheme="all"></mds-pref-theme-item> <mds-pref-theme-item name="cool" scheme="all"></mds-pref-theme-item> <mds-pref-theme-item name="warm" scheme="all"></mds-pref-theme-item></mds-pref-theme><mds-pref-theme name="default" scheme="all"> <!-- this theme works in both modes --> <mds-pref-theme-item name="default" label="Predefinito" scheme="all"></mds-pref-theme-item>
<!-- offered light-only; selecting it locks the UI in light mode --> <mds-pref-theme-item name="cool" label="Freddo chiaro" scheme="light"></mds-pref-theme-item>
<!-- offered dark-only; selecting it locks the UI in dark mode --> <mds-pref-theme-item name="warm" label="Caldo scuro" scheme="dark"></mds-pref-theme-item></mds-pref-theme><mds-pref-theme name="default" scheme="all"> <mds-pref-theme-item name="default" label="Predefinito" scheme="all"></mds-pref-theme-item> <mds-pref-theme-item name="cool" label="Freddo" scheme="all"></mds-pref-theme-item></mds-pref-theme>
<script> document.querySelectorAll('mds-pref-theme-item').forEach((item) => { item.addEventListener('mdsPrefThemeItemSelect', (e) => { console.log('Tema selezionato:', e.detail.name, 'schema:', e.detail.scheme); }); });</script><mds-pref-theme name="cool" scheme="all"> <mds-pref-theme-item name="default" label="Predefinito" scheme="all"></mds-pref-theme-item> <mds-pref-theme-item name="cool" label="Freddo" scheme="all"></mds-pref-theme-item> <mds-pref-theme-item name="warm" label="Caldo" scheme="all"></mds-pref-theme-item></mds-pref-theme>/* override the colour preview dots of one theme item */mds-pref-theme-item[name="warm"] { --mds-pref-theme-item-color-variant-primary: rgb(var(--magma-accent-emphasis-hover)); --mds-pref-theme-item-color-status-success: rgb(var(--magma-success-emphasis)); --mds-pref-theme-item-color-status-warning: rgb(var(--magma-warning-emphasis)); --mds-pref-theme-item-color-status-error: rgb(var(--magma-danger-emphasis)); --mds-pref-theme-item-color-background: rgb(var(--magma-wash-strong));}