Framework7: [V2/3] New feature request: Separate Css for each theme

Created on 27 Jun 2018  ·  7Comments  ·  Source: framework7io/framework7

Hi Vladimir, it would be VERY useful to have a separate css for each theme.

Now all of them are inside framework7.min.css and if you want to customize the theme, each time you release a new version, will be updated.

pleassssseeeeeeeee !

outdated wontfix

Most helpful comment

This is the roadmap for v4 which i am currently working on. It will be rewritten to CSS variables, so basically all color themes will worth almost nothing. Same with SVG icons, in v4 they will be reworked to inlined icon-font. For example at current stage the whole v4 CSS with all color themes is already reduced by 40%

All 7 comments

iOS/md themes are available as separate files https://github.com/framework7io/framework7/tree/master/packages/core/css

If you mean color themes, it won’t be separated, because in same way they will be updated with new release. Still it is highly not recommended to modify dist css files. It is better if you do a custom build instead where you can configure color themes

Yes, I know, that's why I think it would help others if we can have a main.css and different sheets per color-theme.

I do agree with @vousys. While @nolimits4web you are right about updates, all files must be in sync, in the current setup however color themes take quite a big amount of css (I estimated at more or less 10kb of minified css per color depending on components included in the custom build).

Full components with the 9 default colors:

  • ios.min : 547kb
  • md.min : 558kb

Full components without colors:

  • ios.min : 370kb
  • md.min : 387kb

I think most of the time an end-user only really needs one color theme at a time, no need to load all the color styles/all the svg-in-css icon variants. If we provide a way to switch theme in the webapp, it could rather be a page reload with another color css file loaded (framework7.ios.red.min.css for ex).

It would enhance the loading big time for end-users.

This is the roadmap for v4 which i am currently working on. It will be rewritten to CSS variables, so basically all color themes will worth almost nothing. Same with SVG icons, in v4 they will be reworked to inlined icon-font. For example at current stage the whole v4 CSS with all color themes is already reduced by 40%

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

This issue has been automatically closed due to inactivity. If this issue is still actual, please, create the new one.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

J05HI picture J05HI  ·  3Comments

nimo23 picture nimo23  ·  4Comments

yeli19950109 picture yeli19950109  ·  3Comments

ahmeddaif1 picture ahmeddaif1  ·  4Comments

oVerde picture oVerde  ·  3Comments