I am relatively new to programming and markup languages.
Is there a way to add classes in less from an external css file?
/* this is in a single less file */
.foo {
color: blue;
}
h1 {
.foo; /* works just fine and turns my h1 html tag blue*/
}
/* now if want to add (for examlpe) a bootstrap class in my less file like so*/
@import "bootstrap.css"; /*it is in the same folder as my less file */
h1 {
.text-danger; /*throws an error */
}
This should make my h1 tag red, as I imported the bootstrap.css file. Now I tried this with creating my own css file and import that to my less file and do the same thing but it doesn't work either.
What am i doing wrong?