I've picked up css after ~5 years and I can't believe how far it's come. Flexbox, grid, `clamp()`, content queries, etc. It's a complete different experience now compared to the days of css hacks.
Styling still sucks though. I mean for displaying tables, not layout.
CSS Container Queries in Web Components
71–78 of 78 posts
Re: CSS Container Queries in Web Components
#72Earlier quoted context omitted.
Why server side rendering? Content that needs rendering just put in the tree and target a slot. My perception was this is the best practice. I haven't used the lit included intl translation and am curious if and how these concerns work.
Doesn’t that still require JavaScript? As I understand it (and I might not; I don’t have servers to do SSR) people want SSR for two reasons. a) To allow users that don’t have JavaScript for some reason to at get good UX, and b) to prevent the styles from kicking in after the initial render. There are ways to author your components in a way that fixes (b), but I’m not aware of any technique other then SSR that will fi…
For things that aren't web apps, like blog/wiki/docs/news-site the primary content is text + images + links.
Is it not attractive to avoid JS where not needed? And only use it for the tiny bits that really do need it.
Re: CSS Container Queries in Web Components
#73Earlier quoted context omitted.
> The thing that I can't understand is, why did it take SO LONG to get useable, proper, and intuitive CSS-based layout on web-pages? Many reasons: - HTML and CSS are not designed for anything complex. HTML and CSS at their core are only meant to display a static page of text and some images in a single rendering pass on a computer from 1990s. - Many decisions in CSS (especially early CSS) are one-off solutions that m…
> HTML and CSS are not designed for anything complex. Yeah, I believe you, I can see how that would have been the thinking back in the 90's. But there started to be significant web applications in the early 2000's. It's all water under the bridge now, but what if there had been more "throwing away" (deprecation) of the bad stuff and less mitigation with the whims of browser implementors? I feel like we would be in a…
And then you had IE6 and stagnation on the web :)
> It's all water under the bridge now, but what if there had been more "throwing away" (deprecation) of the bad stuff and less mitigation with the whims of browser implementors? I feel like we would be in a better position today.
You could view Canvas, WebGL, WebGPU and WebASM as going in that direction.
> What if the W3C had taken a more standards-based approach with hard PASS/FAIL requirements
W3C has no power over browsers, and is made up of browser implementors (among other people).
Re: CSS Container Queries in Web Components
#74Earlier quoted context omitted.
I don't believe it's a quirk. Browsers are supposed treat tags they don't recognize basically the same as a (or some other reasonable default presentation). It's intentionally designed that way for forward compatibility. We rely on this behavior when we provide some content inside an tag for browsers that don't support it.
HTMLUnknownElement https://developer.mozilla.org/en-US/docs/Web/API/HTMLUnknown...
blink {
animation: blink 1s steps(2, jump-none) infinite;
}
@keyframes blink {
to {
opacity: 0;
}
}
Now when you write in your HTML you will essentially get an HTMLUnknownElement with the specific style of blinking every ½ second.Re: CSS Container Queries in Web Components
#75Earlier quoted context omitted.
Do you know what the quirk is called? Is there a blogpost detailing this strange method? Is there any mention of it in the web standards sites?
I don't believe it's a quirk. Browsers are supposed treat tags they don't recognize basically the same as a (or some other reasonable default presentation). It's intentionally designed that way for forward compatibility. We rely on this behavior when we provide some content inside an tag for browsers that don't support it.
Re: CSS Container Queries in Web Components
#76Earlier quoted context omitted.
> HTML and CSS are not designed for anything complex. Yeah, I believe you, I can see how that would have been the thinking back in the 90's. But there started to be significant web applications in the early 2000's. It's all water under the bridge now, but what if there had been more "throwing away" (deprecation) of the bad stuff and less mitigation with the whims of browser implementors? I feel like we would be in a…
> But there started to be significant web applications in the early 2000's. And then you had IE6 and stagnation on the web :) > It's all water under the bridge now, but what if there had been more "throwing away" (deprecation) of the bad stuff and less mitigation with the whims of browser implementors? I feel like we would be in a better position today. You could view Canvas, WebGL, WebGPU and WebASM as going in that…
Re: CSS Container Queries in Web Components
#77Earlier quoted context omitted.
that's arguable, the encapsulation web components affords is built into the system and simply being exposed by way of this bucket of technologies When compared with React and similar solutions doing the same and similar thing(s) it runs circles around them... or am I misunderstanding the comment and is the position asserted that container queries (not web components) are the effect? What is the inner-platform effect…
> What is the inner-platform effect comment applied to specifically? Adding more flexibility to CSS/HTML without requiring Javascript would eventually turn CSS and HTML into to the equivalent of a general purpose programming language, which we already have in the form of Javascript.
Re: CSS Container Queries in Web Components
#78Earlier quoted context omitted.
I thought this when I first encountered Bootstrap, and it is still my opinion today. I think class names should convey intent and meaning, not the look. I'm glad someone wrote on this. People seem to like bootstrap, but it seems with bootstrap, not only you have to master CSS, but also bootstrap, while without it you only need to master CSS. I'm also used to hand write CSS and I'm a bit at loss when I need to use suc…
There is a site called maintainable css that resonated with myself regarding CSS naming and approach. https://maintainablecss.com/