Feature Queries - Post ID 278054

User 244626 Photo


Registered User
659 posts

So after uploading a "myfirstgrid" project I am seeing the result first hand of the need for Feature Queries. I use both old and new operating systems with both old and new browsers. (Yes, windows XP even.....)

The CSS grid project looks and feels fantastic....very logical and easy and precise. No more hunting for settings using flex for percentages or nipping off some for gutters. Really really Nice ! I want to learn more....

however.....

If using feature queries to rely or fallback on flex or other things is going to change everything in the layout.....that seems like double the work ?

I found this link that shows both sides of the issue.....and I might be missing something due to my very little knowledge about anything really in the web world of design or developing.

https://codepen.io/primalivet/pen/ryjKmV (Try on older browsers and new)

I should point to this article that says that this above method may not be the correct way to approach the fallback.

https://hacks.mozilla.org/2016/08/using … es-in-css/


User 232214 Photo


COO
823 posts

Yea, there are many examples of wrong approaches. Basically CSS Grid should be treated a enhancement so you should start with the Fallback First. Did you read how I did this for updating out homepage?

https://cssgrid.cc/examples/feature-que … sgrid.html

It is a bit of extra work, but if you keep the layout simple of older browsers, it is very manageable. You can read about that in the referenced article too :P

The future of web layout has arrived and it's called CSS Grid. CoffeeCup helps you to get ready with a free guide, the Grid Builder app plus cool demos & themes.
User 244626 Photo


Registered User
659 posts

Yes, I starting to see how the dual sets of CSS work....flex first and then if @supports move to grid.

That must be the tricky part you are solving for us ;)

I was able to combine the two styles into one CSS main file using @ supports and use only one html section.

Before:

http://gluexp.coffeecup.com/cssgrid/pro … rgrid.html

After:

http://gluexp.coffeecup.com/cssgrid/pro … ports.html
User 232214 Photo


COO
823 posts

Twinstream wrote:

That must be the tricky part you are solving for us ;)


Yup, but imagine the possibilities! :cool::cool:

I am working on something...hope to be able to share it soon!
The future of web layout has arrived and it's called CSS Grid. CoffeeCup helps you to get ready with a free guide, the Grid Builder app plus cool demos & themes.

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.