Last active
March 24, 2024 10:07
-
-
Save helabenkhalfallah/21fc1c862e4a59a84fc6a5aa22c46e98 to your computer and use it in GitHub Desktop.
Container Examples
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@container (max-width: 500px) { | |
/* Normal css styles can go here */ | |
} | |
@container (min-width: 500px) { | |
/* Normal css styles can go here */ | |
} | |
@container (width > 500px) { | |
/* Normal css styles can go here */ | |
} | |
@container (width >= 500px) { | |
/* Normal css styles can go here */ | |
} | |
@container (width < 500px) { | |
/* Normal css styles can go here */ | |
} | |
@container (width <= 500px) { | |
/* Normal css styles can go here */ | |
} | |
@container (width >= 500px) and (height >= 500px) { | |
/* Normal css styles can go here */ | |
} | |
@container (width > 760px) not (height > 670px) { | |
/* Normal css styles can go here */ | |
} | |
@container not (height <= 1080px) { | |
/* Normal css styles can go here */ | |
} | |
@container (width < 500px) or (height < 500px) { | |
/* Normal css styles can go here */ | |
} | |
@container (orientation: landscape) { | |
/* styles applied to descendants of this size container */ | |
} | |
@container (10em <= width <= 20em) { | |
/* styles */ | |
} | |
@container card (orientation: landscape) { | |
/* styles */ | |
} | |
@container wide (orientation: landscape) and (min-width: 20em) { | |
/* styles applied to descendants of .sizeContainer if size features match */ | |
} | |
@container narrow (orientation: portrait) or (max-width: 20em) { | |
/* styles applied to descendants of .sizeContainer if size features match */ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment