So I'm working on a replacement for HTML and CSS. Right now it's written in JavaScript and it renders to canvas. The reason I'm posting here is because you can write your own layout components in my system. So if you have a new idea, instead of waiting years for it to get standardized and supported by the browsers, you can just roll your own idea and run it in anywhere without any fuss. (Flexbox took years to do some…
If you're the ones that downvoted me, can you please explain why? I'm dedicating my life full-time to working on this, and I don't understand why this would offend you. If the trouble is about accessibility, please read my README! I care about that, too, and I would love help!
Faster Layouts with CSS Grid and Subgrid
31–40 of 86 posts
Re: Faster Layouts with CSS Grid and Subgrid
#32All I want is a sticky, permanent header and footer and the rest of the page for text. (without the text going behind the footer/header) Can grid do this? I really don't like using javascript frameworks, I'm trying hard to keep my stuff pure html5/css3.
.foo {
display: grid;
grid-template-rows: 10% 80% 10%;
height: 100vh;
}
header
text
footer
Re: Faster Layouts with CSS Grid and Subgrid
#33Please take into account current support for subgrid [1]. My first time redoing quite complex checkout table with mobile support was a nightmare. I only realised I needed something more halfway along the process. Found out it was subgrid I was looking for and they figuring out there was no current browser support. But using a oneliner like `grid-template-columns: repeat(auto-fill, minmax(30rem, 1fr));` too almost ful…
Re: Faster Layouts with CSS Grid and Subgrid
#34So I'm working on a replacement for HTML and CSS. Right now it's written in JavaScript and it renders to canvas. The reason I'm posting here is because you can write your own layout components in my system. So if you have a new idea, instead of waiting years for it to get standardized and supported by the browsers, you can just roll your own idea and run it in anywhere without any fuss. (Flexbox took years to do some…
Re: Faster Layouts with CSS Grid and Subgrid
#35All I want is a sticky, permanent header and footer and the rest of the page for text. (without the text going behind the footer/header) Can grid do this? I really don't like using javascript frameworks, I'm trying hard to keep my stuff pure html5/css3.
.foo { display: grid; grid-template-rows: 10% 80% 10%; height: 100vh; } header text footer
The text area won't get a scrollbar when more text is added to fill the view area. It seems in this case you would have to manually ensure that the text you gave could fit in 80% of the screen, or bad things happen visually. Also, the header and footer aren't permanent, they are affected by the entire-page scrollbar.
Re: Faster Layouts with CSS Grid and Subgrid
#36Earlier quoted context omitted.
Sadly, I haven't been able to find any benchmarck comparing grid vs flexbox, despite layout being a common bottleneck.
They have different use cases. The rule of thumb is to use Flexbox if you're laying out content along the X or Y axis and Grid if you need to lay it out over both the X and Y axes.
Grid is great for the layout of the whole page (header/content/sidebar/footer) or specific gridded containers.
Flexbox is great for everything else, and specifically what you said about in one dimension, like form label/input or a repeating set of thumbnails, or justified buttons.
Re: Faster Layouts with CSS Grid and Subgrid
#37So I'm working on a replacement for HTML and CSS. Right now it's written in JavaScript and it renders to canvas. The reason I'm posting here is because you can write your own layout components in my system. So if you have a new idea, instead of waiting years for it to get standardized and supported by the browsers, you can just roll your own idea and run it in anywhere without any fuss. (Flexbox took years to do some…
Re: Faster Layouts with CSS Grid and Subgrid
#38Please take into account current support for subgrid [1]. My first time redoing quite complex checkout table with mobile support was a nightmare. I only realised I needed something more halfway along the process. Found out it was subgrid I was looking for and they figuring out there was no current browser support. But using a oneliner like `grid-template-columns: repeat(auto-fill, minmax(30rem, 1fr));` too almost ful…
wow, you're not kidding. only latest FF supports subgrid ?!
Re: Faster Layouts with CSS Grid and Subgrid
#39Earlier quoted context omitted.
Sadly, I haven't been able to find any benchmarck comparing grid vs flexbox, despite layout being a common bottleneck.
They have different use cases. The rule of thumb is to use Flexbox if you're laying out content along the X or Y axis and Grid if you need to lay it out over both the X and Y axes.
Re: Faster Layouts with CSS Grid and Subgrid
#40So I'm working on a replacement for HTML and CSS. Right now it's written in JavaScript and it renders to canvas. The reason I'm posting here is because you can write your own layout components in my system. So if you have a new idea, instead of waiting years for it to get standardized and supported by the browsers, you can just roll your own idea and run it in anywhere without any fuss. (Flexbox took years to do some…