Matblazor: Material theme configuration

Created on 5 Jun 2019  路  5Comments  路  Source: SamProf/MatBlazor

First, kudos to the team on the latest update with the expandable and accordion controls 馃憤

Have a question on theming..

How can we provide all custom theming options like primary text color, secondary text color and other finer details what material color provides here: https://material.io/tools/color/#!/?view.left=0&view.right=1&primary.color=263238&secondary.color=ffc400&primary.text.color=ffffff&secondary.text.color=000000

Documentation https://www.matblazor.com/Themes provides only the details about the primary and secondary color configuration. I would like to replicate what I have from the material color picker tool. Thanks for your help!

inprogress

Most helpful comment

I used this code in my css for http://blazorboilerplate.com/. It would be great if you submtted a PR on the theme to show how these will work and possible add the additional parameters to the Theme component.... hint we need more contributors :)

:root {
    --mdc-theme-primary: #5D2E8F;
    --mdc-theme-secondary: #fbaf41;
    --mdc-theme-on-primary: #495f90;
    --mdc-theme-on-secondary: #ffe172;
    --mdc-theme-text-primary: #ffffff;
    --mdc-theme-text-secondary: #333;
    --mdc-theme-text-on-primary: #001037;
    --mdc-theme-text-on-secondary: #c48003;
    --mdc-theme-surface: #263238; 
}

All 5 comments

I used this code in my css for http://blazorboilerplate.com/. It would be great if you submtted a PR on the theme to show how these will work and possible add the additional parameters to the Theme component.... hint we need more contributors :)

:root {
    --mdc-theme-primary: #5D2E8F;
    --mdc-theme-secondary: #fbaf41;
    --mdc-theme-on-primary: #495f90;
    --mdc-theme-on-secondary: #ffe172;
    --mdc-theme-text-primary: #ffffff;
    --mdc-theme-text-secondary: #333;
    --mdc-theme-text-on-primary: #001037;
    --mdc-theme-text-on-secondary: #c48003;
    --mdc-theme-surface: #263238; 
}

Thanks @enkodellc. Sure I will do. Just forked and trying to run it but EmbeddedBlazorContent project is not loading. I'm using 3.0.100-preview5-011568 , noted that 0.9.10 onwards has the support for preview5. Is preview4 mandatory to work on the current version ?

I had the same issue. You need to download the https://github.com/SamProf/EmbeddedBlazorContent repo, and update the blazor projects to point to that project. Ideally @SamProf should update the MatBlazor repo use EmbeddedBlazorContent dll's / dependencies instead of the project. I am heading out for a few days.. if he doesn't update it then I will submit a PR for it early next week.

@sowsan @enkodellc EmbeddedBlazorContent Should be fixed in v 1.1.0
Themes - yes, I will add today other possibilities to improve theme.

Looks like most of all things are complete.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

TheAnachronism picture TheAnachronism  路  6Comments

lkmcelik picture lkmcelik  路  4Comments

vignatov picture vignatov  路  4Comments

sowsan picture sowsan  路  3Comments

sowsan picture sowsan  路  4Comments