Issue with Bootstrap 5 and vertical ruler (vr) not displaying current color

Utilizing the vr feature from Bootstrap 5 to establish vertical ruler divisions in col-sm-1 between three chartjs graphs in col-sm-3. Encountering a peculiar issue where one vr appears slightly darker than the other. Struggling to determine the cause of this inconsistency. Additionally, applying style="justify-content: center;" to the row seems to alter the colors of the rulers, with the darker one becoming lighter and vice versa.

<div class="container-fluid">
    <div class="card border-0">
        <div class="card-body bg-body rounded">
            
            <div class="row" style="justify-content: center;">
                <div class="col-sm-3">
                    <div class="container">
                        foobar1
                        <canvas id="one"></canvas>
                    </div>
                </div>
                <div class="col-sm-1 align-self-center">
                    <div class="d-flex" style="justify-content: center;">
                        <div class="vr" style="height: 120px;"></div>
                    </div>
                </div>
                
                <div class="col-sm-3">
                    <div class="container">
                        foobar2
                        <canvas id="two"></canvas>
                    </div>
                </div>
                <div class="col-sm-1 align-self-center">
                    <div class="d-flex" style="justify-content: center;">
                        <div class="vr" style="height: 120px;"></div>
                    </div>
                </div>

                <div class="col-sm-3">
                    <div class="container">
                        foobar3
                        <canvas id="three"></canvas>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

Associated JavaScript code:

 const anyctx = document.getElementById('one') as any;
 const foobar1 = new Chart(anyctx, {
  type: 'line',
  data: {
    labels: labels,
    datasets: [
      {
        label: 'foobar',
        data: data,
        backgroundColor: ['rgba(255, 159, 64, 0.2)'],
        borderColor: ['rgba(255, 159, 64, 1)'],
        borderWidth: 1,
      },
    ],
  },
});

When the row is not center justified, the second ruler appears slightly darker.

https://i.sstatic.net/K76ye.png

However, when the row is center justified, the first ruler is the one that appears slightly darker.

https://i.sstatic.net/r4BKt.png

Upon inspecting the element, it is observed that the background color property is set to currentColor in both scenarios for both rulers. This raises the question: what could be causing this inconsistency?

P.S. The project is built using Angular, although this detail may not be relevant to the issue at hand.

Answer №1

Bootstrap suggests using the currentColor property to easily change colors by adding a text-{color} class. This method is effective for updating color schemes. To learn more, refer to the documentation here. For example, consider adding

<div class="vr text-dark"></div>
to your vertical lines. Although my response is delayed, I hope this solution provides some relief for your issue.

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

Return HTML elements as part of the laravel AJAX response

I have familiar with using ajax in the past, but I have not encountered this specific problem before. Below is my form setup: <form action="" method="post" enctype="multipart/form-data" class="m-form m-form--fit m-form--label-align-right" id="basicinf ...

Please incorporate the href attribute into the anchor tag when it is clicked

<section> <a **id="download"** oncontextmenu="return false" > <svg ... </svg></a> </section> <script type="text/javascript"> The following code snippet is designed to ...

Form_Open will automatically submit - Ajax Submission in CodeIgniter

I am facing an issue with submitting my form via Ajax. Despite setting up a function to prevent the page from refreshing upon submission, it seems like the form still refreshes the page every time I click submit. I even tried creating a test function to lo ...

Transform the JSON response into a map

I have a functioning code that I am looking to adjust. let table_specs = {'columns': [ {'name': 'Col1', 'width': 7, ....}, {'name': 'Col2', 'width': 8, . ...

Combining strings within a string after a specific word with nested Concatenation

In a given string variable "str," I am looking to concatenate another string between "InsertAfterMe" and "InsertBeforeMe". str="This is a string InsertAfterMe InsertBeforeMe" s1="sometext" s2="soMoreText" aList=[1,2,3,4,5] The concatenated string shoul ...

What is the best way to align the text in the center without centering the numbers in an HTML ordered list?

I am currently working on a small widget for a webpage that displays steps in reverse order. My plan is to use an ol element and adjust the value attribute on each li tag to make the numbering of the ordered list reversed. Everything seems to be going smoo ...

Design the button element with input text using CSS styling

https://i.sstatic.net/3vdRV.png Is there a way to stylize input text and buttons similar to this using CSS or Vuetify JS? ...

Creating an accessible order for the next and back buttons

Currently, I am working on designing the user interface for a checkout flow. Towards the end of the page, there are 3 buttons available - Next, Back, and Cancel. When viewed on a desktop, the button layout appears as follows: (Back) (Next) Cancel http ...

SASS property value validation error

I am having trouble using a Font in Storybook as I keep getting the error "invalid property value" in Chrome. I am new to sass and storybook. Error Screenshot: https://ibb.co/HqFLJ5H Main Sass File (excerpt): @import './src/assets/sass/color.sass&a ...

Create a Bootstrap div containing a button that adjusts to different screen sizes on the

Struggling with an issue in Bootstrap on how to create an input group with responsive content and a button on the right side. I want the button to always be on the right side and also responsive. I attempted to achieve this with the code below, but it does ...

Deliver the event target within the data-bind click HTML

I am having trouble sending the event target when passing parameters in data-bind. <button class="tablinks" data-bind="click:$root.notify.bind(this, 1, 'foo');" id="defaultOpen">PRINCIPAL</button> self.notify = function (str, id, e) ...

What is the best technique for positioning a div using the ELEMENT_NODE method?

  #top { height: .5rem; padding-left: 2.7rem; line-height: .5rem; color: #666; font-size: .12rem; position: relative; background-color: rgb(241, 241, 241); } #top div { position: ...

Extracting data from DataTables rows: A guide

I am trying to retrieve values of a row in DataTables when I click on the corresponding button, but I keep getting undefined results. Here is how the buttons are added: function getData() { $pdrs = Pdrs::select('ID_Piece', 'Designa ...

Modifying a header's properties by incorporating chosen values from a form

I am tasked with creating an HTML form that includes 3 select attributes (color, shadow, background-color). Depending on the user's selections, these attributes will be applied to a h1 element on the page. I need to achieve this without using JavaScri ...

The model fails to update when a blur event occurs

I am a beginner with Angular2 and I am currently working on creating a reactive form, specifically an interactive date input field. Here is my HTML code: <div class="date ui-input"> <input type="text" name="dateD" [ngModel]="model.date | dat ...

What steps do I need to take in order to display my data in a dynatree

Currently, I am in the process of developing a web application and incorporating dynatree for structuring purposes. EXAMPLE: Node 1 + Node 1.1 + Node 1.1.1 + Node 1.1.2 + Node 1.1.3 My goal is to introduce a child node (+Node 1.1.3.1) within th ...

Ways to validate the present date and time using Jquery

Is there a method in Jquery to retrieve the current date and time? ...

Displaying a limited number of dynamically generated values in an Angular select dropdown using Bootstrap 5

I have a backend service that provides a list of all countries. In my component, I iterate through the array and allow the user to select a country. Bootstrap 5 is being used for styling. <select class="form-select" formControlName="coun ...

NGINX returns 404 error when attempting to access Angular application with data in the URL

My server setup includes the following: At the root (/var/www) directory, there is an index.html file that connects to two Angular applications - app1 and app2 \index.html | +-\app1\index.html | +-\app2\index.html ...

Page rotates on hover effect with RotateY

How can I get an image to rotate on the Y axis when hovered over? My code works in -moz- but not in -webkit- or -o-. What am I missing? .spin-logo { height: 450px; margin: 0 auto; -moz-transition: transform 2000ms ease 0s; -o-animation: transfor ...