Skip to content

Instantly share code, notes, and snippets.

@rifayetuxbd
Created April 19, 2023 10:36
Show Gist options
  • Save rifayetuxbd/fc4664bca59e978acb3bec091b31aa11 to your computer and use it in GitHub Desktop.
Save rifayetuxbd/fc4664bca59e978acb3bec091b31aa11 to your computer and use it in GitHub Desktop.
Set width for grid while using angular material
.container,
.container-fluid,
.container-xxl,
.container-xl,
.container-lg,
.container-md,
.container-sm {
--bs-gutter-x: 1.5rem;
--bs-gutter-y: 0;
/* width: 100%; */
width: calc(100% - ((var(--bs-gutter-x) * 0.5) * 2)); // use this line
padding-right: calc(var(--bs-gutter-x) * 0.5);
padding-left: calc(var(--bs-gutter-x) * 0.5);
margin-right: auto;
margin-left: auto;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment