Implementing an indigo color scheme into my Bootstrap HTML project

How can I switch from the current default theme to the indigo theme of Bootstrap in the following code?

I attempted to add $primary: colorname, but it did not yield any changes.

<!doctype html>
<html lang="en">
  <head>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="7f1d10100b0c0b0d1e0f3f4b514f514f">[email protected]</a>/dist/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<style>
$primary: rebeccapurple;
$danger: #dd0000;
$success: lime;
$warning: orange;
$info: aqua;

$body-bg: #f3f3f0;

@import "bootstrap";

</style>
  </head>
  <body>


    <div class="input-group input-group-sm ">
      <input type="text" class="form-control" aria-label="Text input with segmented dropdown button">
      <div class="input-group-append input-group-sm">
        <button type="button" class="btn btn-outline-secondary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
        </button>
        <div class="dropdown-menu">
<
<!-- Remaining code lines have been omitted for brevity -->

Answer №1

Ensure you're not trying to insert SASS syntax directly into a <style> tag.

If you missed it, the guide on using SASS with Bootstrap advises:

Avoid altering Bootstrap’s core files. Instead, create your own stylesheet that imports Bootstrap for customization and expansion purposes.

Further explanation is provided in the guide.

Subsequently, utilize the CSS yielded from SASS in lieu of the CDN-hosted CSS.

The basics of SASS can be found in an introductory resource on the SASS website.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

I am looking to connect the contents of a subfolder page with a page located in the main folder

I need to redirect the login page located in the subfolder signup to the index page within the main folder called web. The web folder contains both the index page and the signup folder, while the login page resides in the signup folder. What steps should ...

Expand Bootstrap navbar search box outside collapse menu

Currently, I am working on designing a navigation bar that showcases my brand on the left side, a full-width search bar in the center, and additional pages on the right. I am facing challenges in maintaining the full-width of the search bar without causing ...

Which HTML tag should I choose to apply color to text in Twitter Bootstrap?

I'm looking to enhance the appearance of a specific word in my text. For example: This is my text, <span class="red">this</span> should be red. Would using the span tag be the appropriate method for achieving this effect? Or are there ot ...

Implementing a feature in jQuery to reveal an element upon button click

I need to create a functionality where clicking a button will display a panel. Initially, I have set the panel's visibility to false in its properties. So, when the user clicks the button, the button should hide and the panel should show up. How can I ...

Is there a way to activate sorting icons in bootstrap datatables?

My attempt to replicate the datatable from this template is not working as expected. I can't seem to get the up and down icons for sorting to show up. I've followed all the instructions but they are still missing... $(function () { $(&a ...

The slider causing conflicts with widgets and content positioned below it in an HTML layout

When implementing a slider with a fade effect, there seems to be an issue with the placement of widgets on the homepage. The problem arises from the margin-top setting as when images change in the slider, the widgets clash with the slider. During the trans ...

Traditional method of choosing a value within a <select> dropdown menu

Check out this example of a static dropdown menu: <select style="width:100px" name="drink_type"> <option value="Water">Water</option> <option value="Soda">Soda</option> <option value="Milk">Milk</option> < ...

Material Design Forms in Angular: A Winning Combination

I'm currently working on developing a form using Angular Material. This form allows the user to update their personal information through input fields. I am utilizing "mat-form-field" components for this purpose. However, there are certain fields tha ...

What is the best way to target a class within a span using CSS?

I need help with hiding an icon from the mobile menu. I am unsure about how to target this specific class within the menu structure. <a class="funiter-menu-item-title" title="Nieuw">Nieuw<span class="icon fa fa-chevron-down"></span>< ...

Using a <div> to contain <mat-card> in Angular Material

Can you achieve the following: Show components with specified width in a row instead of the usual column layout Enclose the cards within another defined container I've been attempting to accomplish this but without success so far.... While materia ...

Issue with JavaFX: Unable to remove additional space on the right side of TabPane

While developing a full-screen application on JavaFX 2.2 with tab navigation, I encountered an issue where there is a 10px space at the right side of the headers region. Surprisingly, this space only appears after switching to the last tab and disappears w ...

Transferring data between a template and a views function in Django

Is it possible to pass multiple variables from a template in the form of dropdown options to a different views function in Django? The function I want to pass the variables to is not the same as the current view. Below is the snippet from views.py for ref ...

"Utilizing CSS3 columns to create a layout with one column

I am looking to divide my webpage into multiple columns, starting with three but potentially adding more in the future. My current approach involves using Flexbox to create equal-width columns: <style> .container { display: flex; } .column { ...

Does altering HX-GET in JavaScript have no impact on the outcome?

I need assistance with implementing HTMX in my FastAPI application that uses Tailwind and MongoDB for the database. Here is the form I am working with: <form id="currencyForm" hx-get="/currency_history_check/EUR" hx-target="#re ...

Cursor disabling effect in IE 11 causing interference with drop-down options on Twitter Bootstrap 3

Right above a disabled twitter bootstrap 'form-control' input element sits a drop-down list. <div> <select> <option> Option 1 </option> <option> Option 2 </option> <option> Op ...

Picture placed outside div within infobubble

I'm currently working with Google Maps to display an InfoWindow using the InfoBubble library. The issue I'm encountering is that when I try to show an image outside of a div using CSS properties, only half of the image displays within the div. B ...

Is there a way to access the rear camera on a mobile device using webcam.js?

Currently, I am utilizing webcam.js from the following link: https://github.com/jhuckaby/webcamjs. When accessing the website on mobile devices, the front camera tends to open by default. My objective is to switch this default setting to access the rear ...

Display immersive full-screen overlays that encompass the entire vertical space without the need for scrolling

Recently, I ran into a challenge while attempting to create a CSS print style-sheet. The issue arose when I tried to print a full-screen overlay containing scrollable content. Only the content that was currently displayed would show up in the printed ver ...

Ways to initiate a flip motion

Looking for a way to create a flip image effect when clicked by the user. Here is the code I have so far: let img = document.querySelector('img') let div; let click = 0; img.onclick=function(){ console.log(click) if(click %2 ==0){ d ...

Exploring the Functionality of HTML Anchor Link Fragment within Angular 6

I've been working on an Angular 6 project where I've disabled the hash-location-strategy, removing # from the URL. As a result of this change, a link like: <li routerLinkActive="active"> <a [routerLink]="['/settin ...