Stop the excessive griping about the fact that @brand-success is undefined in variables.less

Encountering an issue while compiling less code where a NameError is triggered, stating that the variable @brand-success is undefined in app/static/css/less/style.less on line 131, column 15. Interestingly, this variable is actually imported from

app/bower_components/bootstrap/less/variables.less
through
'app/bower_components/bootstrap/less/bootstrap.less'
.

During compilation using grunt-contrib-less, the following output is displayed:

Running "less:files" (less) task
File app/static/css/icons.css created: 0 B - 175 B
File app/static/css/main.css created: 0 B - 152.44 kB
File app/static/css/modal-large.css created: 0 B - 1.29 kB
>> NameError: variable @brand-success is undefined in app/static/css/less/style.less on line 131, column 15:
>> 130     .circle-green {
>> 131       .circle(@brand-success);
>> 132     }
Warning: Error compiling app/static/css/less/style.less Use --force to continue.

The inclusion of

'app/bower_components/bootstrap/less/bootstrap.less'
is confirmed as it is referenced in the file 'vendor.less' within the less directory:

one@node ~/github/lbs/lbs/app/static/css/less $ cat vendor.less 
@import 'app/bower_components/bootstrap/less/bootstrap.less';
@import 'app/bower_components/font-awesome/less/font-awesome.less';
one@node ~/github/lbs/lbs/app/static/css/less $ 

If intentionally altering the path results in an error, indicating that the correct bootstrap.less file is being utilized.

Seeking assistance in identifying the root cause of this issue.

Additional information provided:

one@node ~/github/lbs/lbs/app/static/css/less $ cat main.less 
// Main less file for your application.
// Use `@import` to use other less files
// relative to 'app/css' or 'vendor/css'.
@import 'vendor';
@import 'modal-large';
@import 'icons';
@import 'style'

one@node ~/github/lbs/lbs $ !grep
grep -il brand-success -R *
app/bower_components/bootstrap/dist/css/bootstrap.css.map
app/bower_components/bootstrap/less/variables.less
app/static/css/less/style.less
one@node ~/github/lbs/lbs $ 

Answer №1

After adding the

@import 'app/bower_components/bootstrap/less/bootstrap';
line to style.less, the issue was resolved. However, this solution feels like a workaround...there might be a deeper underlying problem that needs addressing. Any insights into what could be causing this would be much appreciated.

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

Achieve a vertical fill effect within a parent container using CSS to occupy the remaining space

I have set my sights on a specific goal. https://i.sstatic.net/BqqTX.jpg This represents my current progress in achieving that goal. https://i.sstatic.net/unQY9.jpg On the left side, I have an image with a fixed height. The aqua color fills the left s ...

What is the best way to show the title when a user hovers over a word?

Below is an illustration of the code: <p>Bob's <dfn title="Dog">canine</dfn> mother and <dfn title="Horse">equine</dfn> father sat him down and carefully explained that he was an <dfn title="A mutation that combines ...

Difficulty in placing the logo within the navigation menu

Currently working on developing a website and encountering challenges with positioning the logo within the navigation bar. A test version of the site can be found at The logo is not centered properly in its designated space, especially in smaller browser ...

Ways to ensure that the ul navigation bar spans the entire bottom of the page evenly (without resorting to using table

This question has been previously raised on Stack Overflow with an insightful answer provided. However, I am encountering a specific problem in implementing it. My objective is to have a navigation bar (nav consisting of ul and its li items) occupy the en ...

Creating a div that becomes fixed at the top of the page after scrolling down a certain distance is a great way to improve user experience on a

I am struggling to create a fixed navigation bar that sticks to the top of the page after scrolling 500px, but without using position: fixed. Despite trying various solutions, none seem to work due to the unique layout of my navigation bar. Strangely enoug ...

Transparent background with opaque text

I noticed that my div has a gray background with some opacity. <div className="absolute w-full h-full top-0 left-0 right-0 bottom-0 bg-slate-500 opacity-50 z-10"> <p className="relative top-1/2 px-8 text-center hea ...

Facing compatibility problems with JavaScript and Cascading Style Sheets in Google Chrome?

Welcome to the site . Let's address a couple of issues with JavaScript and CSS: Firstly, the JS code seems to be malfunctioning only in Chrome, throwing an error that reads: 'Uncaught TypeError: Object [object Object] has no method 'on prij ...

Adjusting the Size of Slideshow Pictures in a JavaScript Array to Match the Viewport

Welcome to my first post! Please excuse any formatting issues. I am currently working on a project where I am trying to create a slideshow using Javascript. I have successfully added images into an array and have the slideshow up and running. However, I ...

CSS selector that targets a specific node lacking a certain class attribute

Is there a way to target only the h4 tags that do not contain an h3 tag with the class "avoid"? Specifically, I am looking to select the first and fourth h4 nodes for this scenario. <div> <h4> <h1><h1> <h2><h2> ...

Is there a way to use JQuery to make one button trigger distinct actions in two different divs?

For instance: Press a button - one div flies off the screen while another div flies in. Press the button again - Same div flies out, other div returns. I'm completely new to Javascript/JQuery so any assistance would be highly appreciated! Thank you ...

Is there a way to position the twitter embed at the center of a webpage?

I am attempting to embed a Twitter video and twit in such a manner that they are perfectly centered on the page and also take up the entire width of the container (my-container). Here is the HTML code that I currently have: <div class="my-container"&g ...

Another CSS style is creating additional gaps within the div container

The code I'm working with currently looks like this: <div id="img_preview_text_container" style="width: 376px; height: 75px; top: 156px; left: 50px; color: rgb(255, 0, 0);"> <div id="customOnePreviewText" style="font-family: Oklahoma; ...

interaction with leaflet popup information

My aim is to access the content within a leaflet popup. Specifically, I have inserted a form with buttons inside it that I would like to interact with. However, for now, I am simply attempting to add an event to the popup itself. $(".leaflet-popup-content ...

Opera and Internet Explorer both store <p class="hide"> in their cache, causing issues with JavaScript functionality

Apologies for asking what might seem like a silly question. I have a basic css file with a class called "hide" that hides an element (how cool!). I use simple javascript to unhide the element: $(document).ready(function(){ var hiddenElement = $("p.hi ...

The oversized monitor is cut off halfway due to postcss-pxtorem

When designing a screen with dimensions of 3840 x 2160, the initial draft was created with 1920 x 1080. I utilized postcss-pxtorem with a "rootValue" set to 192 for responsive scaling. The zoom is normal and functional on screens below 1920 pixels wide. ...

javascript issue with dynamic function hover not functioning

Hey there, I am attempting to achieve a hover effect on a dynamic image where a dynamic div should be displayed. When the mouse is removed, the div should be hidden. If I move over to the div after hovering on the image, the div needs to stay visible. Ho ...

Displaying Text on Mouseover with JQuery

I have created a unique set of graphs that unveil hidden text when hovered over with the mouse. To start, I carefully outlined the layout of my text: <article class="fundamental_metrics"> <h2>Fundamental Metrics</h2> <p id="nu ...

Challenges arise with setting the background-color for a bootstrap 4 navbar

Hey there, I'm having trouble changing the background color and opacity of a navbar using rgba. Can anyone provide some guidance on this issue? #navbarr { background-color: rgba(0, 0, 0, 0.8); } <div class="navbar navbar-dark bg-dark fixed-top ...

Highcharts 3D Pie Chart with Drilldown Feature

How can I create a 3D Pie Chart with Drilldown effect? I am having trouble understanding how it works. Here is a JsFiddle Demo for a 3D Pie Chart: JsFiddle Demo And here is a JsFiddle Demo for a 2D Pie Chart with Drilldown feature: JsFiddle Demo You can ...

Display the page scrollbar exclusively when in full-screen mode

Here is the JavaScript code that can make a webpage go fullscreen upon clicking a link: <a href="javascript:void(0)" onclick="javascript:toggleFullScreen()"></a> // mozfullscreenerror event handler function errorHandler() { alert('m ...