Skip to content
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

class="mt-3 ml-n1 pa-1 ..." #47

Open
henon opened this issue Jun 20, 2020 · 6 comments
Open

class="mt-3 ml-n1 pa-1 ..." #47

henon opened this issue Jun 20, 2020 · 6 comments

Comments

@henon
Copy link
Contributor

henon commented Jun 20, 2020

I suggest adding the popular bootstrap classes for margin and padding. They have been adopted in many frameworks, so a lot of people will be familiar with them. I think they are essential to content layout because of their clarity and brevity.

Thoughts? Where could they be added to be globally accessible?

@skclusive
Copy link
Owner

not aware of bootstrap classes. we could have those classes (or components?) may be in https://github.com/skclusive/Skclusive.Material.Layout?

@skclusive
Copy link
Owner

is this something similar to Box component https://material-ui.com/components/box/#box?

in that case we can implement Box in skclusive-ui. the last time i checked it was implemented with lots of function composition in material-ui. may be we can choose our own implementation.

@henon
Copy link
Contributor Author

henon commented Jun 21, 2020

I have never used React so I really don't understand Box. But I have used Vuetify extensively so I know how handy the bootstrap style classes for margin and padding are. Here are examples:

mt-0 = margin-top:0;
mt-1 = margin-top:4px;
mt-2 = margin-top:8px;
mt-3 = margin-top:16px;
...
mr-1 = margin-right: 4px;
ml-1 = margin-left: 4px;
mb-1 = margin-bottom: 4px;
mx-1 = margin-left and margin-right: 4px;
my-1 = margin-top and margin-bottom: 4px;
ma-1 = margin: 4px;

and similar for padding:
pt-0 = padding-top:0;

there are also negative spacing classes like

mt-n1 = margin-top: -4px;

and there is auto margin:

mx-auto
my-auto

I guess Skclusive.Material.Layout would work, except if we want to use it in Skclusive.Material.Component too.

@skclusive
Copy link
Owner

i guess material-ui Box also behaves this way. so we could implement Box in Skclusive.Material.Core project then could be used in other components when ever required.

@jessenich
Copy link

i guess material-ui Box also behaves this way. so we could implement Box in Skclusive.Material.Core project then could be used in other components when ever required.

This seems to be an old issue, but I'd like to lend a hand in this particular arena. I just discovered this project and was very impressed. No bootstrap support is a killer for myself, and likely many others out there though.

I'm also unfamiliar with 'Box', and React. If Box is in anyway tied to the inner workings of React it would be impractical to try implementing support for it here. Additionally, it would limit the usability compared to direct Bootstrap support.

Bootstrap is an independent CSS framework. One of the most popular ones that exist, I believe. I've only skimmed but it seems adding support for some core Bootstrap functionality would not require any breaking changes, only additive.

As this issue is 6 months old, and the former commenter's suggestion was essentially rejected, I'll wait for a response and your feedback prior to forking and contributing. My staff and I would love to help though.

@skclusive
Copy link
Owner

Material-ui Box component supports above configuration including responsive specific values.

Please check the following samples.

https://material-ui.com/components/box/

https://material-ui.com/system/basics/#all-inclusive

Yes. The plan is to implement the Box component in Skclusive.Material.Lab repo which is kind of easy to get started for new contribution. I will be happy to get contribution. Please let me know if you need any help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants