skclusive/Skclusive.Material.Component

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

Opened this issue · 6 comments

henon commented

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?

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

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 commented

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.

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.

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.

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.