Code does match pattern

  • I am trying to replicate the login pattern from here


    But it keeps showing green and small controls.


    I looked at the CSS and noticed there are a bunch of duplicate attributes.


    This is from selecting v2 JS project in Monaca online ide.

    This has to be an issue?

  • IMO second part of this question is more important - Onsen CSS contains a lot of conflicts - identical properties with different values in the one class. You can find it in the several classes. I saw it too some days ago. If you check Onsen CSS with any CSS validator you can see a lot of errors and warnings.
    I have created a issue on the GitHub.

  • Onsen UI

    @Sergey We are considering a change in the tooling we are using for the styles and for sure we’ll take that into account moving forward. Thanks for reporting :+1:

  • @munsterlander Not sure what that has to do with the issue? If I change the theme, the UI should change with it. Otherwise what’s the point?

  • @KrunchMuffin Well, my point was based on what I understood you saying was, you wanted iOS flat design but were getting material design, i.e. the green controls. Onsen auto-styles based on the platform. I presume you are using Android and as such would need to disable auto-styling to force it to iOS flat. Onsen does load multiple CSS classes, but hierarchy loads the correct one for the platform.

  • Onsen UI

    If you are using Monaca, simply change the device type on the preview window to an iPhone.

  • Ok, so the theme roller does not change material colors for android? I think that is where I was lost. Cause I was changing the theme and it would never change the preview. I have to manually pick my material colors.

  • Onsen UI

    @KrunchMuffin It does change them… there are material color fields in the theme roller, if you change them you can download the theme. You will need to use that new theme (upload to Monaca if necessary).

  • Yes, if done manually, if I choose one of the predefined color schemes, the material colors do not update.

  • Onsen UI

    @KrunchMuffin Oh! I understand what you mean now. Material Design was added after those themes were created and I guess we forgot to update them. To be honest I thought nobody was using the predefined themes :sweat_smile:

    We are actually deprecating the theme roller and making something simpler that can be run locally. I think onsenui 2.1.0 will be the last version compatible with that theme roller.

  • ok, thx. look forward to it.

Log in to reply