]> git.proxmox.com Git - extjs.git/blame - extjs/classic/theme-base/sass/etc/mixins/theme-background-image.scss
add extjs 6.0.1 sources
[extjs.git] / extjs / classic / theme-base / sass / etc / mixins / theme-background-image.scss
CommitLineData
6527f429
DM
1/*\r
2 * Method which inserts a full background-image property for a theme image.\r
3 * It checks if the file exists and if it doesn't, it'll throw an error.\r
4 * By default it will not include the background-image property if it is not found,\r
5 * but this can be changed by changing the default value of $include-missing-images to\r
6 * be true.\r
7 */\r
8@function theme-background-image($path, $extension: $image-extension, $nocheck: false) {\r
9 $path: file_join($relative-image-path-for-uis, $path + '.' + $extension);\r
10 $background-image: none;\r
11\r
12 @if $path {\r
13 @if $nocheck {\r
14 $background-image: $path;\r
15 } @else if theme_image_exists($image-search-path, $path) {\r
16 $background-image: $path;\r
17 } @else {\r
18 @warn "@theme-background-image: Theme image not found: #{$path}";\r
19 @if $include-missing-images {\r
20 $background-image: $path;\r
21 }\r
22 }\r
23\r
24 @if $background-image != none {\r
25 $background-image: url(file_join($theme-resource-path, $path));\r
26 }\r
27 } @else {\r
28 @warn "@theme-background-image: No arguments passed";\r
29 }\r
30\r
31 @return $background-image;\r
32}\r