vendredi 31 mai 2019

How to apply Fabric UI Office theme to body background?

I've got a problem with theming a react website made with fabric ui

I've generated 2 themes (Night/Day mode) using the website that Fabric UI provided for generating themes. I exported them in json format. As i want to use a toggle button to change between these two themes, those two jsons became variables in a file "Themes.json"

Problem is that, once i change the theme, the body's background which is supposed to be dark is in fact plain white

My themes


var lightCyan = {
    "themePrimary": "#009486",
    "themeLighterAlt": "#f1fbfa",
    "themeLighter": "#c8eeea",
    "themeLight": "#9cdfd8",
    "themeTertiary": "#4cbfb4",
    "themeSecondary": "#13a193",
    "themeDarkAlt": "#008578",
    "themeDark": "#007166",
    "themeDarker": "#00534b",
    "neutralLighterAlt": "#f8f8f8",
    "neutralLighter": "#f4f4f4",
    "neutralLight": "#eaeaea",
    "neutralQuaternaryAlt": "#dadada",
    "neutralQuaternary": "#d0d0d0",
    "neutralTertiaryAlt": "#c8c8c8",
    "neutralTertiary": "#595959",
    "neutralSecondary": "#373737",
    "neutralPrimaryAlt": "#2f2f2f",
    "neutralPrimary": "#000000",
    "neutralDark": "#151515",
    "black": "#0b0b0b",
    "white": "#ffffff"
}

var darkCyan = {
    "themePrimary": "#4fedec",
    "themeLighterAlt": "#030909",
    "themeLighter": "#0d2626",
    "themeLight": "#184747",
    "themeTertiary": "#2f8e8e",
    "themeSecondary": "#45d1d0",
    "themeDarkAlt": "#5fefee",
    "themeDark": "#77f2f1",
    "themeDarker": "#99f5f4",
    "neutralLighterAlt": "#151717",
    "neutralLighter": "#1e2020",
    "neutralLight": "#2c302f",
    "neutralQuaternaryAlt": "#353939",
    "neutralQuaternary": "#3d4141",
    "neutralTertiaryAlt": "#5c6161",
    "neutralTertiary": "#c8c8c8",
    "neutralSecondary": "#d0d0d0",
    "neutralPrimaryAlt": "#dadada",
    "neutralPrimary": "#ffffff",
    "neutralDark": "#f4f4f4",
    "black": "#f8f8f8",
    "white": "#0c0d0c",
    "bodyBackground":"#2e2a2a"
}


export {lightCyan, darkCyan};




Aucun commentaire:

Enregistrer un commentaire