Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

220
Visualizações
override bootstrap @media breakpoint

I am very new at this stuff, so please bear with me.

I have been messing around views recently and was wondering if it's possible to override the breakpoints stored in the bootstrap.

ie)

:root {
--breakpoint-xs: 0;
--breakpoint-sm: 576px;
--breakpoint-md: 768px;
--breakpoint-lg: 992px;
--breakpoint-xl: 1200px;
}

specifically, I'd like to override the --breakpoint-md setting. I've noticed similar questions have been asked, but the answers weren't clear. from what I see, these become variables that are used in specific instances. I'd like the setting to apply to the entire site. Is this possible?

To explain a bit. When I change the screen size my columns stack at 767px, which is the look I'm going for at 768px, but at 768px the views are squished ugly. I have been reading about scss a bit, is that the only solution?

about 4 years ago · Juan Pablo Isaza
2 Respostas
Responde à pergunta

0

You can customize anything you'd like to with bootstrap.

To get started, take a look at the documentation on customization here: https://getbootstrap.com/docs/5.0/customize/overview/

Your best bet would be to use sass, as documented here: https://getbootstrap.com/docs/5.0/customize/sass/

Something like this in your custom.scss file.

// Custom.scss
// Option A: Include all of Bootstrap

// Include any default variable overrides here (though functions won't be available)

@import "../node_modules/bootstrap/scss/bootstrap";

// Then add additional custom code here

:root {
--breakpoint-md: 768px;
}
about 4 years ago · Juan Pablo Isaza Relatório

0

If you are using bootstrap scss, then use the below.

First You have to install boostrap

npm install bootstrap

And then you can set custom breakpoints.

@import '../node_modules/bootstrap/scss/functions';
@import '../node_modules/bootstrap/scss/variables';

$grid-columns:      12;
$grid-gutter-width: 1.5rem;

$grid-breakpoints: (
    xs: 0,
    vs: 300px,
    sm: 500px,
    md: 750px,
    lg: 1000px,
    vl: 1300px,
    xl: 1600px
);

$container-max-widths: (
  xs: 299px,
  vs: 499px,
  sm: 749px,
  md: 999px,
  lg: 1299px,
  vl: 1599px,
  xl: 1999px
);

@import '../node_modules/bootstrap/scss/bootstrap.scss';
about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda