Closed JumpLink closed 10 years ago
Okay now I've seen that you are using base64-strings (but why you are using the image path in the less file, you are using any tool to generate the base64 string?), so I've solved my issue in this way:
@import "../../bower_components/angular-bootstrap-colorpicker/less/variables.less";
@ColorPickerImagePath: "/bower_components/angular-bootstrap-colorpicker/img";
@import "../../bower_components/angular-bootstrap-colorpicker/less/colorpicker.less";
.colorpicker-saturation {
background-image: url('@{ColorPickerImagePath}/saturation.png');
}
.colorpicker-hue {
background-image: url('@{ColorPickerImagePath}/hue.png');
}
.colorpicker-alpha,
.colorpicker-color {
background-image: url('@{ColorPickerImagePath}/alpha.png');
}
Hi,
the file was created in the PR #6 4 months ago. Now in my opinion the variable.less is completly useless, since images are converted to base64 strings. I don't know if there is a need to customize image sources.
All right, but you need to add the base64-string to the less file, too.
Edit: Oh sorry, I did not know data-uri
Yes, the data-uri landed in the LESS 1.4. Anyway, thanks for pointing out this problem. The idea of the variable.less file is not good anymore. btw you can always
@import
a compiled colorpicker.css in your less file.
@buberdds thanks for the tip!
please make less variables overridable. In my project I have include your less files in this way:
but the @ColorPickerImagePath is not overridable because you are including the
variables.less
file insite thecolorpicker.less
file.