Skip to content

Commit

Permalink
First attempt of CSS container query
Browse files Browse the repository at this point in the history
  • Loading branch information
cheeaun committed Sep 3, 2023
1 parent 6cbbd0a commit 8cc85ec
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -747,6 +747,7 @@ a[href^='http'][rel*='nofollow']:visited:not(:has(div)) {
transparent 150%
);
position: relative;
container-type: inline-size;
}
.status-carousel:after {
content: '';
Expand Down Expand Up @@ -806,7 +807,18 @@ a[href^='http'][rel*='nofollow']:visited:not(:has(div)) {
.status-carousel > ul > li:is(:empty, :has(> a:empty)) {
display: none;
}
@media (hover: hover) or (pointer: fine) or (min-width: 40em) {
/*
Assume that browsers that do support inline-size property also support container queries.
https://www.smashingmagazine.com/2021/05/css-container-queries-use-cases-migration-strategies/#progressive-enhancement-polyfills
*/
@supports not (contain: inline-size) {
@media (hover: hover) or (pointer: fine) or (min-width: 40em) {
.status-carousel > ul {
scroll-snap-type: none;
}
}
}
@container (min-width: 640px) {
.status-carousel > ul {
scroll-snap-type: none;
}
Expand Down

0 comments on commit 8cc85ec

Please sign in to comment.