Search

Nalezeno "media queries": 43

“Smart” Layouts With Container Queries


Modern CSS keeps giving us a lot of new, easier ways to solve old problems, but often the new features we’re getting don’t only solve old problems, they open up new possibilities as well. Container queries are one of those … “Smart” Layouts With Container Queries originally published...

JavaScript print Events


Media queries provide a great way to programmatically change behavior depending on viewing state. We can target styles to device, pixel ratio, screen size, and even print. That said, it’s also nice to have JavaScript events that also allow us to change behavior. Did you know you’re...

The New CSS Media Query Range Syntax


The Media Queries Level 4 specification has introduced a new syntax for targeting a range of viewport widths using common mathematical comparison operators, like , and =, that make more sense syntactically while writing less code for responsive web design. The New CSS Media Query Range Syntax...

Responsive Layouts, Fewer Media Queries


We cannot talk about web development without talking about Responsive Design. It’s just a given these days and has been for many years. Media queries are a part of Responsive Design and they aren’t going anywhere. Since the introduction of … The post Responsive Layouts, Fewer Media Queries...

Expandable Sections Within a CSS Grid


I love CSS Grid. I love how, with just a few lines of code, we can achieve fully responsive grid layouts, often without any media queries at all. I’m quite comfortable wrangling CSS Grid to produce interesting layouts, while keeping … The post Expandable Sections Within a CSS Grid appeared...

Proposal for CSS @when


CSS is on a tear lately. Again, I’ve heard of a brand new thing I’ve never seen before, and again it’s via Miriam: CSS Conditionals. ???? CSSWG just resolved to adopt @tabatkins when/else proposal into the next level of CSS … The post Proposal for CSS @when appeared...

Can we have custom media queries, please?


Stefan Judis notes that there is a spec for custom media queries, but seemingly no momentum on it at the moment. That lack of movement is unfortunate, as it’s almost guaranteed front-end developers all over would start using it as … The post Can we have custom media queries, please?...

Detecting Media Query Support in CSS and JavaScript


You can’t just do @media (prefers-reduced-data: no-preference) alone because, as Kilian Valkhof says: […] that would be false if either there was no support (since the browser wouldn’t understand the media query) or if it was supported but the … The post...

Are we in a new era of web design? What do we call it?


Una is calling it the new responsive. A nod to the era we were most certainly in, the era of responsive design. Where responsive design was fluid grids, flexible media, and media queries, the new responsive is those things … The post Are we in a new era of web design? What do we call...

Media Queries in Times of @container


Max Böck took me up on my challenge to look through a codebase and see how many of the @media queries could ultimately become @container queries. I took the bait and had a look at some of my projects – … The post Media Queries in Times of @container appeared first on CSS-Tricks. You...

Hexagons and Beyond: Flexible, Responsive Grid Patterns, Sans Media Queries


A little while back, Chris shared this nice hexagonal grid. And true to its name, it’s using —wait for it — CSS Grid to form that layout. It’s a neat trick! Combining grid columns, grid gaps, and creative clipping … The post Hexagons and Beyond: Flexible, Responsive Grid Patterns, Sans Media...

Custom State Pseudo-Classes in Chrome


There is an increasing number of “custom” features on the web platform. We have custom properties (--my-property), custom elements (<my-element>), and custom events (new CustomEvent('myEvent')). At one point, we might even get custom media … The post Custom State Pseudo-Classes...

Nested Media Queries


We don’t have “regular” nesting in CSS. Maybe this becomes a thing someday, or something like it. That would be cool, although that pre-spec doesn’t mention anything about media queries. I’d hope we get that right out of the gate … The post Nested Media Queries...

Creating websites with prefers-reduced-data


Spoiler alert: There is no support for it yet. But it is defined in the Media Queries Level 5 spec that includes other recent, but more familiar user preference features, like prefers-color-scheme and prefers-reduced-motion. The Polypane blog goes into incredible depth on prefers-reduced-data...

A Complete Guide to CSS Media Queries


Media queries can modify the appearance (and even behavior) or a website or app based on a matched set of conditions about the user's device, browser or system settings. The post A Complete Guide to CSS Media Queries appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter

Achieving Vertical Alignment (Thanks, Subgrid!)


Our tools for vertical alignment have gotten a lot better as of late. My early days as a website designer involved laying out 960px wide homepage designs and aligning things horizontally across a page using a 12-column grid. Media queries came along which required a serious mental shift. It solved...

Linearly Scale font-size with CSS clamp() Based on the Viewport


Responsive typography has been tried in the past with a slew of methods such as media queries and CSS calc(). Here, we’re going to explore a different way to linearly scale text between a set of minimum and maximum sizes as the viewport’s width increases, with the intent of making its behavior...

Nahoru
Tento web používá k poskytování služeb a analýze návštěvnosti soubory cookie. Používáním tohoto webu s tímto souhlasíte. Další informace