To take it one step further, within each of those sections, I believe you should evaluate your options for layout of that particular section, based on the contents and how they are organized and displayed.įor instance, if the main content of your page is a grid or masonry style layout, by all means, grid might be the best for that section, but that doesn't mean you need grid for the whole page layout.you could very likely find that you have better results using flex for the top level layout, and put your grid inside one of those sections.Īs another example, if you lay out your top level page sections with grid, that grid would control where your menu is displayed, but it still probably makes a lot of sense to layout your menu items using flex within that grid section. Just because Grid or Flex works great (or doesn't) to layout the large sections of your particular design doesn't mean you have to (or should) be locked in to that layout for all the elements of your app. On the broader topic, though - I would submit that making a decision about what CSS layout option to use should be addressed at each progressive level of the page layout. Shooting from the hip a bit, I might suggest something like having an empty component in that 'new' position that can communicate with the original 'to-do list' component, and on click, move it from one to the other. At the end of the day, you can really only rearrange items within their parent. page-wrapper that isn't something you can do just by changing css, except perhaps with some tricky absolute or fixed positioning. sub-section somewhere else on the grid defined on. ![]() ![]() However if you have something like this: Īnd you want to use CSS to put. While there isn't a true 'subgrid', keep in mind that "Any Grid Area can become a grid itself, by setting display:grid and then defining the rows and columns." ( ). In my opinion, the reality is that if you are using a component-driven framework to it's full potential, you run into this issue of deeply nested components/elements. I definitely have seen this same issue, and even though this is a relatively old question, I think it's a really interesting one.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |