New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugins and themes for Mobi.css@2.0.0 #39

Closed
xcatliu opened this Issue Sep 8, 2016 · 6 comments

Comments

Projects
None yet
3 participants
@xcatliu
Member

xcatliu commented Sep 8, 2016

I'm thinking about to add plugins and themes system for Mobi.css.

But the idea is not very mature, so Mobi.css@1.0.0 will only include the basic styles. For now I think it's better if we can think over how we can implement plugins and themes. Maybe it's helpful to Mobi.css@1.0.0

Here is something I've thought:

Why plugins

There are too many components a css framework could have. Mobi.css only focus on mobile, but it's still a lot of components we may need. It's redundant if every developers need to develop their own components. So maybe a plugins system is useful.

What should be includes in a plugin
  • css files that people can directly use, like dist/mobi-plugin-toast.min.css
  • scss files that people can import it to build their own css files. like src/mobi-plugin-toast.scss
  • (optional) js files that people can directly use, like dist/mobi-plugin-toast.min.js
  • (optional) js files that people can require it to build their own bundled js file. like src/mobi-plugin-toast.js
Some points
  • js is optional, components can only have css files.
  • js should be separated from Mobi.css, it should work fine even if people don't use Mobi.css. It's a independent component.

Why themes

Mobi.css is easily to customize, we can provide a standard way to help people create their own themes, and share it to the community.

A question, how theme works together with plugins?

@xcatliu xcatliu added this to the v2.0.0 milestone Sep 8, 2016

@pixcai

This comment has been minimized.

Show comment
Hide comment
@pixcai

pixcai Sep 8, 2016

Member

Good idea.

I have some suggestions for you:
This repo mobi.css should focus on mobi.css itself, DONOT add plugins or themes in this repo. I think we can create an organization, maybe mobi-components? Components and themes should located there.

BTW, adding plugins and themes, are you planing to make Mobi.css grow to a giant like Bootstrap 😅 ?


这个想法不错。

我有一些建议:
mobi.css这个仓库关注mobi.css本身就够了,尽可能不要在这个仓库添加插件和主题了。我的想法是可以新建一个组织,例如mobi-components什么的?专门编写mobi.css的插件和主题。

另外,引入插件和主题,这是要向Bootstrap看齐吗?

Member

pixcai commented Sep 8, 2016

Good idea.

I have some suggestions for you:
This repo mobi.css should focus on mobi.css itself, DONOT add plugins or themes in this repo. I think we can create an organization, maybe mobi-components? Components and themes should located there.

BTW, adding plugins and themes, are you planing to make Mobi.css grow to a giant like Bootstrap 😅 ?


这个想法不错。

我有一些建议:
mobi.css这个仓库关注mobi.css本身就够了,尽可能不要在这个仓库添加插件和主题了。我的想法是可以新建一个组织,例如mobi-components什么的?专门编写mobi.css的插件和主题。

另外,引入插件和主题,这是要向Bootstrap看齐吗?

@xcatliu

This comment has been minimized.

Show comment
Hide comment
@xcatliu

xcatliu Sep 8, 2016

Member

I would agree to you that Mobi.css will focus on itself. Themes and plugins will be third-party libraries.

But I don't agree to create a new organization to maintain them. Themes and plugins shouldn't have to be centralized, or it's to complex for people who want to create a theme or plugin - they need to apply to join the organization first.

My idea is to create a list to show themes and plugins on the official site, like what hexo did: https://hexo.io/plugins/

Plus, it's better to write English when we discuss new features. I want Mobi.css to be more globalized.

Thanks!

Member

xcatliu commented Sep 8, 2016

I would agree to you that Mobi.css will focus on itself. Themes and plugins will be third-party libraries.

But I don't agree to create a new organization to maintain them. Themes and plugins shouldn't have to be centralized, or it's to complex for people who want to create a theme or plugin - they need to apply to join the organization first.

My idea is to create a list to show themes and plugins on the official site, like what hexo did: https://hexo.io/plugins/

Plus, it's better to write English when we discuss new features. I want Mobi.css to be more globalized.

Thanks!

@xuxia2013

This comment has been minimized.

Show comment
Hide comment
@xuxia2013

xuxia2013 Sep 23, 2016

Great idea !! will be better than Bootstrap ~
waiting for update .

xuxia2013 commented Sep 23, 2016

Great idea !! will be better than Bootstrap ~
waiting for update .

@xcatliu

This comment has been minimized.

Show comment
Hide comment
@xcatliu

xcatliu Feb 16, 2017

Member

Discuss here: #79

After some investigating, I think maybe it's time to use css variables in Mobi.css@2.0.0

First of all, css variables is the future of css. It's already drafted three years ago, and most of modern browsers supports it. There is a demo here.

Secondly, for me, the most useful feature of SASS is variables. Css variables not only extends the all function of SASS variables, but also has some exciting features. Such as scoping, calculating and re-rendering in time.

Last, using css variables can bring us a comfortable way to customizing themes, just need to override some variables. No more compiling!

Member

xcatliu commented Feb 16, 2017

Discuss here: #79

After some investigating, I think maybe it's time to use css variables in Mobi.css@2.0.0

First of all, css variables is the future of css. It's already drafted three years ago, and most of modern browsers supports it. There is a demo here.

Secondly, for me, the most useful feature of SASS is variables. Css variables not only extends the all function of SASS variables, but also has some exciting features. Such as scoping, calculating and re-rendering in time.

Last, using css variables can bring us a comfortable way to customizing themes, just need to override some variables. No more compiling!

@xcatliu xcatliu added the enhancement label Feb 16, 2017

@xcatliu

This comment has been minimized.

Show comment
Hide comment
@xcatliu

xcatliu Feb 20, 2017

Member

The design for theme system is ready.
However, I didn't came up with a good idea for plugin system.

Maybe we can add only theme system for 2.0.0 and leave plugin system for next major update?

Member

xcatliu commented Feb 20, 2017

The design for theme system is ready.
However, I didn't came up with a good idea for plugin system.

Maybe we can add only theme system for 2.0.0 and leave plugin system for next major update?

@xcatliu xcatliu changed the title from Plugins and themes for Mobi.css@2.0.0 to Plugins (?) and themes for Mobi.css@2.0.0 Feb 20, 2017

@xcatliu xcatliu referenced this issue Feb 20, 2017

Closed

Communities for Mobi.css #80

5 of 5 tasks complete

@xcatliu xcatliu changed the title from Plugins (?) and themes for Mobi.css@2.0.0 to Plugins and themes for Mobi.css@2.0.0 Feb 25, 2017

@xcatliu xcatliu removed this from the v2.0.0 milestone Sep 3, 2017

@xcatliu

This comment has been minimized.

Show comment
Hide comment
@xcatliu

xcatliu Sep 3, 2017

Member

Update to v3.0.0,plugins and themes are stable features now!

Member

xcatliu commented Sep 3, 2017

Update to v3.0.0,plugins and themes are stable features now!

@xcatliu xcatliu closed this Sep 3, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment