mdgriffith / stylish-elephants

This project has matured and been released! Go here ->
https://github.com/mdgriffith/elm-ui
BSD 3-Clause "New" or "Revised" License
44 stars 8 forks source link

Don't use grid for SE elements (Input...) #69

Open kuon opened 6 years ago

kuon commented 6 years ago

I think it would be best not to use css grid for layout as it's the only thing not supported by IE 11 and I think we should support that browser.

Edit: By "not use CSS grid" I mean for element build by SE, like inputs, labels... I don't mean SE shouldn't have a way to explicitly create a grid.

mbylstra commented 6 years ago

Grid isn't completely unsupported by IE11 (and IE10), it's just that it supports an older specification, which only has a subset of the features of the current spec. This subset can still be really useful though and offers things not possible with just Flexbox.

The main limitation is that each block needs to explicitly given a value for its placement in the column and row (there's no autoplacement). This is something I think stylish-elements could do behind the scenes, but a kind of IE11 Grid polyfill might not be a high priority.

In any case, as long as there is clear information that there may be issues with IE10 and IE11, I don't see a big issue. I think the Grid abstraction in style-elements v4 is really nice, and it would be a shame to see it go.

mikolajpp commented 6 years ago

Seconding this.

I would take even harder stance.

stylish-elephants being experimental library on experimental language should use the best tools at hand. If that means not supporting browsers notorious for slow and incomplete adoption of important standards, so be it.

Otherwise implementing every new feature will become "But what about browser XYZ which has bugs for A, B, and C?", and this is something we want to avoid.

People wanting to use Elm in production and target 100% of browser share always have the option to use the standard elm libraries.

kuon commented 6 years ago

I think I wasn't clear. I am not against CSS grid in general, and I also think SE should bring it back somehow. I'm against CSS gris for input and other "built in" SE elements.

mikolajpp commented 6 years ago

@kuon, while I understand where you are coming from, and I agree it would be nice for stylish-elephants to work on older browsers, here is one thing to consider: stylish-elephants is a layouting engine. Unless there are some radical plans, the universality of grid/flexbox layout tools is pretty much ingrained into it.

kuon commented 6 years ago

I don't think CSS grid is required for inputs and other simpler elements, but I might be mistaken.

mikolajpp commented 6 years ago

Any element that has possibility to have children would be a grid one: that is when layouting comes into the picture.

Though in some cases I guess it might be possible, since not all of them can have children.