Basic use
example.css
.sidebar {
container-type: inline-size;
container-name: sidebar;
}
The container-name property assigns one or more names to a query container. Named queries avoid matching the wrong ancestor.
.sidebar {
container-type: inline-size;
container-name: sidebar;
}.sidebar {
container-type: inline-size;
container-name: sidebar;
}container-name is a CSS property.
Check support for your audience.
Bottom line: Prefer progressive enhancement when support varies.
Continue with container-type.
CODETOFUN NEWS
Get the latest IT news, programming updates, and technology trends directly on your phone.
Your daily dose of tech, straight to your feed.
2 people found this page helpful